Skip to contentSkip to conversation

hid2hci rules breaks standard USB dell mouses

DISCUSSION Ozan Çağlayan 4 participants 7 messages Oct 23, 2009 – Nov 5, 2009

Subsystems (2)
lore
Share & tools
lore
#1 lore raw

Don't use the rules and tool in bluez, they're broke.

Use the rules in udev.

Quoted 14 lines · Ozan Çağlayan

https://bugzilla.novell.com/show_bug.cgi?id=522287

It seems that the rules matches some other devices than hid proxies trying to switch them to HCI mode causing the mouse to be nonfunctional.

Just wanted to report it the correct list for a correct solution.

Regards,
Ozan Caglayan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 3 lines
Mario Limonciello
*Dell | Linux Engineering*
[email protected]
maintainer
#2 lore raw

Hi Mario,

no TOP POSTING.

Quoted 3 lines

Don't use the rules and tool in bluez, they're broke.

Use the rules in udev.

and please send a patch to fix the ones in BlueZ, too.

Regards

Marcel

#3 lore raw

Hi Marcel:

Quoted 2 lines · Marcel Holtmann

and please send a patch to fix the ones in BlueZ, too

I sent a patch to drop it from bluez so it doesn't have to be maintained in two places, but it was never responded to. Here it is again taken from my mail archive.

Regards

Signature · 3 lines
Mario Limonciello
*Dell | Linux Engineering*
[email protected]

From 5a631382e95a08ba69561d18ff48098c12e0a217 Mon Sep 17 00:00:00 2001
From: Mario Limonciello <[email protected]>
Date: Sun, 14 Jun 2009 09:59:19 -0500
Subject: [PATCH] Remove hid2hci from bluez.
It's now been moved into udev-extras
and will be maintained there instead.

---
 acinclude.m4                    |    6 -
 bootstrap-configure             |    1 -
 scripts/Makefile.am             |    8 +-
 scripts/bluetooth-hid2hci.rules |   36 ----
 tools/Makefile.am               |   18 +--
 tools/hid2hci.8                 |   51 ------
 tools/hid2hci.c                 |  375 ---------------------------------------
 7 files changed, 5 insertions(+), 490 deletions(-)
 delete mode 100644 scripts/bluetooth-hid2hci.rules
 delete mode 100644 tools/hid2hci.8
 delete mode 100644 tools/hid2hci.c
acinclude.m4 +0 -6
index eb7cdeb..ce716de 100644
@@ -193,7 +193,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [
 	cups_enable=no
 	test_enable=no
 	bccmd_enable=no
-	hid2hci_enable=no
 	dfutool_enable=no
 	manpages_enable=yes
 	configfiles_enable=yes
@@ -253,10 +252,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [
 		bccmd_enable=${enableval}
 	])
 
-	AC_ARG_ENABLE(hid2hci, AC_HELP_STRING([--enable-hid2hci], [install HID mode switching utility]), [
-		hid2hci_enable=${enableval}
-	])
-
 	AC_ARG_ENABLE(dfutool, AC_HELP_STRING([--enable-dfutool], [install DFU firmware upgrade utility]), [
 		dfutool_enable=${enableval}
 	])
