All of lore.kernel.org
 help / color / mirror / Atom feed
* hid2hci in udev rule not working
@ 2009-04-21 16:23 Nicolò Chieffo
  2009-04-22 21:49 ` Mario Limonciello
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolò Chieffo @ 2009-04-21 16:23 UTC (permalink / raw)
  To: linux-bluetooth

Hello, I own a laptop with a bluetooth which is automatically detected
as a HID device if I switch it on when ubuntu is running.
in lsusb I see those 2 lines, for HID mouse and keyboard

Bus 003 Device 010: ID 413c:8158 Dell Computer Corp.
Bus 003 Device 009: ID 413c:8157 Dell Computer Corp.

the package bluez 4.32 which I have installed from Jaunty, includes
the file /lib/udev/rules.d/62-bluez-hid2hci.rules with the content:
ACTION=="add", ATTRS{idVendor}=="413c",
ATTRS{bInterfaceProtocol}=="02", ATTRS{bmAttributes}=="e0",
RUN+="/usr/sbin/hid2hci --tohci"

unfortunately when I enable the bluetooth switch, the udev rule is not
called. in my dmesg I see:
[ 1090.952069] usb 3-1: new full speed USB device using uhci_hcd and address 15
[ 1091.129216] usb 3-1: configuration #1 chosen from 1 choice
[ 1091.131133] hub 3-1:1.0: USB hub found
[ 1091.134459] hub 3-1:1.0: 3 ports detected
[ 1091.414110] usb 3-1.1: new full speed USB device using uhci_hcd and
address 16
[ 1091.532208] usb 3-1.1: configuration #1 chosen from 1 choice
[ 1091.539342] input: HID 413c:8157 as
/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.1/3-1.1:1.0/input/input21
[ 1091.565146] generic-usb 0003:413C:8157.0009: input,hidraw0: USB HID
v1.11 Keyboard [HID 413c:8157] on usb-0000:00:1a.0-1.1/input0
[ 1091.641085] usb 3-1.2: new full speed USB device using uhci_hcd and
address 17
[ 1091.763220] usb 3-1.2: configuration #1 chosen from 1 choice
[ 1091.770411] input: HID 413c:8158 as
/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0/input/input22
[ 1091.805156] generic-usb 0003:413C:8158.000A: input,hidraw1: USB HID
v1.11 Mouse [HID 413c:8158] on usb-0000:00:1a.0-1.2/input0

can you help me on making this rule work?
please CC me to replies since I'm not subscribed to the list.
Thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: hid2hci in udev rule not working
  2009-04-21 16:23 hid2hci in udev rule not working Nicolò Chieffo
@ 2009-04-22 21:49 ` Mario Limonciello
  2009-04-22 22:37   ` Nicolò Chieffo
  0 siblings, 1 reply; 3+ messages in thread
From: Mario Limonciello @ 2009-04-22 21:49 UTC (permalink / raw)
  To: Nicolò Chieffo; +Cc: linux-bluetooth


[-- Attachment #1.1: Type: text/plain, Size: 2680 bytes --]

Hi Nicolò:

Nicolò Chieffo wrote:
> Hello, I own a laptop with a bluetooth which is automatically detected
> as a HID device if I switch it on when ubuntu is running.
> in lsusb I see those 2 lines, for HID mouse and keyboard
>
> Bus 003 Device 010: ID 413c:8158 Dell Computer Corp.
> Bus 003 Device 009: ID 413c:8157 Dell Computer Corp.
>
> the package bluez 4.32 which I have installed from Jaunty, includes
> the file /lib/udev/rules.d/62-bluez-hid2hci.rules with the content:
> ACTION=="add", ATTRS{idVendor}=="413c",
> ATTRS{bInterfaceProtocol}=="02", ATTRS{bmAttributes}=="e0",
> RUN+="/usr/sbin/hid2hci --tohci"
>
>   
This rule actually was denied upstream so it's carried as an Ubuntu
patch.  Upstream prefers that hid2hci be modified to take command line
arguments before accepting this type of patch.
> unfortunately when I enable the bluetooth switch, the udev rule is not
> called. in my dmesg I see:
> [ 1090.952069] usb 3-1: new full speed USB device using uhci_hcd and address 15
> [ 1091.129216] usb 3-1: configuration #1 chosen from 1 choice
> [ 1091.131133] hub 3-1:1.0: USB hub found
> [ 1091.134459] hub 3-1:1.0: 3 ports detected
> [ 1091.414110] usb 3-1.1: new full speed USB device using uhci_hcd and
> address 16
> [ 1091.532208] usb 3-1.1: configuration #1 chosen from 1 choice
> [ 1091.539342] input: HID 413c:8157 as
> /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.1/3-1.1:1.0/input/input21
> [ 1091.565146] generic-usb 0003:413C:8157.0009: input,hidraw0: USB HID
> v1.11 Keyboard [HID 413c:8157] on usb-0000:00:1a.0-1.1/input0
> [ 1091.641085] usb 3-1.2: new full speed USB device using uhci_hcd and
> address 17
> [ 1091.763220] usb 3-1.2: configuration #1 chosen from 1 choice
> [ 1091.770411] input: HID 413c:8158 as
> /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.2/3-1.2:1.0/input/input22
> [ 1091.805156] generic-usb 0003:413C:8158.000A: input,hidraw1: USB HID
> v1.11 Mouse [HID 413c:8158] on usb-0000:00:1a.0-1.2/input0
>
> can you help me on making this rule work?
> please CC me to replies since I'm not subscribed to the list.
> Thanks
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>   
It looks like for some reason or another the rule doesn't work with
newer udev versions.  Can you try the attached rule instead?  If that
works out, we can at least put that together as an Ubuntu SRU until the
device arguments get added to hid2hci.

Regards
-- 
Mario Limonciello
*Dell | Linux Engineering*
mario_limonciello@dell.com

[-- Attachment #1.2: 62-bluez-hid2hci.rules --]
[-- Type: text/plain, Size: 501 bytes --]

#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", ENV{ID_VENDOR}=="413c", ENV{ID_CLASS}=="mouse", ATTRS{bmAttributes}=="e0", KERNEL=="mouse*", RUN+="/usr/sbin/hid2hci --tohci"

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: hid2hci in udev rule not working
  2009-04-22 21:49 ` Mario Limonciello
@ 2009-04-22 22:37   ` Nicolò Chieffo
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolò Chieffo @ 2009-04-22 22:37 UTC (permalink / raw)
  To: Mario Limonciello; +Cc: linux-bluetooth

It works! Thank you very much. You can push the new version in jaunty.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-22 22:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-21 16:23 hid2hci in udev rule not working Nicolò Chieffo
2009-04-22 21:49 ` Mario Limonciello
2009-04-22 22:37   ` Nicolò Chieffo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.