Hi: Attached is a patch that adds another set of udev rules that will run hid2hci, at least for the Dell BT adapters. Other adapters can get added in too, but I think some more attributes will be needed for them. I'm doing this as a separate set of udev rules than the PCMCIA rules so that these can be installed by default whereas the PCMCIA ones are normally placed in a different binary package for distros. Regards -- Mario Limonciello *Dell | Linux Engineering* mario_limonciello@xxxxxxxx
diff -Nur -x '*.orig' -x '*~' bluez-4.12/scripts/bluetooth.rules bluez-4.12.new/scripts/bluetooth.rules --- bluez-4.12/scripts/bluetooth.rules 2008-10-07 13:28:29.000000000 -0500 +++ bluez-4.12.new/scripts/bluetooth.rules 1969-12-31 18:00:00.000000000 -0600 @@ -1,35 +0,0 @@ -# Brain Boxes BL-620 Bluetooth Adapter -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="Brain Boxes", SYSFS{prod_id2}=="Bluetooth PC Card", ENV{HCIOPTS}="bboxes", RUN+="bluetooth_serial" - -# Xircom CreditCard Bluetooth Adapter -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="Xircom", SYSFS{prod_id3}=="CBT", ENV{HCIOPTS}="xircom", RUN+="bluetooth_serial" - -# Xircom RealPort2 Bluetooth Adapter -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="Xircom", SYSFS{prod_id3}=="CBT", ENV{HCIOPTS}="xircom", RUN+="bluetooth_serial" - -# IBM Bluetooth PC Card II -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="IBM", SYSFS{prod_id2}=="Bluetooth PC Card II", ENV{HCIOPTS}="tdk", RUN+="bluetooth_serial" - -# TDK Bluetooth PC Card -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="TDK", SYSFS{prod_id2}=="Bluetooth PC Card II", ENV{HCIOPTS}="tdk", RUN+="bluetooth_serial" - -# AmbiCom BT2000C Bluetooth PC/CF Card -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="AmbiCom BT2000C", SYSFS{prod_id2}=="Bluetooth PC/CF Card", ENV{HCIOPTS}="bt2000c", RUN+="bluetooth_serial" - -# COM One Platinium Bluetooth PC Card -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="COM1 SA", SYSFS{prod_id2}=="MC310 CARD", ENV{HCIOPTS}="comone", RUN+="bluetooth_serial" - -# Sphinx PICO Card -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="SPHINX", SYSFS{prod_id2}=="BT-CARD", ENV{HCIOPTS}="picocard", RUN+="bluetooth_serial" - -# H-Soft blue+Card -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="H-Soft", SYSFS{prod_id2}=="Blue+CARD", ENV{HCIOPTS}="$sysfs{manf_id},$sysfs{card_id}", RUN+="bluetooth_serial" - -# Compaq iPAQ Bluetooth Sleeve, Belkin F8T020, any other muppet who used an OXCF950 and didn't bother to program it appropriately. -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="CF CARD", SYSFS{prod_id2}=="GENERIC", ENV{HCIOPTS}="$sysfs{manf_id},$sysfs{card_id}", RUN+="bluetooth_serial" - -# Zoom Bluetooth Card and Sitecom CN-504 Card -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="PCMCIA", SYSFS{prod_id2}=="Bluetooth Card", ENV{HCIOPTS}="zoom", RUN+="bluetooth_serial" - -# CC&C BT0100M -SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="Bluetooth BT0100M", ENV{HCIOPTS}="bcsp 115200", RUN+="bluetooth_serial" diff -Nur -x '*.orig' -x '*~' bluez-4.12/scripts/hid2hci.rules bluez-4.12.new/scripts/hid2hci.rules --- bluez-4.12/scripts/hid2hci.rules 1969-12-31 18:00:00.000000000 -0600 +++ bluez-4.12.new/scripts/hid2hci.rules 2008-10-23 15:09:14.000000000 -0500 @@ -0,0 +1,8 @@ +#UDEV Rules to match on Bluetooth USB dongles that need to be switched to HCI mode upon +#being plugged into the PC's USB bus. + +#This rule covers a variety of Dell Bluetooth adapters +# 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. +ACTION=="add", SYSFS{idVendor}=="413c", ATTRS{bInterfaceProtocol}=="02", ATTRS{bmAttributes}=="e0", RUN+="/usr/sbin/hid2hci --tohci" diff -Nur -x '*.orig' -x '*~' bluez-4.12/scripts/Makefile.am bluez-4.12.new/scripts/Makefile.am --- bluez-4.12/scripts/Makefile.am 2008-10-07 13:28:29.000000000 -0500 +++ bluez-4.12.new/scripts/Makefile.am 2008-10-23 15:11:15.000000000 -0500 @@ -2,14 +2,14 @@ if PCMCIARULES rulesdir = $(sysconfdir)/udev -rules_DATA = bluetooth.rules +rules_DATA = pcmcia.rules udevdir = $(libexecdir)/udev udev_SCRIPTS = bluetooth_serial endif -EXTRA_DIST = bluetooth.rules bluetooth_serial bluetooth.init bluetooth.default +EXTRA_DIST = pcmcia.rules bluetooth_serial bluetooth.init bluetooth.default hid2hci.rules MAINTAINERCLEANFILES = Makefile.in @@ -24,3 +24,9 @@ @rm -f $(DESTDIR)$(sysconfdir)/init.d/bluetooth @rm -f $(DESTDIR)$(sysconfdir)/default/bluetooth endif + +install-data-pm: + $(INSTALL) -D -m 644 $(srcdir)/hid2hci.rules $(DESTDIR)$(rulesdir)/rules.d/62-bluez-hid2hci.rules + +uninstall-pm: + @rm -f $(DESTDIR)$(rulesdir)/rules.d/62-bluez-hid2hci.rules diff -Nur -x '*.orig' -x '*~' bluez-4.12/scripts/Makefile.in bluez-4.12.new/scripts/Makefile.in --- bluez-4.12/scripts/Makefile.in 2008-10-07 13:28:29.000000000 -0500 +++ bluez-4.12.new/scripts/Makefile.in 2008-10-23 15:13:03.000000000 -0500 @@ -189,10 +189,10 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @PCMCIARULES_TRUE@rulesdir = $(sysconfdir)/udev -@PCMCIARULES_TRUE@rules_DATA = bluetooth.rules +@PCMCIARULES_TRUE@rules_DATA = pcmcia.rules @PCMCIARULES_TRUE@udevdir = $(libexecdir)/udev @PCMCIARULES_TRUE@udev_SCRIPTS = bluetooth_serial -EXTRA_DIST = bluetooth.rules bluetooth_serial bluetooth.init bluetooth.default +EXTRA_DIST = pcmcia.rules bluetooth_serial bluetooth.init bluetooth.default hid2hci.rules MAINTAINERCLEANFILES = Makefile.in all: all-am @@ -354,7 +354,7 @@ info-am: install-data-am: install-data-local install-rulesDATA \ - install-udevSCRIPTS + install-udevSCRIPTS install-data-pm install-dvi: install-dvi-am @@ -416,6 +416,12 @@ @INITSCRIPTS_TRUE@uninstall-local: @INITSCRIPTS_TRUE@ @rm -f $(DESTDIR)$(sysconfdir)/init.d/bluetooth @INITSCRIPTS_TRUE@ @rm -f $(DESTDIR)$(sysconfdir)/default/bluetooth + +install-data-pm: + $(INSTALL) -D -m 644 $(srcdir)/hid2hci.rules $(DESTDIR)$(rulesdir)/rules.d/62-bluez-hid2hci.rules + +uninstall-local: + @rm -f $(DESTDIR)$(rulesdir)/rules.d/62-bluez-hid2hci.rules # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nur -x '*.orig' -x '*~' bluez-4.12/scripts/pcmcia.rules bluez-4.12.new/scripts/pcmcia.rules --- bluez-4.12/scripts/pcmcia.rules 1969-12-31 18:00:00.000000000 -0600 +++ bluez-4.12.new/scripts/pcmcia.rules 2008-10-23 15:09:14.000000000 -0500 @@ -0,0 +1,35 @@ +# Brain Boxes BL-620 Bluetooth Adapter +SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="Brain Boxes", SYSFS{prod_id2}=="Bluetooth PC Card", ENV{HCIOPTS}="bboxes", RUN+="bluetooth_serial" + +# Xircom CreditCard Bluetooth Adapter +SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="Xircom", SYSFS{prod_id3}=="CBT", ENV{HCIOPTS}="xircom", RUN+="bluetooth_serial" + +# Xircom RealPort2 Bluetooth Adapter +SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="Xircom", SYSFS{prod_id3}=="CBT", ENV{HCIOPTS}="xircom", RUN+="bluetooth_serial" + +# IBM Bluetooth PC Card II +SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="IBM", SYSFS{prod_id2}=="Bluetooth PC Card II", ENV{HCIOPTS}="tdk", RUN+="bluetooth_serial" + +# TDK Bluetooth PC Card +SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="TDK", SYSFS{prod_id2}=="Bluetooth PC Card II", ENV{HCIOPTS}="tdk", RUN+="bluetooth_serial" + +# AmbiCom BT2000C Bluetooth PC/CF Card +SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="AmbiCom BT2000C", SYSFS{prod_id2}=="Bluetooth PC/CF Card", ENV{HCIOPTS}="bt2000c", RUN+="bluetooth_serial" + +# COM One Platinium Bluetooth PC Card +SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="COM1 SA", SYSFS{prod_id2}=="MC310 CARD", ENV{HCIOPTS}="comone", RUN+="bluetooth_serial" + +# Sphinx PICO Card +SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="SPHINX", SYSFS{prod_id2}=="BT-CARD", ENV{HCIOPTS}="picocard", RUN+="bluetooth_serial" + +# H-Soft blue+Card +SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="H-Soft", SYSFS{prod_id2}=="Blue+CARD", ENV{HCIOPTS}="$sysfs{manf_id},$sysfs{card_id}", RUN+="bluetooth_serial" + +# Compaq iPAQ Bluetooth Sleeve, Belkin F8T020, any other muppet who used an OXCF950 and didn't bother to program it appropriately. +SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="CF CARD", SYSFS{prod_id2}=="GENERIC", ENV{HCIOPTS}="$sysfs{manf_id},$sysfs{card_id}", RUN+="bluetooth_serial" + +# Zoom Bluetooth Card and Sitecom CN-504 Card +SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="PCMCIA", SYSFS{prod_id2}=="Bluetooth Card", ENV{HCIOPTS}="zoom", RUN+="bluetooth_serial" + +# CC&C BT0100M +SUBSYSTEM=="tty", BUS=="pcmcia", SYSFS{prod_id1}=="Bluetooth BT0100M", ENV{HCIOPTS}="bcsp 115200", RUN+="bluetooth_serial"
Attachment:
signature.asc
Description: OpenPGP digital signature