Skip to content
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: Write reports one more byte written #36

Closed
dolmen opened this issue Jan 13, 2022 · 0 comments · Fixed by #38
Closed

Windows: Write reports one more byte written #36

dolmen opened this issue Jan 13, 2022 · 0 comments · Fixed by #38

Comments

@dolmen
Copy link
Contributor

dolmen commented Jan 13, 2022

Write on Windows reports one more byte written than asked for.

Internally, this is because a 0x00 byte is prepended to the data.

However:

  • this is not documented
  • this platform specific difference breaks the platform abstraction that this package is supposed to provide
dolmen added a commit to dolmen-go/legodim that referenced this issue Jan 13, 2022
Workaround for bug in github.com/karalabe/hid where Write report one
more byte written on Windows.
See karalabe/hid#36
dolmen referenced this issue in bdwyertech/hid Feb 1, 2022
dolmen referenced this issue in sl33nyc/hid Feb 1, 2022
MSI MAG321QR's usbhid device (0x1462:0x3fa4) doesn't seem to expect
the extra byte when writing from Windows.
dolmen referenced this issue in shedimonG/hid Feb 1, 2022
bearsh pushed a commit to bearsh/hid that referenced this issue Feb 1, 2022
Basically, on Windows, it's required to prepend the outgoing
data with the report id. but this is not something this shim
is supposed to do (also e.g. cython-hidapi does not do this).
furthermore, the report id could also be something != 0.

Closes: #6
See also: karalabe#36
dolmen added a commit to dolmen-go/hid that referenced this issue Feb 20, 2022
pennam pushed a commit to pennam/hid that referenced this issue Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant