tiny-pilot / tiny-pilot/tinypilot
HID descriptor problems when attached to some hardware KVM swtiches
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 291
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the init-usb-gadget script and the linked Gist, then compare the kernel logs and HID dumps for the working and failing KVM cases. Reproduce the behavior with the listed hardware and determine whether both keyboard and mouse can be activated and passed through the KVM without the reported write errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, raspberry-pi
- Domain
- embedded-iot, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100