re-trigger hid2hci switching for logitech devices
PATCH 1/1 re-trigger hid2hci switching for logitech devices
Hey,
Logitech usb bluetooth dongles that have a HID mode need to be retriggered into HCI mode after S3 just like Dell ones otherwise they'll just disappear and my bluetooth stops working :/
See attached patch for a potential fix.
Sjoerd
Signature · 1 line
Death is God's way of telling you not to be such a wise guy.
From 95c18dd070e00a3a641b70fbedcbccb878e817ad Mon Sep 17 00:00:00 2001
From: Sjoerd Simons <[email protected]>
Date: Tue, 23 Mar 2010 23:31:38 +0000
Subject: [PATCH] hid2hci: re-trigger switching for logitech devices after S3
When going to S3 logitech usb dongles will loose their bluetooth interface, so the switch needs to be retriggered afterwards in the same way that's needed for Dell devices.
--- extras/hid2hci/70-hid2hci.rules | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
extras/hid2hci/70-hid2hci.rules +6 -5
@@ -12,14 +12,15 @@ ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProt # Logitech devices KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \ - RUN+="hid2hci --method=logitech-hid --devpath=%p" + RUN+="hid2hci --method=logitech-hid --devpath=%p", ENV{HID2HCI_SWITCH}="1" ENV{DEVTYPE}!="usb_device", GOTO="hid2hci_end" -# When a Dell device recovers from S3, the mouse child needs to be repoked -# Unfortunately the only event seen is the BT device disappearing, so the mouse -# device needs to be chased down on the USB bus. -ATTR{bDeviceClass}=="e0", ATTR{bDeviceSubClass}=="01", ATTR{bDeviceProtocol}=="01", ATTR{idVendor}=="413c", \ +# When a Dell device recovers from S3 or a logitech usb dongle is connected +# during S3, the mouse child needs to be repoked Unfortunately the only event +# seen is the BT device disappearing, so the mouse device needs to be chased +# down on the USB bus. +ATTR{bDeviceClass}=="e0", ATTR{bDeviceSubClass}=="01", ATTR{bDeviceProtocol}=="01", ATTR{idVendor}=="413c|046d", \ ENV{REMOVE_CMD}="/sbin/udevadm trigger --action=change --subsystem-match=usb --property-match=HID2HCI_SWITCH=1" # CSR devices
Signature · 1 line
1.7.0.3
Quoted 3 lines · Sjoerd Simons
Logitech usb bluetooth dongles that have a HID mode need to be retriggered into HCI mode after S3 just like Dell ones otherwise they'll just disappear and my bluetooth stops working :/
Nothing against the patch in particular. It seems reasonable from the point we are at at the moment.
But Marcel, are we really sure, we want to go through all this crap in userspace? Isn't it much simpler to do this from inside the kernel, it seems odd to do this in udev as such a fragile magic.
Kay
Hi Kay,
Quoted 10 lines
Quoted 3 lines
Logitech usb bluetooth dongles that have a HID mode need to be retriggered into HCI mode after S3 just like Dell ones otherwise they'll just disappear and my bluetooth stops working :/
Nothing against the patch in particular. It seems reasonable from the point we are at at the moment.
But Marcel, are we really sure, we want to go through all this crap in userspace? Isn't it much simpler to do this from inside the kernel, it seems odd to do this in udev as such a fragile magic.
we might should just do it inside the kernel. Especially since we now have a proper HID bus for vendor specific drivers available. Not that there are clear direction right now, but it would be worth to spent some time to investigate it.
Regards
Marcel