You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing one byte feature report read under Windows for devices without report id #328
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.
After reading the documentation for IOCTL_HID_GET_INPUT_REPORT and IOCTL_HID_GET_FEATURE one more time, combined with your test results, I believe input_report is as broken as feature_report
After reading the documentation for IOCTL_HID_GET_INPUT_REPORT and IOCTL_HID_GET_FEATURE one more time, combined with your test results, I believe input_report is as broken as feature_report
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.
After reading the documentation for IOCTL_HID_GET_INPUT_REPORT and IOCTL_HID_GET_FEATURE one more time, combined with your test results, I believe input_report is as broken as feature_report
Even though I can not use hidapitester to test the input report, but I agree with you after reading the documentation one more time.
Activity
mcuee commentedon Aug 30, 2021
#285 (comment)
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.
https://github.com/todbot/hidapitester/blob/master/hidapitester.c#L379
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.
https://github.com/todbot/hidapitester/blob/master/hidapitester.c#L403
Youw commentedon Sep 4, 2021
Do you think we need to do the same as we do for macOS?
mcuee commentedon Sep 5, 2021
Yes I think that will fix this issue.
Youw commentedon Sep 22, 2021
I think this one is worth fixing before releasing v0.11.0
Youw commentedon Sep 22, 2021
After reading the documentation for
IOCTL_HID_GET_INPUT_REPORTandIOCTL_HID_GET_FEATUREone more time, combined with your test results, I believeinput_reportis as broken asfeature_reportWindows: hid_get_feature/input_report return size fix (#334)
Windows: hid_get_feature/input_report return size fix (#334)
mcuee commentedon Sep 23, 2021
Let me test out #334 over the weekend.
mcuee commentedon Sep 27, 2021
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.
mcuee commentedon Sep 27, 2021
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 .
mcuee commentedon Sep 27, 2021
hdiapitester can not be used to test #334 though as it uses hid_read_timeout().
#285 (comment)
mcuee commentedon Sep 27, 2021
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
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/hidclass/ni-hidclass-ioctl_hid_get_input_report
Windows: hid_get_feature/input_report return size fix (#334)