How to specify Device Interface # at connection/open? #434
-
Total USB newb here. I'm trying to connect to a device (Grayhill touch encoder) that has 2 Interfaces. I can see them both clearly identified when hid_enumerate() runs through them. But where I'm confused is how to specify which interface I'm connecting to with a hid_open() command. It seems here I can only specify the Vendor, Product, and SerNo...but can't specify the interface itself. Should I be using hid_open_path(), and pulling the specific path the interface from the device_info struct I get from HID enumerate? I'm guessing this is the case, but if anyone can confirm that would be greatly appreciated. Oh, and FWIW I'm attempting to use hidapi in a multi-threaded sense, so I can separate my device reads from the writes. I see in some of the issues pages that the api isn't really thread safe, so if there's a place to go for some guidance on what not to do in multi-threaded applications that would also be helpful. Or, alternatively if there's a place to go to get some basic info on a suitable program flow for reading device reports, and writing reports please point me at it. Thanks for all the work on this API! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That is correct.
There're still some issues in some corner cases, but that is the best working solution as of right now. |
Beta Was this translation helpful? Give feedback.
That is correct.
There're still some issues in some corner cases, but that is the best working solution as of right now.