-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows backend represents USB Composite Devices different than the other backends #287
Comments
Please see my answed: #249 (comment) |
The biggest problem is: even if you need to open only a single Top Level collection, HIDAPI probably would need to open all of the devices (and those might not be available) and check to which device send each report in runtime. Which is both a runtime overhead and so much complicated windows backend. |
@JoergAtGithub This is the exact problem with libusb windows backend which now becomes very complicated and lagging behind the Linux/macOS backend.
|
In the very beginning of libusb project, Pete Batard spent lots of effort to try to bridge Windows (individual interface) with Linux/macOS (whold device). |
History posts: the following thread is worth reading. From Tim Roberts:
You can read Pete's answer as well and he spent significant efforts to get libusb Windows working. But then you can see now it is not easy to maintain (Chris has done a good job here). |
Let me add, that this issue is not important for myself, I just wanted to seperate the discussion from the Report Descriptor issue, which is important for me. |
From #249 comments from Youw .
|
And actually under Linux, I can see my USB Composite Device (Logitech Unifying Receiver) is also represented by multiple devices with hidapi hidraw backend.
|
libusb backend is a bit different.
|
We haven't implemented the "split by usage_page/usage" for libusb yet. |
I think we can close this issue now. |
To create cross-platform applications on top of HIDAPI, the API must behave the same on all platforms/backends. This is not the case for USB Composite Devices with multiple top level collections. The windows backend represents them as multiple HID devices, while othere backends represent them as one HID device.
This behavior was discussed and documented in the following unrelated issue here: #249 (comment)
A proper fix of the Windows backend would require, to group these virtual devices during device enumeration and represent them to the API as the same single HID device as on other platforms.
The text was updated successfully, but these errors were encountered: