python-hid-parser
python-hid-parser copied to clipboard
Typed pure Python library to parse HID report descriptors
Can you please release a new version? The latest stable release is two years old, and there are many changes in master since then.
hid_parser is incredibly spammy for the Roccat Kone XTD ```python import hid_parser with open("/sys/class/hidraw/hidraw0/device/report_descriptor", "rb") as fd: bs = fd.read() hid_parser.ReportDescriptor(bs) ``` Yields **a lot** of warnings like this: ```...
The previous `_data_bit_shift()` appeared to assume a MSB-first bit ordering in report fields, contrary to the LSB-first ordering required by the HID specification.
Some Global descriptor items can have negative data values. Parse these correctly. This also causes the printed output to match the comments in the test descriptors. Also, correctly parse report...
The CI had a large number of errors and warnings when I tried to run it on my fork. Many problems were due to out-of-date hook versions or deprecated Python...
My Razer Huntsman Mini keyboard has some inconsistent usages/report_count which make the parser fail. This PR adds empty usages to make it consistent.
I'm getting this problem when parsing /sys/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-WCOM51E3:00/0018:056A:51E3.0007/report_descriptor Is this a missing usage page or some other problem?
``` Traceback (most recent call last): File "/home/whot/tmp/2021-12-16-Thu/test.py", line 7, in hid_parser.ReportDescriptor(bs) File "/home/whot/.local/lib/python3.10/site-packages/hid_parser/__init__.py", line 422, in __init__ self._parse() File "/home/whot/.local/lib/python3.10/site-packages/hid_parser/__init__.py", line 610, in _parse self._append_items( File "/home/whot/.local/lib/python3.10/site-packages/hid_parser/__init__.py", line 540,...
To show human-readable output, we need to add the descriptions for the usage tables in the spec. This is easy but a bit tedious. Most stuff should be in the...