diff options
author | Martin Szulecki | 2009-05-04 18:18:40 +0200 |
---|---|---|
committer | Nikias Bassen | 2009-05-04 18:18:40 +0200 |
commit | 7364e09f6849076c710ac9ce52a5d5fd2445e19c (patch) | |
tree | b1435d14501f704900142c0a5f7b11ea5f3217fa /udev | |
parent | cae80628faeeb19a88a28d7fb058e74f8b2743ed (diff) | |
download | usbmuxd-7364e09f6849076c710ac9ce52a5d5fd2445e19c.tar.gz usbmuxd-7364e09f6849076c710ac9ce52a5d5fd2445e19c.tar.bz2 |
Use autotools build system and add license
Signed-off-by: Nikias Bassen <nikias@gmx.li>
Diffstat (limited to 'udev')
-rw-r--r-- | udev/85-usbmuxd.rules | 37 | ||||
-rw-r--r-- | udev/Makefile.am | 4 |
2 files changed, 41 insertions, 0 deletions
diff --git a/udev/85-usbmuxd.rules b/udev/85-usbmuxd.rules new file mode 100644 index 0000000..69ddef8 --- /dev/null +++ b/udev/85-usbmuxd.rules @@ -0,0 +1,37 @@ +# usbmuxd (iPhone "Apple Mobile Device" MUXer listening on /var/run/usbmuxd) +#if +#SUBSYSTEMS=="usb_interface", SYMLINK+="usbmux/interface" + +#SUBSYSTEMS!="usb", GOTO="usbmuxd_rules_end" # stops the whole script working +ATTR{idVendor}!="05ac", GOTO="usbmuxd_rules_end" + +# If it's plug insertion, flip it into dual "PTP + Apple Mobile Device" configuration +# This allows another application to switch it later without it getting switched back (hopefully) +# TODO: check iPod Touch/3G +SUBSYSTEM=="usb", ACTION=="add", ATTR{product}=="iPhone", ATTR{bConfigurationValue}!="3", ATTR{bConfigurationValue}="3", GOTO="usbmuxd_rules_end" + +# SYMLINK the usbmux endpoints, if we get them +# TODO: Multiple devices +# TODO: work out how to make nice, incrementing usbmux/{0,1,2,3}-in for +LABEL="usbmuxd_rules_usbmux" + +# ff/fe/02 == usbmux +# +#ACTION=="add", + +# Try to symlink the interface, containing the endpoints. +# ...But it doesn't work +#KERNELS=="7-3:3.1", SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="01", ATTRS{bAlternateSetting}==" 0", ATTRS{bNumEndpoints}=="02", ATTRS{bInterfaceClass}=="ff", ATTRS{bInterfaceSubClass}=="fe", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="usbmux/prettyplease", RUN+="/bin/ls -l /dev/usbmux/prettyplease" + +#ATTRS{bInterfaceClass}=="ff", ATTRS{bInterfaceSubClass}=="fe", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="usbmux/interface" + +# Cute names, really they should have nice numerically increasing names. +ACTION=="add", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep04", SYMLINK+="usbmux/in" +ACTION=="add", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep85", SYMLINK+="usbmux/out" + +# Start and stop 'usbmuxd' as required. +ACTION=="add", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep85", RUN+="/sbin/start-stop-daemon --start --oknodo --exec /usr/local/sbin/usbmuxd" +ACTION=="remove", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep85", RUN+="/sbin/start-stop-daemon --stop --signal 2 --exec /usr/local/sbin/usbmuxd" + +# skip +LABEL="usbmuxd_rules_end" diff --git a/udev/Makefile.am b/udev/Makefile.am new file mode 100644 index 0000000..321008a --- /dev/null +++ b/udev/Makefile.am @@ -0,0 +1,4 @@ +udevdir=$(sysconfdir)/udev/rules.d/ +udev_DATA=85-usbmuxd.rules + +EXTRA_DIST = 85-usbmuxd.rules |