TinyUSB MIDI: Dropped packets when reading burst MIDI data
Posted: Thu Nov 06, 2025 2:37 pm
I created a USB OTG MIDI device using the ESP32-P4 board and based it on an example template. I have code in place to read MIDI packets, and everything seemed to be working fine until I began testing SysEx data.
When my app (running on a Mac) sends a burst of SysEx messages (each less than 12 bytes, with 16–24 messages per burst), I’m unable to read all the packets—some messages are dropped. I can’t read more than 44 bytes of SysEx data in total.
If any data is dropped, it isn’t reported in the TinyUSB debug output. Standard MIDI data (4-byte packets without bursts) is received correctly. However, as soon as the data is sent in bursts, the system fails to handle it reliably.
I also implemented RTP-MIDI to verify my source and logic, and it works correctly. All data—SysEx and non-SysEx—is received without issue from the host.
I tried different buffer sizes (what API allows), ways to read MIDI data, fullspeed, highspeed, ... but no difference.
Is this a known bug or limitation in the current version of TinyUSB for the ESP32-P4?
Thank you.
ESP IDF 5.5.1
espressif/esp_tinyusb: "~2.0.1"
espressif/tinyusb: ">=0.17.0"
It is the same with esp_tinyusb: 1.x.x
When my app (running on a Mac) sends a burst of SysEx messages (each less than 12 bytes, with 16–24 messages per burst), I’m unable to read all the packets—some messages are dropped. I can’t read more than 44 bytes of SysEx data in total.
If any data is dropped, it isn’t reported in the TinyUSB debug output. Standard MIDI data (4-byte packets without bursts) is received correctly. However, as soon as the data is sent in bursts, the system fails to handle it reliably.
I also implemented RTP-MIDI to verify my source and logic, and it works correctly. All data—SysEx and non-SysEx—is received without issue from the host.
I tried different buffer sizes (what API allows), ways to read MIDI data, fullspeed, highspeed, ... but no difference.
Is this a known bug or limitation in the current version of TinyUSB for the ESP32-P4?
Thank you.
ESP IDF 5.5.1
espressif/esp_tinyusb: "~2.0.1"
espressif/tinyusb: ">=0.17.0"
It is the same with esp_tinyusb: 1.x.x