Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 37 of 37

Thread: Teensy 3.6 USB MIDI host development status

  1. #26
    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!

  2. #27
    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!

  3. #28
    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

  4. #29
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    16,218
    Quote Originally Posted by neroroxxx View Post
    The one thing i notice is that my processor sends every byte separately, on the midi.cpp type1 is always 5.
    That's definitely not USB MIDI class compliant. I'll try to come up with a workaround anyway....

  5. #30
    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!!!

  6. #31

  7. #32
    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;
    }

  8. #33
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    16,218
    Quote Originally Posted by neroroxxx View Post
    #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.

  9. #34
    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!

  10. #35
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    16,218
    I rolled all the MIDI changes up in a beta installer.

    https://forum.pjrc.com/threads/49078...no-1-41-Beta-3

  11. #36
    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.

  12. #37
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    16,218
    Thanks. Fixed that and some other minor issues, and added more examples.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •