Built midi project with your library but seems like real midi devices(self powered) don't work on ESP32 S3 and probably on S2 as well?
Here is output from serial monitor
E (1604) HUB: Configuration descriptor larger than control transfer max length
E (1605) HUB: Stage failed: CHECK_SHORT_CONFIG_DESC
This is with normal Yamaha piano has dc power and usb midi port.
I have 0 issues with phone as midi or Arduino Leonardo as midi device both work fine maybe the descriptor is small enough so esp can enumerate the device without issues?
I'm using Arduino IDE 1.8 and latest esp32 arduino core
Any hints on how to fix this so any midi device will work(ofc if its standard usb midi device works without drivers)
How to fix ESP32 S3 USB OTG HOST MIDI CHECK_SHORT_C
-
- Posts: 3
- Joined: Tue Jun 20, 2023 4:56 pm
-
- Posts: 3
- Joined: Tue Jun 20, 2023 4:56 pm
Re: How to fix ESP32 S3 USB OTG HOST MIDI CHECK_SHORT_C
Here is difference between working midi device and non working one(the error i mentioned above)
Configuration Descriptor (Working Device):
wTotalLength: 0x00AF (175 bytes)
bNumInterfaces: 0x04 (4 Interfaces)
bmAttributes: 0xA0 (Self-Powered, Remote Wakeup)
MaxPower: 0xFA (500 mA)
Configuration Descriptor (Problematic Device):
wTotalLength: 0x012F (303 bytes)
bNumInterfaces: 0x04 (4 Interfaces)
bmAttributes: 0xC0 (Self-Powered)
MaxPower: 0x01 (2 mA)
here is full configuration_descriptors for both working one and non working one
Working one(Arduino Leonardo as MIDI and Android phone as MIDI)
bLength : 0x09 (9 bytes)
bDescriptorType : 0x02 (Configuration Descriptor)
wTotalLength : 0x00AF (175 bytes)
bNumInterfaces : 0x04 (4 Interfaces)
bConfigurationValue : 0x01 (Configuration 1)
iConfiguration : 0x00 (No String Descriptor)
bmAttributes : 0xA0
D7: Reserved, set 1 : 0x01
D6: Self Powered : 0x00 (no)
D5: Remote Wakeup : 0x01 (yes)
D4..0: Reserved, set 0 : 0x00
MaxPower : 0xFA (500 mA)
Data (HexDump) : 09 02 AF 00 04 01 00 A0 FA 08 0B 00 02 02 02 00 ................
00 09 04 00 00 01 02 02 00 00 05 24 00 10 01 05 ...........$....
24 01 01 01 04 24 02 06 05 24 06 00 01 07 05 81 $....$...$......
03 10 00 40 09 04 01 00 02 0A 00 00 00 07 05 02 ...@............
02 40 00 00 07 05 83 02 40 00 00 08 0B 02 02 01 .@......@.......
01 00 00 09 04 02 00 00 01 01 00 00 09 24 01 00 .............$..
01 09 00 01 03 09 04 03 00 02 01 03 00 00 07 24 ...............$
01 00 01 41 00 06 24 02 01 01 00 06 24 02 02 02 ...A..$.....$...
00 09 24 03 01 03 01 02 01 00 09 24 03 02 04 01 ..$........$....
01 01 00 09 05 04 02 40 00 00 00 00 05 25 01 01 .......@.....%..
01 09 05 85 02 40 00 00 00 00 05 25 01 01 03 .....@.....%...
Non working Yamaha digital piano configuration_descriptor
bLength : 0x09 (9 bytes)
bDescriptorType : 0x02 (Configuration Descriptor)
wTotalLength : 0x012F (303 bytes)
bNumInterfaces : 0x04 (4 Interfaces)
bConfigurationValue : 0x01 (Configuration 1)
iConfiguration : 0x00 (No String Descriptor)
bmAttributes : 0xC0
D7: Reserved, set 1 : 0x01
D6: Self Powered : 0x01 (yes)
D5: Remote Wakeup : 0x00 (no)
D4..0: Reserved, set 0 : 0x00
MaxPower : 0x01 (2 mA)
Data (HexDump) : 09 02 2F 01 04 01 00 C0 01 08 0B 00 03 01 00 20 ../............
00 09 04 00 00 00 01 01 20 00 09 24 01 00 02 08 ........ ..$....
5D 00 00 08 24 0A 01 01 03 00 00 12 24 06 06 02 ]...$.......$...
0C 00 00 00 00 00 00 00 00 00 00 00 00 11 24 02 ..............$.
02 01 01 00 01 02 03 00 00 00 00 00 00 00 0C 24 ...............$
03 03 17 07 00 06 01 00 00 00 11 24 02 04 17 07 ...........$....
00 01 02 03 00 00 00 00 00 00 00 0C 24 03 05 01 ............$...
01 00 02 01 00 00 00 09 04 01 00 00 01 02 20 00 .............. .
09 04 01 01 01 01 02 20 00 10 24 01 02 00 01 01 ....... ..$.....
00 00 00 02 03 00 00 00 00 06 24 02 01 02 10 07 ..........$.....
05 05 05 B4 00 01 08 25 01 00 00 00 00 00 09 04 .......%........
02 00 00 01 02 20 00 09 04 02 01 01 01 02 20 00 ..... ........ .
10 24 01 05 00 01 01 00 00 00 02 03 00 00 00 00 .$..............
06 24 02 01 02 10 07 05 84 25 B4 00 01 08 25 01 .$.......%....%.
00 00 00 00 00 09 04 03 00 02 01 03 00 00 07 24 ...............$
01 00 01 41 00 06 24 02 02 01 00 09 24 03 01 61 ...A..$.....$..a
01 01 01 00 06 24 02 01 21 00 09 24 03 02 41 01 .....$..!..$..A.
21 01 00 09 05 03 02 40 00 00 00 00 05 25 01 01 !......@.....%..
21 09 05 82 02 40 00 00 00 00 05 25 01 01 61 !....@.....%..a
Configuration Descriptor (Working Device):
wTotalLength: 0x00AF (175 bytes)
bNumInterfaces: 0x04 (4 Interfaces)
bmAttributes: 0xA0 (Self-Powered, Remote Wakeup)
MaxPower: 0xFA (500 mA)
Configuration Descriptor (Problematic Device):
wTotalLength: 0x012F (303 bytes)
bNumInterfaces: 0x04 (4 Interfaces)
bmAttributes: 0xC0 (Self-Powered)
MaxPower: 0x01 (2 mA)
here is full configuration_descriptors for both working one and non working one
Working one(Arduino Leonardo as MIDI and Android phone as MIDI)
bLength : 0x09 (9 bytes)
bDescriptorType : 0x02 (Configuration Descriptor)
wTotalLength : 0x00AF (175 bytes)
bNumInterfaces : 0x04 (4 Interfaces)
bConfigurationValue : 0x01 (Configuration 1)
iConfiguration : 0x00 (No String Descriptor)
bmAttributes : 0xA0
D7: Reserved, set 1 : 0x01
D6: Self Powered : 0x00 (no)
D5: Remote Wakeup : 0x01 (yes)
D4..0: Reserved, set 0 : 0x00
MaxPower : 0xFA (500 mA)
Data (HexDump) : 09 02 AF 00 04 01 00 A0 FA 08 0B 00 02 02 02 00 ................
00 09 04 00 00 01 02 02 00 00 05 24 00 10 01 05 ...........$....
24 01 01 01 04 24 02 06 05 24 06 00 01 07 05 81 $....$...$......
03 10 00 40 09 04 01 00 02 0A 00 00 00 07 05 02 ...@............
02 40 00 00 07 05 83 02 40 00 00 08 0B 02 02 01 .@......@.......
01 00 00 09 04 02 00 00 01 01 00 00 09 24 01 00 .............$..
01 09 00 01 03 09 04 03 00 02 01 03 00 00 07 24 ...............$
01 00 01 41 00 06 24 02 01 01 00 06 24 02 02 02 ...A..$.....$...
00 09 24 03 01 03 01 02 01 00 09 24 03 02 04 01 ..$........$....
01 01 00 09 05 04 02 40 00 00 00 00 05 25 01 01 .......@.....%..
01 09 05 85 02 40 00 00 00 00 05 25 01 01 03 .....@.....%...
Non working Yamaha digital piano configuration_descriptor
bLength : 0x09 (9 bytes)
bDescriptorType : 0x02 (Configuration Descriptor)
wTotalLength : 0x012F (303 bytes)
bNumInterfaces : 0x04 (4 Interfaces)
bConfigurationValue : 0x01 (Configuration 1)
iConfiguration : 0x00 (No String Descriptor)
bmAttributes : 0xC0
D7: Reserved, set 1 : 0x01
D6: Self Powered : 0x01 (yes)
D5: Remote Wakeup : 0x00 (no)
D4..0: Reserved, set 0 : 0x00
MaxPower : 0x01 (2 mA)
Data (HexDump) : 09 02 2F 01 04 01 00 C0 01 08 0B 00 03 01 00 20 ../............
00 09 04 00 00 00 01 01 20 00 09 24 01 00 02 08 ........ ..$....
5D 00 00 08 24 0A 01 01 03 00 00 12 24 06 06 02 ]...$.......$...
0C 00 00 00 00 00 00 00 00 00 00 00 00 11 24 02 ..............$.
02 01 01 00 01 02 03 00 00 00 00 00 00 00 0C 24 ...............$
03 03 17 07 00 06 01 00 00 00 11 24 02 04 17 07 ...........$....
00 01 02 03 00 00 00 00 00 00 00 0C 24 03 05 01 ............$...
01 00 02 01 00 00 00 09 04 01 00 00 01 02 20 00 .............. .
09 04 01 01 01 01 02 20 00 10 24 01 02 00 01 01 ....... ..$.....
00 00 00 02 03 00 00 00 00 06 24 02 01 02 10 07 ..........$.....
05 05 05 B4 00 01 08 25 01 00 00 00 00 00 09 04 .......%........
02 00 00 01 02 20 00 09 04 02 01 01 01 02 20 00 ..... ........ .
10 24 01 05 00 01 01 00 00 00 02 03 00 00 00 00 .$..............
06 24 02 01 02 10 07 05 84 25 B4 00 01 08 25 01 .$.......%....%.
00 00 00 00 00 09 04 03 00 02 01 03 00 00 07 24 ...............$
01 00 01 41 00 06 24 02 02 01 00 09 24 03 01 61 ...A..$.....$..a
01 01 01 00 06 24 02 01 21 00 09 24 03 02 41 01 .....$..!..$..A.
21 01 00 09 05 03 02 40 00 00 00 00 05 25 01 01 !......@.....%..
21 09 05 82 02 40 00 00 00 00 05 25 01 01 61 !....@.....%..a
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot] and 170 guests