diff options
| author | 2009-05-19 14:00:28 +0200 | |
|---|---|---|
| committer | 2009-05-19 14:00:28 +0200 | |
| commit | 5d34c2e7c70de039c75c7a39933b98d14a659176 (patch) | |
| tree | 7ea967cdc456962558d7f37c3e1976b1ae41631d /udev/85-usbmuxd.rules.in | |
| parent | e1efbba597356f068b5cf90b16527170ad625b41 (diff) | |
| download | usbmuxd-5d34c2e7c70de039c75c7a39933b98d14a659176.tar.gz usbmuxd-5d34c2e7c70de039c75c7a39933b98d14a659176.tar.bz2 | |
modified udev rules file to reflect autoconf prefix specification
Diffstat (limited to 'udev/85-usbmuxd.rules.in')
| -rw-r--r-- | udev/85-usbmuxd.rules.in | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/udev/85-usbmuxd.rules.in b/udev/85-usbmuxd.rules.in new file mode 100644 index 0000000..e661ccd --- /dev/null +++ b/udev/85-usbmuxd.rules.in | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | # usbmuxd (iPhone "Apple Mobile Device" MUXer listening on /var/run/usbmuxd) | ||
| 2 | #if | ||
| 3 | #SUBSYSTEMS=="usb_interface", SYMLINK+="usbmux/interface" | ||
| 4 | |||
| 5 | #SUBSYSTEMS!="usb", GOTO="usbmuxd_rules_end" # stops the whole script working | ||
| 6 | ATTR{idVendor}!="05ac", GOTO="usbmuxd_rules_end" | ||
| 7 | |||
| 8 | # If it's plug insertion, flip it into dual "PTP + Apple Mobile Device" configuration | ||
| 9 | # This allows another application to switch it later without it getting switched back (hopefully) | ||
| 10 | # TODO: check iPod Touch/3G | ||
| 11 | SUBSYSTEM=="usb", ACTION=="add", ATTR{product}=="iPhone", ATTR{bConfigurationValue}!="3", ATTR{bConfigurationValue}="3", GOTO="usbmuxd_rules_end" | ||
| 12 | |||
| 13 | # SYMLINK the usbmux endpoints, if we get them | ||
| 14 | # TODO: Multiple devices | ||
| 15 | # TODO: work out how to make nice, incrementing usbmux/{0,1,2,3}-in for | ||
| 16 | LABEL="usbmuxd_rules_usbmux" | ||
| 17 | |||
| 18 | # ff/fe/02 == usbmux | ||
| 19 | # | ||
| 20 | #ACTION=="add", | ||
| 21 | |||
| 22 | # Try to symlink the interface, containing the endpoints. | ||
| 23 | # ...But it doesn't work | ||
| 24 | #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" | ||
| 25 | |||
| 26 | #ATTRS{bInterfaceClass}=="ff", ATTRS{bInterfaceSubClass}=="fe", ATTRS{bInterfaceProtocol}=="02", SYMLINK+="usbmux/interface" | ||
| 27 | |||
| 28 | # Cute names, really they should have nice numerically increasing names. | ||
| 29 | ACTION=="add", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep04", SYMLINK+="usbmux/in" | ||
| 30 | ACTION=="add", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep85", SYMLINK+="usbmux/out" | ||
| 31 | |||
| 32 | # Start and stop 'usbmuxd' as required. | ||
| 33 | ACTION=="add", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep85", RUN+="/sbin/start-stop-daemon --start --oknodo --exec @prefix@/sbin/usbmuxd" | ||
| 34 | ACTION=="remove", SUBSYSTEM=="usb_endpoint", KERNEL=="usbdev*_ep85", RUN+="/sbin/start-stop-daemon --stop --signal 2 --exec @prefix@/sbin/usbmuxd" | ||
| 35 | |||
| 36 | # skip | ||
| 37 | LABEL="usbmuxd_rules_end" | ||
