adafruit / adafruit/Adafruit_TinyUSB_Arduino
3.7.4 breaks USB CDC handling
- Dominant language
- C
- Stars
- 654
- Forks
- 183
- PR merge metrics
- No merged PRs in 30d
Description
### Operating System
Windows 11
### Arduino IDE version
framework-arduinoespressif32 @ 3.3.0
### Board
esp32s3
### ArduinoCore version
3
### TinyUSB Library version
3.7.4
### Sketch as ATTACHED TXT
`usb_hid = new Adafruit_USBD_HID(desc_hid_report, sizeof(desc_hid_report), HID_ITF_PROTOCOL_NONE, 2, false);
}
`
// Begin USB HID and Serial communication, handle device enumeration
void begin(){
TinyUSBDevice.begin(); // Start USB stack
usb_hid->begin(); // Start HID interface immediately after
Serial.begin(115200); // Serial init (optional)
while (!Serial) delay(10); // Wait for CDC if needed
while (!TinyUSBDevice.mounted()) delay(10); // Wait for mount
### Compiled Log as ATTACHED TXT
[log.txt](https://github.com/user-attachments/files/25806690/log.txt)
### What happened ?
I want to use USB as CDC, so that I can send HID and use Serial. It works with 3.7.1. but not with newer versions (e.g. 3.7.4)
Havent had a chance to check if it works with e.g. 3.7.2
It seems like the device can send serial but does not receive it. That means, when you send data from PC over serial to ESP32, it does not see it. Or at least tinyusb stack doesnt. Does not matter if youenable DTR or not.
### How to reproduce ?
1. Use the snippet I provided
2. Use tinyusb library v3.7.4
3. Flash the esp32s3
4. try to send message from PC
5. esp32s3 reception part should be blocked
### Debug Log as ATTACHED TXT
_No response_
### Screenshots
_No response_
### I have checked existing issues, pr, discussion and documentation
- [ ] I confirm I have checked existing issues, pr, discussion and documentation.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue on an ESP32-S3 with Windows 11 using the provided begin() snippet, TinyUSB 3.7.1, and TinyUSB 3.7.4. Compare whether CDC data sent from the PC is received, and inspect the attached compiled log.txt; done means USB HID and Serial work together with host-to-device CDC reception restored in the affected versions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100