Teensy 3.6 USB MIDI host development status

Status
Not open for further replies.
I tested the transmit with 2 different guitar processors both with midi class compliant usb ports and it worked like a charm, i was able to fully read all the date and transmit program change and control change, neither processor listens to real time nor note or anything other than program, control and sysex tho but so far it worked great!
 
I did some more testing and i was able to receive and transmit program, control and note on/off using a teensy 3.2 as the device,i didnt send data at crazy speeds i used 2 foot controllers to send data back and forth from the device to the host and vice versa by pressing a footswitch, all and all its working great so far!
 
Hi Paul, i tested your latest commit which included transmitting SysEx and retrieving the SysEx array, transmit is working great, i was able to send sysex to my guitar controller and it read them properly, the only issue i'm having is with the Host reading the midi SysEx from my guitar processor.

I tested it also with a teensy 3.2 sending sysex to the 3.6 and those message are read properly, however any messages from my guitar processor are not.


The one thing i notice is that my processor sends every byte separately, on the midi.cpp type1 is always 5.

I'm not very good at describing things so I ran the USBHost_t36 in debug and i copied the output, in this log I'm sending 1 sysex message and my processor reads it perfectly, the processor then sends a couple of messages which you can see below.

By the way, my mac reads the sysex from my guitar processor perfectly.


