1
USB / Re: USB HID Driver connecting to which interface number
« Last post by grantb5 on November 27, 2024, 01:34:16 pm »I would guess (without any evidence) that they would use the lowest interface number.
It seems to me that if the first function doesn't allow you to specify interface number then you should either:When I do my own stuff finding/connecting to a USB HID I filter on VID/PID/Interface#.
- Use the second function that takes a path and write your own helper that generates a path from VID/PID/Interface#
- Only use one HID interface and multiple HID reports. This makes sense unless the two interfaces are separately used by two applications.
Unrelated trivia: The AMD Aura USB HID (silly LED lighting) has non consecutive interface numbers which is illegal and breaks some USB libs.
Just curious how one "filters on VID/PID/Interface#"? Like the OP I am adding a 2nd interface to something that has traditionally only had 1 interface. In the old case there was no &MI_## found in the GUID/path string (result found in detailData->DevicePath). Now that the 2nd interface has been added, the string contains &MI_00 or &MI_01 depending on the interface been looked at. Are you just scanning the string for absence/0/1/etc, or is there a more clever way to tell?