-
Notifications
You must be signed in to change notification settings - Fork 415
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 report descriptor reconstructor unit test #343
Windows report descriptor reconstructor unit test #343
Conversation
…eport_descriptor_reconstructor_v2
…ptor debug printout
…eport_descriptor_reconstructor
- macOS implementation for it; - stubs for all other platforms;
…ws_report_descriptor_reconstructor
…ate to the hid_get_report_descriptor API function of PR libusb#303
- macOS implementation for it; - stubs for all other platforms;
…eport_descriptor_reconstructor
Added debug output for possible failure cases in button array code
…s_report_descriptor_reconstructor_reengineered_pp_struct
…ich contains additional elements).
…ascending order (IsMultipleItemsForArray == 1)
…tton field Restructured main item list helper functions for better readability
Cmake build is okay.
|
Zip of the dump data |
21135c4
to
e327426
Compare
@mcuee I added tests for your devices, where I could find the real report descriptor in the comments from #262/#306. Without the real report descriptor, I can't check the correctness of the generated data.
|
Unfortunately I do not know how to get the real report descriptor of the following built-in HID devices.
|
As for the Plantronics Blackwire 3220 Series 047f c056, I think I have posted it before, I get it from macOS USB Prober application. Let me check where I posted it. Edit to add: sorry the following is for 047f:c025. I will get 047f:c056 later. #306 (comment) click to expand
|
@JoergAtGithub
|
hut1_12v1_apendixB_delimiter_example.txt @mcuee: I attached a file hut1_12v1_apendixB_delimiter_example.txt , where I typed manually the report descriptor for the the Delimiter Example from the USB HID Usage table specification 12v2. |
This may take some time. I have not really touched the PIC FW development for a long time. But let me try during the holiday period. I have long holiday in December and I can not go anywhere anyway. |
If you can do this, it would really help. Because this functionality is quite complex, and I've no data to test the code. |
e73dedc
to
5a80a0d
Compare
Do you see a chance to program the hand coded ReportDescriptor from https://github.com/libusb/hidapi/files/7528936/hut1_12v1_apendixB_delimiter_example.txt ? This would cover the last untested feature of the report descriptor syntax. |
If it helps, I can create physical devices that return arbitrary HID Report Descriptors and test what Windows hidapi is returning. I've been making a small collection of descriptors useful to me in |
@todbot : That would be great! You need to connect the device to a Windows PC and execute If you want to try the report descriptor reconstructor itself, execute the 'hidtest.exe' example program from #306 |
I'm actively reworking this one (test infrastructure and implementation). |
@todbot Are you still intend to program the Report Descriptor with the missing test case to your TinyUSB device? It would be of great help! |
7cd7533
to
676c7e6
Compare
All of these changes are now in https://github.com/libusb/hidapi/tree/get-descriptor . One of the items to work on - include pp_data_dump so the dumper is a part of this repo too. In any case, at least now the get-descriptor is in sync with master and with separated implementation, which should minimize a chance of a conflict. |
Great. At least now we can test using the get-descriptor branch which is in sync with the master. |
@Youw Great work! Thank you! If I should do some tasks, please tell me. Otherwise I wait, to prevent conflicting work. I never intended to include pp_data_dump into the main repo. Therefore it's just a quick and dirty implementation, where I never started a Pull-Request for. But if you want, I could clean this up and start a Pull-Request. |
This PR is based on #306 and implements a unit test, which allows to test the report descriptor reconstructor offline, whithout access to HID devices. It runs on GitHub build actions.
To allow this, I stored the preparsed data of the HID devices in text files. The test reads this data and executes the reconstructor code and compares the output with a reference file.
For each HID device, the unit test contains 3 files:
*.pp_data -> Text file with the Preparsed Data
_expected.rpt_desc -> The expected output of the reconstructor
_real.rpt_desc -> The real report descriptor of the device