sizeof Device = 36
sizeof Pipe = 96
sizeof Transfer = 64
power up USBHS PHY
port change: 10001803
connect
begin reset
port change: 10001805
port enabled
end recovery
new_Device: 12 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
enumeration:
enumeration:
enumeration:
enumeration:
Config data length = 101
enumeration:
bNumInterfaces = 2
bConfigurationValue = 1
enumeration:
Descriptor 4 = INTERFACE
MIDIDevice claim this=1FFF20E0
len = 92
Descriptor 36 = ???
Descriptor 4 = INTERFACE
MIDIDevice claim this=1FFF20E0
len = 74
Interface is MIDI
type: 36, len: 7
MIDI Header (ignored)
type: 36, len: 6
MIDI IN Jack (ignored)
type: 36, len: 6
MIDI IN Jack (ignored)
type: 36, len: 9
MIDI OUT Jack (ignored)
type: 36, len: 9
MIDI OUT Jack (ignored)
type: 5, len: 9
MIDI Endpoint: 1
tx_size = 64
type: 37, len: 5
MIDI Endpoint Jack Association (ignored)
type: 5, len: 9
MIDI Endpoint: 81
rx_size = 64
type: 37, len: 5
MIDI Endpoint Jack Association (ignored)
new_Pipe
new_Pipe
Descriptor 36 = ???
Descriptor 36 = ???
Descriptor 36 = ???
Descriptor 36 = ???
Descriptor 36 = ???
Descriptor 5 = ENDPOINT
Descriptor 37 = ???
Descriptor 5 = ENDPOINT
Descriptor 37 = ???
MIDIDevice transmit complete
MIDI Data: 04 F0 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
MIDIDevice transmit complete
MIDI Data: 04 01 74 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
MIDIDevice transmit complete
MIDI Data: 04 29 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
MIDIDevice transmit complete
MIDI Data: 06 F7 F7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
MIDIDevice Receive
MIDI Data: 05 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 78
queue another receive packet
read: F005
MIDIDevice Receive
MIDI Data: 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 78
queue another receive packet
read: 5
MIDIDevice Receive
MIDI Data: 05 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 78
queue another receive packet
read: 105
MIDIDevice Receive
MIDI Data: 05 74 00 00 05 08 00 00 05 29 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 75
queue another receive packet
read: 7405
read: 805
read: 2905
read: 5
MIDIDevice Receive
MIDI Data: 05 24 00 00 05 F7 00 00 05 29 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 77
queue another receive packet
read: 2405
read: F705
MIDIDevice Receive
MIDI Data: 05 F0 00 00 05 F7 00 00 05 29 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 78
queue another receive packet
read: F005
MIDIDevice Receive
MIDI Data: 05 00 00 00 05 F7 00 00 05 29 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 78
queue another receive packet
read: 5
MIDIDevice Receive
MIDI Data: 05 01 00 00 05 F7 00 00 05 29 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 78
queue another receive packet
read: 105
MIDIDevice Receive
MIDI Data: 05 74 00 00 05 08 00 00 05 0E 00 00 05 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 75
queue another receive packet
read: 7405
read: 805
read: E05
read: 105
MIDIDevice Receive
MIDI Data: 05 4C 00 00 05 10 00 00 05 0E 00 00 05 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 77
queue another receive packet
read: 4C05
read: 1005
MIDIDevice Receive
MIDI Data: 05 53 00 00 05 06 00 00 05 03 00 00 05 4E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 75
queue another receive packet
read: 5305
read: 605
read: 305
read: 4E05
MIDIDevice Receive
MIDI Data: 05 18 00 00 05 63 00 00 05 03 00 00 05 4E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 77
queue another receive packet
read: 1805
read: 6305
MIDIDevice Receive
MIDI Data: 05 06 00 00 05 03 00 00 05 56 00 00 05 4E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 76
queue another receive packet
read: 605
read: 305
read: 5605
MIDIDevice Receive
MIDI Data: 05 00 00 00 05 24 00 00 05 56 00 00 05 4E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 77
queue another receive packet
read: 5
read: 2405
MIDIDevice Receive
MIDI Data: 05 06 00 00 05 02 00 00 05 5E 00 00 05 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 75
queue another receive packet
read: 605
read: 205
read: 5E05
read: 2805
MIDIDevice Receive
MIDI Data: 05 03 00 00 05 07 00 00 05 5E 00 00 05 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 77
queue another receive packet
read: 305
read: 705
MIDIDevice Receive
MIDI Data: 05 02 00 00 05 66 00 00 05 7C 00 00 05 3F 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 74
queue another receive packet
read: 205
read: 6605
read: 7C05
read: 3F05
read: 7805
MIDIDevice Receive
MIDI Data: 05 00 00 00 05 66 00 00 05 7C 00 00 05 3F 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 78
queue another receive packet
read: 5
MIDIDevice Receive
MIDI Data: 05 68 00 00 05 00 00 00 05 1C 00 00 05 3F 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 76
queue another receive packet
read: 6805
read: 5
read: 1C05
MIDIDevice Receive
MIDI Data: 05 78 00 00 05 03 00 00 05 1C 00 00 05 3F 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 77
queue another receive packet
read: 7805
read: 305
MIDIDevice Receive
MIDI Data: 05 6A 00 00 05 00 00 00 05 24 00 00 05 78 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 75
queue another receive packet
read: 6A05
read: 5
read: 2405
read: 7805
MIDIDevice Receive
MIDI Data: 05 02 00 00 05 70 00 00 05 38 00 00 05 78 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 76
queue another receive packet
read: 205
read: 7005
read: 3805
MIDIDevice Receive
MIDI Data: 05 33 00 00 05 07 00 00 05 38 00 00 05 78 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 77
queue another receive packet
read: 3305
read: 705
MIDIDevice Receive
MIDI Data: 05 03 00 00 05 42 00 00 05 38 00 00 05 78 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 77
queue another receive packet
read: 305
read: 4205
MIDIDevice Receive
MIDI Data: 05 7C 00 00 05 4F 00 00 05 7A 00 00 05 03 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 75
queue another receive packet
read: 7C05
read: 4F05
read: 7A05
read: 305
MIDIDevice Receive
MIDI Data: 05 0E 00 00 05 7D 00 00 05 47 00 00 05 03 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 76
queue another receive packet
read: E05
read: 7D05
read: 4705
MIDIDevice Receive
MIDI Data: 05 06 00 00 05 02 00 00 05 47 00 00 05 03 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 77
queue another receive packet
read: 605
read: 205
MIDIDevice Receive
MIDI Data: 05 16 00 00 05 41 00 00 05 53 00 00 05 07 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 75
queue another receive packet
read: 1605
read: 4105
read: 5305
read: 705
MIDIDevice Receive
MIDI Data: 05 00 00 00 05 1A 00 00 05 53 00 00 05 07 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 77
queue another receive packet
read: 5
read: 1A05
MIDIDevice Receive
MIDI Data: 05 49 00 00 05 1A 00 00 05 53 00 00 05 07 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 78
queue another receive packet
read: 4905
MIDIDevice Receive
MIDI Data: 05 13 00 00 05 1A 00 00 05 53 00 00 05 07 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 78
queue another receive packet
read: 1305
MIDIDevice Receive
MIDI Data: 05 78 00 00 05 1A 00 00 05 53 00 00 05 07 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 78
queue another receive packet
read: 7805
MIDIDevice Receive
MIDI Data: 05 03 00 00 05 26 00 00 05 51 00 00 05 73 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 75
queue another receive packet
read: 305
read: 2605
read: 5105
read: 7305
MIDIDevice Receive
MIDI Data: 05 06 00 00 05 02 00 00 05 42 00 00 05 73 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 76
queue another receive packet
read: 605
read: 205
read: 4205
MIDIDevice Receive
MIDI Data: 05 01 00 00 05 60 00 00 05 07 00 00 05 73 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 76
queue another receive packet
read: 105
read: 6005
read: 705
MIDIDevice Receive
MIDI Data: 05 F7 00 00 05 F0 00 00 05 00 00 00 05 73 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 76
queue another receive packet
read: F705
read: F005
read: 5
MIDIDevice Receive
MIDI Data: 05 01 00 00 05 F0 00 00 05 00 00 00 05 73 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 78
queue another receive packet
read: 105
MIDIDevice Receive
MIDI Data: 05 74 00 00 05 08 00 00 05 29 00 00 05 00 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 75
queue another receive packet
read: 7405
read: 805
read: 2905
read: 5
MIDIDevice Receive
MIDI Data: 05 24 00 00 05 F7 00 00 05 29 00 00 05 00 00 00 05 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
rx_size = 64
avail = 77
queue another receive packet
read: 2405
read: F705
 
