Skip to content

fix: resolve HID descriptor validation failures on Windows#2351

Open
Dlmiller90 wants to merge 1 commit intoBruceDevices:devfrom
Dlmiller90:fix/hid-usb-mode-9934c5b
Open

fix: resolve HID descriptor validation failures on Windows#2351
Dlmiller90 wants to merge 1 commit intoBruceDevices:devfrom
Dlmiller90:fix/hid-usb-mode-9934c5b

Conversation

@Dlmiller90
Copy link
Copy Markdown

Problem

BadUSB has no HID output on Windows when running beta firmware.
Windows shows Code 10 error and HID report descriptor validation failure.

Root Causes Found

  1. USB stack booting in CDC mode instead of HID mode
  2. HID_ITF_PROTOCOL_KEYBOARD incompatible with multi-collection descriptors
  3. U2F descriptor missing Report ID causing Windows to reject entire descriptor

Fixes

  • Added ARDUINO_USB_MODE=0 and ARDUINO_USB_CDC_ON_BOOT=0 to T-Embed CC1101 build flags
  • Changed USBHIDKeyboard to HID_ITF_PROTOCOL_NONE
  • Added 0x85, 0x06 Report ID to U2F descriptor

Tested On

  • Windows 11
  • LilyGo T-Embed CC1101
  • Bruce firmware commit 9934c5b

Linked Issues

(#2337)

- Force TinyUSB HID mode (ARDUINO_USB_MODE=0, CDC_ON_BOOT=0)
- Switch keyboard to HID_ITF_PROTOCOL_NONE for multi-collection support
- Add missing Report ID to U2F descriptor (0x85, 0x06)

Fixes Code 10 and HID report descriptor validation errors on Windows
Comment on lines +13 to +14
-DARDUINO_USB_MODE=0
-DARDUINO_USB_CDC_ON_BOOT=0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The problem here is that it kills the serial monitor, and serial commands with it..

Maybe it is worth a trial resetting the USB stack and configure it as needed in a lower level, like I did here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

don´t need to change this file..

and remove all the .vs folder, or add it into .gitignore

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.

2 participants