tiny-pilot / tiny-pilot/tinypilot

HID descriptor problems when attached to some hardware KVM swtiches

Open
#535 15 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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?

  1. Attach TinyPilot to KVM swtich
  2. Observe "missing" keyboard / mouse on end device
  3. 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_length misalignment. 🤷
  • Included a full HID dump from a hardware combo device which "seemingly" has no issues when directly attached to the KVM switch.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.