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

FeatureReportByteLength of blink(1) is 9 instead of 8 #675

Open
kissfrog opened this issue Sep 19, 2023 · 3 comments
Open

FeatureReportByteLength of blink(1) is 9 instead of 8 #675

kissfrog opened this issue Sep 19, 2023 · 3 comments

Comments

@kissfrog
Copy link

Tried to get caps via HidP_GetCaps API on Windows, and it turned out that FeatureReportByteLength is 9, which is different from the doc:

The blink(1) feature report packet is 8 bytes long.

Why?

@todbot
Copy link
Owner

todbot commented Sep 19, 2023

HID reports with Report IDs are one byte bigger than what's in the HID Report Descriptor, in order to hold the Report ID.

@kissfrog
Copy link
Author

HID reports with Report IDs are one byte bigger than what's in the HID Report Descriptor, in order to hold the Report ID.

But as per your document, the first byte is also already report_id:

- byte 0 = 0x01  (report_id )
- byte 1 = 'c'   (command "fade to rgb")
- byte 2 = red value
- byte 3 = green value
- byte 4 = blue value
- byte 5 = th    (fadeMillis/10 high byte)
- byte 6 = tl    (fadeMillis/10 low byte)
- byte 7 = ledn  (unused on mk1, 0=all on mk2) 

So actually the byte 8 exists, but always set as 0?

@kissfrog
Copy link
Author

And what's the HID Report Descriptor part of blink(1)? From byte 1 to byte 8 (and the byte 8 is omitted)?

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

No branches or pull requests

2 participants