-
Notifications
You must be signed in to change notification settings - Fork 398
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
Missing one byte feature report read under Windows for devices without report id #328
Comments
Just tried hidapitester with hidapi-0.10.1 release and hidapi git head, with regard to input report, the result is the same since it is using hid_read_timeout(). So #232 does not matter in that case. With regard to feature report, then the result will be different as it uses hid_get_feature_report(). So commit 6fcb0bb does matter for getting the feature report. In this particular case without report id (report id zero), it seems to me the commit is not correct.
|
Do you think we need to do the same as we do for macOS? |
Yes I think that will fix this issue. |
I think this one is worth fixing before releasing v0.11.0 |
After reading the documentation for |
- It appears when the numbered reports aren't used, WinAPI returns size of the report excluding the data[0] which contains 0, as an indication that numbered reports aren't used; Explicity count that byte in the result. Fixes: #328
- It appears when the numbered reports aren't used, WinAPI returns size of the report excluding the data[0] which contains 0, as an indication that numbered reports aren't used; Explicity count that byte in the result. Fixes: #328
Let me test out #334 over the weekend. |
Firstly for feature report for device without report ID. I think #334 is correct since it reports reading 3 bytes. Release 0.10.1 is actually correct but then 6fcb0bb introduced the regression. #334 fixes the issue in the current master.
|
Secondly for devices with report ID. No regression from the current master. Release 0.10.1 is not correct and it was fixed by 6fcb0bb .
|
hdiapitester can not be used to test #334 though as it uses hid_read_timeout(). |
Even though I can not use hidapitester to test the input report, but I agree with you after reading the documentation one more time. https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/hidclass/ni-hidclass-ioctl_hid_get_feature |
- It appears when the numbered reports aren't used, WinAPI returns size of the report excluding the data[0] which contains 0, as an indication that numbered reports aren't used; Explicity count that byte in the result. Fixes: #328
Reference here:
#285
Now I start to question the commit 6fcb0bb which I proposed in #232 with regard to feature report. It seems to be correct when the report id is not zero. However, it seems to report one less byte when there is no report id. It seems to me for Windows, we may need to report one more byte for reading of feature report when the report id is zero.
The text was updated successfully, but these errors were encountered: