tinypilot: HID descriptor problems when attached to some hardware KVM swtiches
Description
Spun off from https://github.com/mtlynch/tinypilot/issues/78#issuecomment-783755302
Some hardware KVM switches seems to “take issue” with the combined mouse and keyboard HID descriptors provided through TinyPilot’s use of libcomposite gadget behaviors. One particular case is interesting, because at least one
What’s the behavior that you expect?
Keyboard & Mouse are able to be activated through init-usb-gadget script, and successfully pass through the KVM switch hardware to the end device
What’s happening instead?
Only one device descriptor can be activated at a time, or neither will pass through.
What are the steps to reproduce this behavior?
- Attach TinyPilot to KVM swtich
- Observe “missing” keyboard / mouse on end device
- See errors in TinyPilot logs regarding writes of keypresses
Research
I’ve collected some notes in this Gist.
- Kernel logs showing the difference in reports. Notice, the strings are missing when passing through the CKLau 🤔
- When both HID devices are activated, there is no kernel message. This seems to indicate an issue within the switch hardware/firmware, though due to a specific compatibility issue only yet observed here. Could be a HID definition compliance issue, or could be something more obscure like
report_lengthmisalignment. 🤷 - Included a full HID dump from a hardware combo device which “seemingly” has no issues when directly attached to the KVM switch.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 1
- Comments: 15 (10 by maintainers)
@mtlynch My apologies that it took me so long to get back to you.
You’re spot on. This is looking more like a firmware limitation of the CKLau switch itself, isolated down to the support endpoint count.
I haven’t forgotten this @mtlynch, just been a busy month!
I’d explicitly using only the keyboard input port. The USB 2.0 hub port on the front will not work for the remote triggering, which is exactly what I need. See location in basement rack:
That will come in handy. In the same spirit, a handy decoder! https://eleccelerator.com/usbdescreqparser/ This will take the output from
usbhid-dumpdirectly, and output the commented, readable form.