Skip to content

usb host: poll report-protocol HID keyboards#11126

Merged
dhalbert merged 1 commit into
adafruit:mainfrom
mikeysklar:fix-usb-host-report-protocol-keyboard
Jul 17, 2026
Merged

usb host: poll report-protocol HID keyboards#11126
dhalbert merged 1 commit into
adafruit:mainfrom
mikeysklar:fix-usb-host-report-protocol-keyboard

Conversation

@mikeysklar

@mikeysklar mikeysklar commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Fixes #10721

The host keyboard workflow only polled boot-protocol keyboards.
CircuitPython usb_hid devices use report protocol with report IDs,
so their reports were never read.

This PR allows boot and non-boot keyboards to be polled correctly.

Tested: MacroPad plugged into a Fruit Jam at tip of main. Before:
"USB busy" on first keypress. After: keys type into the Fruit Jam console.
Also retested a regular boot-protocol keyboard on the patched build, no regression.

The host keyboard workflow only started polling boot-protocol
keyboards. CircuitPython usb_hid devices use report protocol with
report IDs, so their reports were never read and the device raised
OSError("USB busy") on the second send_report().

Detect keyboards by report descriptor usage, strip the report ID
prefix, and always re-arm reception after each report.

Fixes adafruit#10721

@dhalbert dhalbert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! It's complicated but I don't see a simple refactoring immediately.

@dhalbert
dhalbert merged commit 71cef8a into adafruit:main Jul 17, 2026
440 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"USB Busy" error with CircuitPython HID when plugged into USB host

2 participants