Skip to content

Draft: linux/hidraw: Parse Report ID #747

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

Closed
wants to merge 1 commit into from

Conversation

tuxedo-wse
Copy link
Contributor

I didn't see a way to retrive Report IDs using hidapi, but sometimes these are required because they are optional and/or different on a per device basis and must be prefixed to reports sent. So I made this quick and currently untested Patch as a conversation starter if and how this could be added.

Or am I missing something completly?

Some reports have an optional and/or device specific Report ID that someone
sending the report need to prefix to the actual report when sending one.

This adds an easy way on Linux to retrieve that ID.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
@Youw
Copy link
Member

Youw commented May 30, 2025

  1. If you really need report IDs - you may hid_get_report_descriptor and get it yourself (preferably by parsing with some library, and not with your own implementation, like HIDAPI does).
  2. Each HID device/top-level collection may have multiple reports (input/output/feature), and not only a single one as per suggested implementation.

This can't be accepted as is for more than one reason, thus closing the PR.

@Youw Youw closed this May 30, 2025
@mcuee mcuee added enhancement New feature or request hidraw Related to Linux/hidraw backend labels May 30, 2025
@tuxedo-wse
Copy link
Contributor Author

tuxedo-wse commented May 30, 2025

kk

but:

(preferably by parsing with some library, and not with your own implementation, like HIDAPI does)

not so easy to find a good documented one, if you know of any let me know ^^

@Youw
Copy link
Member

Youw commented May 30, 2025

I personally haven't used any as of yet, so me recommending anything on this regard is as good as googling yourself (or asking an AI/LLM of any kind).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hidraw Related to Linux/hidraw backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants