Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Detecting HID devices in non-default configurations: (1 Item)
   
Detecting HID devices in non-default configurations  
Hello,

I'm trying to write a client of the io-hid manager to support devices which only present a HID interface in a non-
default USB configuration. I was having a problem that io-hid didn't trigger insertions for the device, even when I used
 an enum-usb script to place it in the correct USB configuration.

I've discovered a work-around which is to write an enum-devices script to re-mount devh-usb.so on io-hid, which seems to
 trigger the correct insertion callback in my client code. However, this has the unwanted side-effect of causing all 
existing HID devices to be removed and then re-inserted (only at the io-hid interface, not at the USB level). This 
causes me problems since the devices are stateful and if I connect to them as if they were newly inserted then the 
negotiation will fail.

Could anybody suggest a way to cause devh-usb.so to re-scan for new HID devices in a way which doesn't disconnect 
already-connected ones?

It appears that whatever scan it does at startup detects devices with a HID interface in their current configuration, 
but after this initial scan it only seems to be notified of new devices if they have a HID interface in their *default* 
configuration. If I can find a way to trigger whatever scan it does at startup without causing removal notifications for
 existing devices, I can trigger this from my enum-devices script and the problem will be solved.

Any ideas anyone could share would be very gratefully received.