Hi Paul, thank you for the quick reply, i find it odd because it's supposed to be MIDI class compliant, and also it's strange that my mac reads the messages without any issues using a midi monitor and using the Web MIDI Api on chrome.

Before you had the USBHost on the 3.6 working with MIDI i was using a 3.2 with a circuits at home usb host shield, i had a similar issue reading sysex from my processor so what i had to do was check each message for an 0xF0 and an 0xF7, If i received an 0xF0 then i would start adding that and any other bytes to the sysex array until i received a 0xF7 at which point the message was complete, then i would ignore any other messages until i got an 0xF0 again, inefficient but it did the job.

Thank you again for your help!!!
 
Paul you truly Rock!

Yes it works great now, i tested it with my processor and with a teensy 3.2 as well and it's reading all sysexs from both, I'll do some more testing and let you know how it works out :)

While I have you here, 2 quick things,

#1 may i suggest that both the USBHost_t36 and the usbMIDI have the SYSEX_MAX_LEN be at least 255? teensys have enough RAM to where a size like that wouldn't really make a big difference so it would be great if it's that way by default.

#2 I don't really use github so i have to learn it before i can submit a suggestion to the code but i added a public function to USBHost_t36.h to get the port_state variable, that way i can tell that a usb device is connected and i can try to communicate with it., Could you add something like that to the USB Host?

this is what i added

USBHost_t36.h, in the USBHost class public:
static uint8_t getUsbPortState();

ehci.cpp
uint8_t USBHost::getUsbPortState()
{
return port_state;
}
 
#1 may i suggest that both the USBHost_t36 and the usbMIDI have the SYSEX_MAX_LEN be at least 255?

This isn't necessarily a final decision, but the buffer is currently 290 on Teensy 3.1 to 3.6. It's only 60 bytes on the 4 smaller boards.

the port_state variable, that way i can tell that a usb device is connected and i can try to communicate with it., Could you add something like that to the USB Host?

You're supposed to be able to just test every device as a boolean, just like "while (!Serial) ;" to wait for the Arduino Serial Monitor. This is built into the base class, so it works for all the host lib's devices.

There's also functions to query the vendor and product ID numbers, and manufacturer, product and serial number strings. These are also in the base class, so they work on MIDI, keyboards, joystick, etc.
 
Ok that's great to know, i was able to get it all working, thank you so much for all your work and your help!
 
Paul on USBHost_t36 on the midi.cpp looks like there's a typo on line 394, the note on msg_type should be 0x90 and off should be 0x80 but looks like they are 0x9 and 0x8 respectively.
 
Hey... I'm just catching up here...


Just to say... regarding the Interface 16x16 example code and a note therein about a "real" application...

Uhm... I need this as a musician... just the way it is... because it's the software and hardware at each end of the "cables" where the work gets done.

This solves a real need I have with connecting 2 music workstations together just using usb alone. Let you know if there's any issues.
 
hi
i am trying to connect a Roland VT-3 voice transformer to the teensy 3.6 using USBHost_t36 , but I am not getting any luck, running in debug mode I get, the following, it doesnt look good to me, can anyone comment?

Thanks
Paul

sizeof Device = 36
sizeof Pipe = 96
sizeof Transfer = 64
power up USBHS PHY
port change: 10001803
connect
begin reset
port change: 18001205
port enabled
end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
enumeration:
enumeration:
enumeration:
enumeration:
Config data length = 176
enumeration:
bNumInterfaces = 4
bConfigurationValue = 1
enumeration:
USBHub memory usage = 960
USBHub claim_device this=1FFF26E0
USBHub memory usage = 960
USBHub claim_device this=1FFF2AA0
Descriptor 4 = INTERFACE
MIDIDevice claim this=1FFF2020
len = 167
Descriptor 4 = INTERFACE
MIDIDevice claim this=1FFF2020
len = 158
Descriptor 36 = ???
Descriptor 4 = INTERFACE
MIDIDevice claim this=1FFF2020
len = 143
Descriptor 36 = ???
Descriptor 36 = ???
Descriptor 5 = ENDPOINT
Descriptor 37 = ???
Descriptor 4 = INTERFACE
MIDIDevice claim this=1FFF2020
len = 102
Descriptor 4 = INTERFACE
MIDIDevice claim this=1FFF2020
len = 93
Descriptor 36 = ???
Descriptor 36 = ???
Descriptor 5 = ENDPOINT
Descriptor 37 = ???
Descriptor 4 = INTERFACE
MIDIDevice claim this=1FFF2020
len = 52
Descriptor 36 = ???
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
Descriptor 4 = INTERFACE
MIDIDevice claim this=1FFF2020
len = 23
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
 
The roland site says the usb port is for audio doesnt say its for midi, when u connect it to your computer does it show up as a midi device?
 
I believe the Roland devices use proprietary drivers (they aren't class compliant) so you won't be able to use them with this host implementation
 
Thanks, I thought this may be the case, it is definitely midi, but I guess also audio, shame was hoping to use the Teensy, I will have to put a raspberry pi in to control it, like I did the last time.
 
Then there's a good chance this can work. The MIDI host code is still pretty new. There may just be some subtle difference.

We're going to need to capture the complete config descriptor....
 
well ive got the device descriptor using Thesycon USB descriptor tool as follows is this any help thanks
Paul

Information for device VT-3 (VID=0x0582 PID=0x017A):

Connection Information:
------------------------------
Device current bus speed: HighSpeed
Device supports USB 1.1 specification
Device supports USB 2.0 specification
Device address: 0x0005
Current configuration value: 0x01
Number of open pipes: 2

Device Descriptor:
------------------------------
0x12 bLength
0x01 bDescriptorType
0x0200 bcdUSB
0xFF bDeviceClass (Vendor specific)
0x00 bDeviceSubClass
0xFF bDeviceProtocol
0x40 bMaxPacketSize0 (64 bytes)
0x0582 idVendor
0x017A idProduct
0x0100 bcdDevice
0x01 iManufacturer "Roland"
0x02 iProduct "VT-3"
0x00 iSerialNumber
0x01 bNumConfigurations

Device Qualifier Descriptor:
------------------------------
0x0A bLength
0x06 bDescriptorType
0x0200 bcdUSB
0xFF bDeviceClass (Vendor specific)
0x00 bDeviceSubClass
0xFF bDeviceProtocol
0x40 bMaxPacketSize0 (64 bytes)
0x01 bNumConfigurations
0x00 bReserved

Configuration Descriptor:
------------------------------
0x09 bLength
0x02 bDescriptorType
0x00B0 wTotalLength (176 bytes)
0x04 bNumInterfaces
0x01 bConfigurationValue
0x00 iConfiguration
0x80 bmAttributes (Bus-powered Device)
0xFA bMaxPower (500 mA)

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x00 bInterfaceNumber
0x00 bAlternateSetting
0x00 bNumEndPoints
0xFF bInterfaceClass (Vendor specific)
0xFF bInterfaceSubClass
0x00 bInterfaceProtocol
0x00 iInterface

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x01 bInterfaceNumber
0x00 bAlternateSetting
0x00 bNumEndPoints
0xFF bInterfaceClass (Vendor specific)
0x02 bInterfaceSubClass
0x02 bInterfaceProtocol
0x00 iInterface

Unknown Descriptor:
------------------------------
0x06 bLength
0x24 bDescriptorType
Hex dump:
0x06 0x24 0xF1 0x01 0x00 0x00

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x01 bInterfaceNumber
0x01 bAlternateSetting
0x01 bNumEndPoints
0xFF bInterfaceClass (Vendor specific)
0x02 bInterfaceSubClass
0x02 bInterfaceProtocol
0x00 iInterface

Unknown Descriptor:
------------------------------
0x07 bLength
0x24 bDescriptorType
Hex dump:
0x07 0x24 0x01 0x01 0x00 0x01 0x00

Unknown Descriptor:
------------------------------
0x0B bLength
0x24 bDescriptorType
Hex dump:
0x0B 0x24 0x02 0x01 0x02 0x04 0x18 0x01 0x00 0x77
0x01

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x0D bEndpointAddress (OUT endpoint 13)
0x05 bmAttributes (Transfer: Isochronous / Synch: Asynchronous / Usage: Data)
0x0070 wMaxPacketSize (1 x 112 bytes)
0x01 bInterval

Unknown Descriptor:
------------------------------
0x07 bLength
0x25 bDescriptorType
Hex dump:
0x07 0x25 0x01 0x00 0x00 0x00 0x00

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x02 bInterfaceNumber
0x00 bAlternateSetting
0x00 bNumEndPoints
0xFF bInterfaceClass (Vendor specific)
0x02 bInterfaceSubClass
0x01 bInterfaceProtocol
0x00 iInterface

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x02 bInterfaceNumber
0x01 bAlternateSetting
0x01 bNumEndPoints
0xFF bInterfaceClass (Vendor specific)
0x02 bInterfaceSubClass
0x01 bInterfaceProtocol
0x00 iInterface

Unknown Descriptor:
------------------------------
0x07 bLength
0x24 bDescriptorType
Hex dump:
0x07 0x24 0x01 0x07 0x00 0x01 0x00

Unknown Descriptor:
------------------------------
0x0B bLength
0x24 bDescriptorType
Hex dump:
0x0B 0x24 0x02 0x01 0x04 0x04 0x18 0x01 0x00 0x77
0x01

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x8E bEndpointAddress (IN endpoint 14)
0x25 bmAttributes (Transfer: Isochronous / Synch: Asynchronous / Usage: Implicit)
0x00E0 wMaxPacketSize (1 x 224 bytes)
0x01 bInterval

Unknown Descriptor:
------------------------------
0x07 bLength
0x25 bDescriptorType
Hex dump:
0x07 0x25 0x01 0x00 0x00 0x00 0x00

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x03 bInterfaceNumber
0x00 bAlternateSetting
0x02 bNumEndPoints
0xFF bInterfaceClass (Vendor specific)
0x03 bInterfaceSubClass
0x00 bInterfaceProtocol
0x00 iInterface

Unknown Descriptor:
------------------------------
0x06 bLength
0x24 bDescriptorType
Hex dump:
0x06 0x24 0xF1 0x02 0x01 0x01

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x03 bEndpointAddress (OUT endpoint 3)
0x02 bmAttributes (Transfer: Bulk / Synch: None / Usage: Data)
0x0200 wMaxPacketSize (512 bytes)
0x01 bInterval

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x84 bEndpointAddress (IN endpoint 4)
0x02 bmAttributes (Transfer: Bulk / Synch: None / Usage: Data)
0x0200 wMaxPacketSize (512 bytes)
0x00 bInterval

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x03 bInterfaceNumber
0x01 bAlternateSetting
0x02 bNumEndPoints
0xFF bInterfaceClass (Vendor specific)
0x03 bInterfaceSubClass
0x00 bInterfaceProtocol
0x00 iInterface

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x03 bEndpointAddress (OUT endpoint 3)
0x03 bmAttributes (Transfer: Interrupt / Synch: None / Usage: Data)
0x0200 wMaxPacketSize (1 x 512 bytes)
0x01 bInterval

Endpoint Descriptor:
------------------------------
0x07 bLength
0x05 bDescriptorType
0x85 bEndpointAddress (IN endpoint 5)
0x03 bmAttributes (Transfer: Interrupt / Synch: None / Usage: Data)
0x0200 wMaxPacketSize (1 x 512 bytes)
0x01 bInterval

Other Speed Configuration Descriptor:
------------------------------
0x09 bLength
0x07 bDescriptorType
0x002D wTotalLength (45 bytes)
0x04 bNumInterfaces
0x01 bConfigurationValue
0x00 iConfiguration
0x80 bmAttributes (Bus-powered Device)
0xFA bMaxPower (500 mA)

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x00 bInterfaceNumber
0x00 bAlternateSetting
0x00 bNumEndPoints
0xFF bInterfaceClass (Vendor specific)
0xFF bInterfaceSubClass
0x00 bInterfaceProtocol
0x00 iInterface

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x01 bInterfaceNumber
0x00 bAlternateSetting
0x00 bNumEndPoints
0xFF bInterfaceClass (Vendor specific)
0xFF bInterfaceSubClass
0x00 bInterfaceProtocol
0x00 iInterface

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x02 bInterfaceNumber
0x00 bAlternateSetting
0x00 bNumEndPoints
0xFF bInterfaceClass (Vendor specific)
0xFF bInterfaceSubClass
0x00 bInterfaceProtocol
0x00 iInterface

Interface Descriptor:
------------------------------
0x09 bLength
0x04 bDescriptorType
0x03 bInterfaceNumber
0x00 bAlternateSetting
0x00 bNumEndPoints
0xFF bInterfaceClass (Vendor specific)
0xFF bInterfaceSubClass
0x00 bInterfaceProtocol
0x00 iInterface

Microsoft OS Descriptor is not available. Error code: 0x0000001F

String Descriptor Table
--------------------------------
Index LANGID String
0x00 0x0000 0x0409
0x01 0x0409 "Roland"
0x02 0x0409 "VT-3"

------------------------------

Connection path for device:
Intel(R) 8 Series/C220 Series USB EHCI #2 - 8C2D
Root Hub
Generic USB Hub
Generic USB Hub
VT-3 (VID=0x0582 PID=0x017A) Port: 1

Running on: Windows 8.1

Brought to you by TDD v2.10.0, Feb 2 2018, 10:25:51
 
I'm sad to say, this part means it is certainly not a "class compliant" MIDI device.

0xFF bDeviceClass (Vendor specific)
0x00 bDeviceSubClass
0xFF bDeviceProtocol

This thing has a lot of interface descriptors too. Every single one of them also has this. :(

0xFF bInterfaceClass (Vendor specific)

If it were a class compliant interface within a non-compliant device, we could just add a quick hack to detect it. But sadly, it seems everything about this device is "Vendor specific" interfaces and protocols.

To get this working, someone would need to write a driver within USBHost_t36. If there's a driver within the Linux kernel, that could be a good shortcut to leaning the necessary info, but of course the code isn't portable to USBHost_t36. A driver would need to be crafted pretty much from scratch from the info in Linux (or any other source, if there is any other public info....)
 
I have a Beagle USB protocol analyzer and Roland TB-3, TR-8, MX-1 (no VT-3 unfortunately) if it may help to identify if one of the vendor specific interfaces uses standard USB MIDI packets in some way...
 
Status
Not open for further replies.
Back
Top