Reputation: 41
I have designed a composite USB device which is a combination of a mouse and a generic HID interrupt IN/OUT device.
At interface 0, endpoint 1 I have the mouse device, which windows recognizes and uses just fine. At interface 1, I have endpoint 2 which is configured as HID interrupt in/out. This second endpoint appears to be enumerating properly, but I don't know how to specify which interface or endpoint I want to read from in C#. I can't read from the mouse because the system "owns" that but I need to read and write (IN/OUT) from the other interface. Any help would be appreciated.
Upvotes: 2
Views: 887
Reputation: 41
Figured it out. When looping through the enumerated USB devices I need to not only look at the PID and VID to make sure those match my target device, but also look at the usage page of the HIDP_CAPS structure to make sure the device usage matches as well. If it does not I need to keep looping through the structure until I find an entry where PID, VID and usage all match what I am looking for.
Upvotes: 1