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

Some USB devices uses several report IDs #121

Open
gyurco opened this issue Oct 7, 2024 · 2 comments
Open

Some USB devices uses several report IDs #121

gyurco opened this issue Oct 7, 2024 · 2 comments

Comments

@gyurco
Copy link
Contributor

gyurco commented Oct 7, 2024

See

https://www.atari-forum.com/viewtopic.php?p=470071#p470071

@gyurco
Copy link
Contributor Author

gyurco commented Oct 7, 2024

Meanwhile I discovered in vebxenon's mouse that several report id's have report_size, but not report_count, so the last value is re-used, but not what's defined in the previous, skipped report:

HIDP: REPORT_ID(18)
HIDP:   - total bit count: 40 (5 bytes, 0 bits)
HIDP:   - report 16 is usable
HIDP: USAGE(72/0x48)
HIDP:  -> UNSUPPORTED USAGE
HIDP: REPORT_COUNT(1)
HIDP: REPORT_SIZE(2)
HIDP: LOGICAL_MINIMUM(0/0)
HIDP: LOGICAL_MAXIMUM(1)
HIDP: PHYSICAL_MINIMUM(1/1)
HIDP: PHYSICAL_MAXIMUM(1)
HIDP: FEATURE(2)

HIDP: REPORT_ID(16)
HIDP:   - total bit count: 40 (5 bytes, 0 bits)
HIDP:   - report 16 is usable
HIDP: USAGE(56/0x38)
HIDP:  -> axis usage
HIDP: MOUSE: found wheel @ 1
HIDP: PHYSICAL_MINIMUM(0/0)
HIDP: PHYSICAL_MAXIMUM(0)
HIDP: LOGICAL_MINIMUM(129/129)
HIDP: LOGICAL_MAXIMUM(127)
HIDP: REPORT_SIZE(8)
HIDP:   (Z-AXIS @ 48 (byte 6, bit 0))
HIDP: INPUT(6)
HIDP: END_COLLECTION(0)
HIDP:   -> phys/log end
HIDP: COLLECTION(2)
HIDP:   -> logical
HIDP: REPORT_ID(18)
HIDP:   - total bit count: 56 (7 bytes, 0 bits)

Here bit count incremented by 2x8, however I guess it should be 1x8 only, so you're right about not skipping global items. No need to worry about min-max values, they're defined if changed.
That way even my patch ends up at 56 bits.
Need to dig through that HID specs...

@gyurco
Copy link
Contributor Author

gyurco commented Oct 7, 2024

Also noticed the usage_count difference with the wheel. Probably your version is the good one, as 'found wheel @ 0' looks right instead of '@ 1'.

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

1 participant