Closed wibicucu closed 4 years ago
Please run https://gist.github.com/YuuichiAkagawa/e9274a452aec7733cf22bab8f4f78390
I open usbh_mid.h file and set DESC_BUFF_SIZE from 256 to 512 Yes.
MIDI_EVENT_PACKET_SIZE from 64 to 128 Hmm. This is unexpected.
Sorry for MIDI_EVENT_PACKET_SIZE, it seems I'm too fast for conclusion, Cant receive midi data seems intermittent problem regardless to my configuration of MIDI_EVENT_PACKET_SIZE. I need to turn on device with this sequence to avoid problem
Start
Device descriptor: Descriptor Length: 12 Descriptor type: 01 USB version: 0200 Device class: 00 Device Subclass: 00 Device Protocol: 00 Max.packet size: 40 Vendor ID: 0499 Product ID: 1718 Revision ID: 0100 Mfg.string index: 01 Prod.string index: 02 Serial number index: 00 Number of conf.: 01
Configuration descriptor: Total length: 012F Num.intf: 04 Conf.value: 01 Conf.string: 00 Attr.: C0 Max.pwr: 01 Unknown descriptor: Length: 08 Type: 0B Contents: 000301002000
Interface descriptor: Intf.number: 00 Alt.: 00 Endpoints: 00 Intf. Class: 01 Intf. Subclass: 01 Intf. Protocol: 20 Intf.string: 00
<<
Interface descriptor: Intf.number: 01 Alt.: 00 Endpoints: 00 Intf. Class: 01 Intf. Subclass: 02 Intf. Protocol: 20 Intf.string: 00
<<
Interface descriptor: Intf.number: 01 Alt.: 01 Endpoints: 01 Intf. Class: 01 Intf. Subclass: 02 Intf. Protocol: 20 Intf.string: 00
<<
Endpoint descriptor: Endpoint address: 07 Attr.: 05 Max.pkt size: 00B4 Polling interval: 01 Unknown descriptor: Length: 08 Type: 25 Contents: 010000000000
Interface descriptor: Intf.number: 02 Alt.: 00 Endpoints: 00 Intf. Class: 01 Intf. Subclass: 02 Intf. Protocol: 20 Intf.string: 00
<<
Interface descriptor: Intf.number: 02 Alt.: 01 Endpoints: 01 Intf. Class: 01 Intf. Subclass: 02 Intf. Protocol: 20 Intf.string: 00
<<
Endpoint descriptor: Endpoint address: 86 Attr.: 25 Max.pkt size: 00B4 Polling interval: 01 Unknown descriptor: Length: 08 Type: 25 Contents: 010000000000
Interface descriptor: Intf.number: 03 Alt.: 00 Endpoints: 02 Intf. Class: 01 Intf. Subclass: 03 Intf. Protocol: 00 Intf.string: 00
<<
MS Interface descriptor 07240100014100 DescriptorSubtype: 01 CS_INTERFACE : MS_HEADER MIDIStreaming SubClass Specification Release number: 0100 wTotalLength: 0041
MS Interface descriptor 062402020100 DescriptorSubtype: 02 CS_INTERFACE : MIDI_IN_JACK(External) JackType: 02 JackID: 01
MS Interface descriptor 092403016101010100 DescriptorSubtype: 03 CS_INTERFACE : MIDI_OUT_JACK(Embedded) JackType: 01 JackID: 61 NrInputPins: 01 010100
MS Interface descriptor 062402012100 DescriptorSubtype: 02 CS_INTERFACE : MIDI_IN_JACK(Embedded) JackType: 01 JackID: 21
MS Interface descriptor 092403024101210100 DescriptorSubtype: 03 CS_INTERFACE : MIDI_OUT_JACK(External) JackType: 02 JackID: 41 NrInputPins: 01 210100
Endpoint descriptor: Endpoint address: 03 Attr.: 02 Max.pkt size: 0040 Polling interval: 00
MS Endpoint descriptor 0525010121 CS_ENDPOINT : MS_GENERAL bNumEmbMIDIJack: 01 21
Endpoint descriptor: Endpoint address: 82 Attr.: 02 Max.pkt size: 0040 Polling interval: 00
MS Endpoint descriptor 0525010161 CS_ENDPOINT : MS_GENERAL bNumEmbMIDIJack: 01 61
Addr:1(0.0.1)
Thank you for your report. It is difficult to determine when self-powered devices will be available.
Closing this issue due to lack of feedback. Feel free to reopen the issue again if needed.
I have MIDI project using this library, I am using Yamaha Clavinova and Roland FP30 for testing, and it is working. But it is not working With Yamaha P121. I got value 160 for Usb.getUsbTaskState() (normally with other 2 piano I got 144)
I try to use USB_desc example project, and found lines that suspicious, it said: Total length truncated to 256 bytes
I open usbh_mid.h file and set DESC_BUFF_SIZE from 256 to 512
And yes, it working, I can connect, and send midi notes on/off successfully to Yamaha P121. But I can't receive midi data from the piano. So I try to change value of MIDI_EVENT_PACKET_SIZE from 64 to 128. and it working, Now I can receive midi data from P121. This setting also working on Yamaha Clavinova and Roland FP30.
Is it safe to change that value? or will it make the code broken on other midi events?
=============================