@@ -351,7 +346,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [
 	AM_CONDITIONAL(TEST, test "${test_enable}" = "yes")
 	AM_CONDITIONAL(TOOLS, test "${tools_enable}" = "yes")
 	AM_CONDITIONAL(BCCMD, test "${bccmd_enable}" = "yes")
-	AM_CONDITIONAL(HID2HCI, test "${hid2hci_enable}" = "yes" && test "${usb_found}" = "yes")
 	AM_CONDITIONAL(DFUTOOL, test "${dfutool_enable}" = "yes" && test "${usb_found}" = "yes")
 	AM_CONDITIONAL(MANPAGES, test "${manpages_enable}" = "yes")
 	AM_CONDITIONAL(CONFIGFILES, test "${configfiles_enable}" = "yes")
bootstrap-configure +0 -1
index 5ec8e4c..f865c39 100755
@@ -20,7 +20,6 @@ fi
 		--enable-tools \
 		--enable-bccmd \
 		--enable-dfutool \
-		--enable-hid2hci \
 		--enable-hidd \
 		--enable-pand \
 		--enable-dund \
scripts/Makefile.am +2 -6
index 494a9c2..311f5c7 100644
@@ -4,10 +4,6 @@ rulesdir = $(sysconfdir)/udev
 
 rules_DATA =
 
-if HID2HCI
-rules_DATA += bluetooth-hid2hci.rules
-endif
-
 if PCMCIARULES
 rules_DATA += bluetooth-serial.rules
 endif
@@ -19,8 +15,8 @@ udevdir = $(libexecdir)/udev
 udev_SCRIPTS = bluetooth_serial
 endif
 
-EXTRA_DIST = bluetooth.init bluetooth.default bluetooth-hid2hci.rules \
-				bluetooth-serial.rules bluetooth_serial
+EXTRA_DIST = bluetooth.init bluetooth.default bluetooth-serial.rules\
+				bluetooth_serial
 
 MAINTAINERCLEANFILES = Makefile.in
 
scripts/bluetooth-hid2hci.rules deleted +0 -36
deleted file mode 100644
index 1b231d1..0000000
@@ -1,36 +0,0 @@
-# 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"
tools/Makefile.am +3 -15
index 6b0ad49..887b4ee 100644
@@ -15,14 +15,6 @@ bccmd_programs =
 bccmd_manfiles =
 endif
 
-if HID2HCI
-hid2hci_programs = hid2hci
-hid2hci_manfiles = hid2hci.8
-else
-hid2hci_programs =
-hid2hci_manfiles =
-endif
-
 if DFUTOOL
 dfutool_programs = dfutool
 dfutool_manfiles = dfutool.1
@@ -37,7 +29,7 @@ else
 usb_programs =
 endif
 
-sbin_PROGRAMS = hciattach hciconfig $(bccmd_programs) $(avctrl_programs) $(hid2hci_programs)
+sbin_PROGRAMS = hciattach hciconfig $(bccmd_programs) $(avctrl_programs)
 
 bin_PROGRAMS = $(tools_programs) $(dfutool_programs) $(dfubabel_programs)
 
@@ -77,10 +69,6 @@ bccmd_LDADD += @USB_LIBS@
 endif
 endif
 
-if HID2HCI
-hid2hci_LDADD = @USB_LIBS@
-endif
-
 if DFUTOOL
 dfutool_SOURCES = dfutool.c dfu.h dfu.c
 dfutool_LDADD = @USB_LIBS@
@@ -97,10 +85,10 @@ INCLUDES = -I$(top_srcdir)/common
 
 if MANPAGES
 man_MANS = hciattach.8 hciconfig.8 $(tools_manfiles) \
-		$(bccmd_manfiles) $(hid2hci_manfiles) $(dfutool_manfiles)
+		$(bccmd_manfiles) $(dfutool_manfiles)
 endif
 
 EXTRA_DIST = hciattach.8 hciconfig.8 hcitool.1 l2ping.1 sdptool.1 ciptool.1 \
-		 bccmd.8 avctrl.8 hid2hci.8 dfutool.1 dfubabel.1 example.psr
+		 bccmd.8 avctrl.8 dfutool.1 dfubabel.1 example.psr
 
 MAINTAINERCLEANFILES = Makefile.in
tools/hid2hci.8 deleted +0 -51

51 lines not on this page · raw message

tools/hid2hci.c deleted +0 -375

375 lines not on this page · raw message

Signature · 1 line
1.6.0.4
#4 lore raw
Quoted 8 lines · On Tue, 27 Oct 2009 16:24:44 -0500 Mario Limonciello…

Hi Marcel:

Quoted 2 lines · Marcel Holtmann

and please send a patch to fix the ones in BlueZ, too

I sent a patch to drop it from bluez so it doesn't have to be maintained in two places, but it was never responded to. Here it is again taken from my mail archive.

Maybe a compromise for the near future:
* update the rules / tools in bluez to be in sync with udev
* don't install them by default unless "--enable-old-udev" (or something like that) is ./configure'd

Reasoning:
* people might want to use new bluez with old udev (I personally would avoid updating udev in a running system since it seems to interdepend on many things. Updating bluez has been painless for me over the last years).

Marcel, Mario, does this sound acceptable? If yes, I am willing to prepare a patch.

Have fun,

seife

Signature · 4 lines
Stefan Seyfried

"Any ideas, John?"
"Well, surrounding them's out."
#5 lore raw

Stefan:

Quoted 8 lines · Stefan Seyfried

On Tue, 27 Oct 2009 16:24:44 -0500
Mario Limonciello <[email protected]> wrote:

Maybe a compromise for the near future:
* update the rules / tools in bluez to be in sync with udev
* don't install them by default unless "--enable-old-udev" (or something like that) is ./configure'd

Quoted 9 lines

Reasoning:
* people might want to use new bluez with old udev (I personally would avoid updating udev in a running system since it seems to interdepend on many things. Updating bluez has been painless for me over the last years).

Marcel, Mario, does this sound acceptable? If yes, I am willing to prepare a patch.

Since Marcel doesn't seem keen on my dropping support in BlueZ for hid2hci (the patch has been ignored twice now), i'm fine with this.

Signature · 3 lines
Mario Limonciello
*Dell | Linux Engineering*
[email protected]
#6 lore raw
In reply to Mario Limonciello
Quoted 5 lines · Mario Limonciello

Don't use the rules and tool in bluez, they're broke.

Use the rules in udev.

So why do we still have that broken tool and rules in bluez? Either they should be in sync with udev or it should be dropped.

Thanks,