usb host multiple "protocols" via HUB

Status
Not open for further replies.

lokki

Well-known member
is it possible to use multiple "protocols" via the usb-host port?

in my case i am wondering if i can send usb-midi down the first 6 usb-connections and use something like usb-serial to be received by another teensy connected to the 7th usb port (on a 7port hub) that would be very sweet...

and a question that is bugging me still, is there an option to force sending midi messages as fast as possible down the host port? something like sendNow() for the host port?
 
Yes, USBHost_t36 supports use of USB hubs and many devices. Just create 6 MIDIDevice instances in your program and the library will assign your connected devices to them as they are discovered or as you plug them in to the hub. Likewise, put as many USBSerial instances into your program as like, one for each physical USB-serial devices. You'll also need USBHub instances. Use at least 2 of them, since many 7 put hubs are actually two 4 port hubs internally. The library has several examples, so in Arduino click File > Examples > USBHost_t36 to see how it's done.

If your devices are 12 Mbit speed (as almost all USB serial chips are, and a good number of MIDI devices are) and if you want best performance, use multi-TT hubs. Teensy 3.6 and Teensy 4.x have 480 Mbit USB host ports. Only multi-TT hubs allow more than 1 downstream 12 Mbit device to share the higher upstream speed. Cheap single-TT hubs work, but all 12 Mbit devices plugged into the same hub effectively share the same 12 Mbit bandwidth.

Currently the send_now() function in USBHost_t36's MIDI driver is not implemented.
 
Yes, USBHost_t36 supports use of USB hubs and many devices. Just create 6 MIDIDevice instances in your program and the library will assign your connected devices to them as they are discovered or as you plug them in to the hub. Likewise, put as many USBSerial instances into your program as like, one for each physical USB-serial devices. You'll also need USBHub instances. Use at least 2 of them, since many 7 put hubs are actually two 4 port hubs internally. The library has several examples, so in Arduino click File > Examples > USBHost_t36 to see how it's done.
excellent. i want to read two sensors that need more speed then midi and also more resolution. do you think serial communication down the usb-line will be fast enough? (the sensor is an accelerometer and i want to use its movements like an "lfo" for synth parameters. i tried with midi and the response is to slow) so i thought i send the data to another teensy, convert it to an analog output (via dac or pwm) and feed that voltage to my synth.

If your devices are 12 Mbit speed (as almost all USB serial chips are, and a good number of MIDI devices are) and if you want best performance, use multi-TT hubs. Teensy 3.6 and Teensy 4.x have 480 Mbit USB host ports. Only multi-TT hubs allow more than 1 downstream 12 Mbit device to share the higher upstream speed. Cheap single-TT hubs work, but all 12 Mbit devices plugged into the same hub effectively share the same 12 Mbit bandwidth.

great, i ordered two 7 port hubs from here: http://www.uugear.com/product/7-port-usb-hub-for-raspberry-pi/ they are multi-TT and work nicely with the teensy!

Currently the send_now() function in USBHost_t36's MIDI driver is not implemented.

ok, any chance that this could be implemented? i understand that sending midi down the usb-host might be an edge usecase but it would be very sweet if the latency could be reduced as far as possible.
 
Status
Not open for further replies.
Back
Top