Closed KurtE closed 2 years ago
Forgot to mention the thread: https://forum.pjrc.com/threads/70824-USB-host-Teensy-4-1-with-Wacom-Intuos5
is this ready to merge?
It could be any time,
Although I have some changes locally for helping debug some more.
The Logitech G Wireless mouse - sets up a Keyboard with 64 byte packets... Which the messages appear to be killing the system.
I have a hack right now that allows the USBHIDParser class optionally claim (BOOT) keyboards which it appears to be making the code work better.
But I am thinking instead of HID Parser allowing to grab all keyboards... Instead, I am thinking of adding a:
maybe a new keyboard class like: HIDKeyboard(), that works with HID input.
Also have a PID/VID table that the HID Parser would check to see if it should claim a BOOT/Keyboard or not.
We have run into this a few times with like the GIGABYTE keyboard.
Hopefully later today or tomorrow should have version to try.
Please commit whatever else should be part of this improved printing and then I'll merge it.
I have an unopened Gigabyte Force K83 keyboard that's been sitting here next to my USB host stuff for over a year. Is that the one which causes problems?
I pushed up the current stuff. I don't believe it is depending on other changes that I am testing.
I now do have code in place where the is a list of keyboards to process as HID device.
I have the HID code being able to detect it.
I have some code in place to take a list of keyboards to support by HID, and the USBHIDParser code will now claim it, and the KeyboardController will not.
Next up either extend keyboard and/or add new class to handle these.
Yes I do have a Gigabyte one that we resolved earlier forcing into boot mode. Once I finish this may try seeing if it work better with HID parser.
@PaulStoffregen @mjs513 -
I went ahead and pushed up the WIP on allowing a Keyboard to be claimed by the HID Parser instead of Keyboard.
This so far is allowing the underlying Mouse object to run. Before it would more or less die if the mouse had not been used for a few minutes. I have been running this version with a Mouse/Keyboard forwarder sketch (not part of any github project)
This however does not fix the HUB issue. If I start up another slot with keyboard, the whole thing hangs with the several of the QH lists creating loops and hanging.
Note: I also checked in a slightly updated version of the print_qh_list that does a more thorough check for loops. It also will bail if it prints out over 32 items in a list.
If you prefer, I could pull this stuff back out. But this should allow the one forum member to make progress with their mouse.
So now should be a good time to merge
@PaulStoffregen @mjs513,
As I mentioned in a thread today, I have been wanting to print out additional information about a HID device. Before I would use Linux, and plug in a device and use USBHID-dump plus another few commands to print out a structured ouput. But that second app is no longer in Ubuntu releases since about 18.04... So decided to try to use our own sketches to provide this type of output.
I added two methods to the USBHIDParser class to allow caller code to query it for the Report Descriptor data as well as the length.
I then added code to the example sketch HIDDeviceInfo that when one of my HIDDumper classes is claimed it asks for the descriptor data and tries to do a structured listing of it.
This hopefully will help users to be able to provide enough data to better integrate different HID Devices.
Some debug output from a Keyboard I plugged in