diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-05-16 06:33:40 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-05-16 06:33:40 -0700 |
commit | 40ee6c310bc44385f228fc1f60f62223d119a1e2 (patch) | |
tree | a4fed9799401ccfe060d0014a96d490d5bf6ece7 | |
parent | 4c027b63d4eb5b2d7c261714022fea71ba4ddcd7 (diff) | |
download | bluez-40ee6c310bc44385f228fc1f60f62223d119a1e2.tar.gz |
Add support for running hid2hci from udev
-rw-r--r-- | scripts/Makefile.am | 17 | ||||
-rw-r--r-- | scripts/bluetooth-hid2hci.rules | 36 | ||||
-rw-r--r-- | scripts/bluetooth-serial.rules (renamed from scripts/bluetooth.rules) | 0 | ||||
-rw-r--r-- | scripts/bluetooth.default | 3 | ||||
-rw-r--r-- | scripts/bluetooth.init | 7 |
5 files changed, 50 insertions, 13 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 6a8eec7f..494a9c2d 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,15 +1,26 @@ -if PCMCIARULES +if CONFIGFILES rulesdir = $(sysconfdir)/udev -rules_DATA = bluetooth.rules +rules_DATA = + +if HID2HCI +rules_DATA += bluetooth-hid2hci.rules +endif + +if PCMCIARULES +rules_DATA += bluetooth-serial.rules +endif +endif +if PCMCIARULES udevdir = $(libexecdir)/udev udev_SCRIPTS = bluetooth_serial endif -EXTRA_DIST = bluetooth.rules bluetooth_serial bluetooth.init bluetooth.default +EXTRA_DIST = bluetooth.init bluetooth.default bluetooth-hid2hci.rules \ + bluetooth-serial.rules bluetooth_serial MAINTAINERCLEANFILES = Makefile.in diff --git a/scripts/bluetooth-hid2hci.rules b/scripts/bluetooth-hid2hci.rules new file mode 100644 index 00000000..1b231d15 --- /dev/null +++ b/scripts/bluetooth-hid2hci.rules @@ -0,0 +1,36 @@ +# Variety of Dell Bluetooth devices +# +# it looks like a bit of an odd rule, because it is matching +# on a mouse device that is self powered, but that is where +# a HID report needs to be sent to switch modes. +# +# Known supported devices: +# 413c:8154 +# 413c:8158 +# 413c:8162 +ACTION=="add", ENV{ID_VENDOR}=="413c", ENV{ID_CLASS}=="mouse", ATTRS{bmAttributes}=="e0", KERNEL=="mouse*", RUN+="/usr/sbin/hid2hci --method dell -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hci" + +# Logitech devices +ACTION=="add", ENV{ID_VENDOR}=="046d", ENV{ID_MODEL}=="c703" RUN+="/usr/sbin/hid2hci --method logitech -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hci" +ACTION=="add", ENV{ID_VENDOR}=="046d", ENV{ID_MODEL}=="c704" RUN+="/usr/sbin/hid2hci --method logitech -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hci" +ACTION=="add", ENV{ID_VENDOR}=="046d", ENV{ID_MODEL}=="c705" RUN+="/usr/sbin/hid2hci --method logitech -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hci" +ACTION=="add", ENV{ID_VENDOR}=="046d", ENV{ID_MODEL}=="c70a" RUN+="/usr/sbin/hid2hci --method logitech -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hci" +ACTION=="add", ENV{ID_VENDOR}=="046d", ENV{ID_MODEL}=="c70b" RUN+="/usr/sbin/hid2hci --method logitech -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hci" +ACTION=="add", ENV{ID_VENDOR}=="046d", ENV{ID_MODEL}=="c70c" RUN+="/usr/sbin/hid2hci --method logitech -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hci" +ACTION=="add", ENV{ID_VENDOR}=="046d", ENV{ID_MODEL}=="c70e" RUN+="/usr/sbin/hid2hci --method logitech -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hci" +ACTION=="add", ENV{ID_VENDOR}=="046d", ENV{ID_MODEL}=="c713" RUN+="/usr/sbin/hid2hci --method logitech -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hci" +ACTION=="add", ENV{ID_VENDOR}=="046d", ENV{ID_MODEL}=="c714" RUN+="/usr/sbin/hid2hci --method logitech -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hci" +ACTION=="add", ENV{ID_VENDOR}=="046d", ENV{ID_MODEL}=="c71b" RUN+="/usr/sbin/hid2hci --method logitech -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hci" +ACTION=="add", ENV{ID_VENDOR}=="046d", ENV{ID_MODEL}=="c71c" RUN+="/usr/sbin/hid2hci --method logitech -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hci" + +# CSR devices (in HID mode) +ACTION=="add", ENV{ID_VENDOR}=="0a12", ENV{ID_MODEL}=="1000" RUN+="/usr/sbin/hid2hci --method csr -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hci" +ACTION=="add", ENV{ID_VENDOR}=="0458", ENV{ID_MODEL}=="1000" RUN+="/usr/sbin/hid2hci --method csr -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hci" +ACTION=="add", ENV{ID_VENDOR}=="05ac", ENV{ID_MODEL}=="1000" RUN+="/usr/sbin/hid2hci --method csr -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hci" + +# CSR devices (in HCI mode) +#ACTION=="add", ENV{ID_VENDOR}=="0a12", ENV{ID_MODEL}=="0001" RUN+="/usr/sbin/hid2hci --method csr -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hid" +#ACTION=="add", ENV{ID_VENDOR}=="0458", ENV{ID_MODEL}=="003f" RUN+="/usr/sbin/hid2hci --method csr -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hid" +#ACTION=="add", ENV{ID_VENDOR}=="05ac", ENV{ID_MODEL}=="8203" RUN+="/usr/sbin/hid2hci --method csr -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hid" +#ACTION=="add", ENV{ID_VENDOR}=="05ac", ENV{ID_MODEL}=="8204" RUN+="/usr/sbin/hid2hci --method csr -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hid" +#ACTION=="add", ENV{ID_VENDOR}=="05ac", ENV{ID_MODEL}=="8207" RUN+="/usr/sbin/hid2hci --method csr -v $env{ID_VENDOR} -p $env{ID_MODEL} --mode hid" diff --git a/scripts/bluetooth.rules b/scripts/bluetooth-serial.rules index 072335f6..072335f6 100644 --- a/scripts/bluetooth.rules +++ b/scripts/bluetooth-serial.rules diff --git a/scripts/bluetooth.default b/scripts/bluetooth.default index b0c4493b..cdf37fa1 100644 --- a/scripts/bluetooth.default +++ b/scripts/bluetooth.default @@ -1,4 +1 @@ # Bluetooth configuraton file - -# Run hid2hci (allowed values are "true" and "false") -HID2HCI_ENABLE=true diff --git a/scripts/bluetooth.init b/scripts/bluetooth.init index ee12408b..3ea8a89b 100644 --- a/scripts/bluetooth.init +++ b/scripts/bluetooth.init @@ -10,13 +10,10 @@ NAME=bluetooth DESC="Bluetooth subsystem" DAEMON_NAME=bluetoothd -HID2HCI_NAME=hid2hci DAEMON_EXEC="`which $DAEMON_NAME || true`" -HID2HCI_EXEC="`which $HID2HCI_NAME || true`" DAEMON_ENABLE=true -HID2HCI_ENABLE=false [ -e /etc/default/bluetooth ] && . /etc/default/bluetooth @@ -27,10 +24,6 @@ case "$1" in $DAEMON_EXEC echo -n " $DAEMON_NAME" fi - if $HID2HCI_ENABLE && [ -x "$HID2HCI_EXEC" ] ; then - $HID2HCI_EXEC --tohci > /dev/null 2>&1 || true - echo -n " $HID2HCI_NAME" - fi echo "." ;; stop) |