More than one USB Serial possible

Status
Not open for further replies.

st0ne

Member
Hi,

is it possible to have more than one USB-Serial?

I would use one for logging/control and one for an application interface. But i did not find anything about.

At the "old" lib it looks like that this is possible.

st0ne
 
What Teensy are talking about?

I know on the Teensy 4.0 and the T4.1 support was added for Triple Serial through the usb connection to the PC:
Code:
Serial
SerialUSB1
SerialUSB2
You use SerialUSB1 or SerialUSB2 like you would use a normal Serial command
 
thanks, i will try it.
I have an Teensy 3.2. But for USB endpoints i think the hardware should not be relevant.

So SerialUSB2.begin() should work? Or is there something to include?
 
A couple of things.
1. Make sure you select Triple Serial on the dropdown menu for the USB Type
2. if you use SerialUSB2.begin make sure you include the baud SerialUSB2begin(115200). Technically you don't even need the begin. Teensies default to make usb speed.
 
hm, there is no SerialUSB1 or SerialUSB2. Should this work on Teensy 3.2? Also it shows no "Tripple USB" or similar in the usb type menu
 
hm, there is no SerialUSB1 or SerialUSB2. Should this work on Teensy 3.2? Also it shows no "Tripple USB" or similar in the usb type menu

What versions of Arduino and Teensyduino are you using? There is is no 'Tripple USB' in the 'USB Type' part of the Tools menu. I think @mjs513 was referring to 'Triple Serial' in the 'USB Type' part of the Tools menu.
 
looks like it works. thanks :)

is it also possible to get signals like CTS or RI back to the PC via USB?
 
'SerialUSB2' was not declared in this scope

hm. did not compile before. only syntax highlighting tested with 1.52...
have i to include something?
 
yes i tried that. Did not work.

Pretty sure you didn't select Triple Serial (which is the *only* way that works). I tried it here as a quick sanity check. It definitely does work. Here's a screenshot where you can see clicking Verify does correctly compile the code for Teensy 3.2.

sc.png

But i also need audio, so i selected "All of the Above"

The "All of the Above" option does not actually include dual or triple serial (and probably never will - as the USB protocol doesn't have enough endpoint to add those to such a long list). "All of the Above" also has several issues, so I'm probably going to remove it for Teensyduino 1.53.

To get audio and triple serial, you're going to need to edit usb_desc.h. While there are some comments in the code, that requires more skill and attention to detail than normal Arduino coding.
 
ok that makes sense that it wont work... i tested your example. it works.

i looked at the file, looks not really complicated if the code behind will work with different defines than the predefined ones...
is it possible to select in the menu "no USB" and set the defines for USB in the arduino sketch? So i do not have to edit usb_desc.h.
But i think the compiler will not use the defines, right?

if it will work, i can also make a pull request for my changes if needed.

one of my other questions... is it possible to get DSR or CTS signalling via usb-serial to the pc?
 
Status
Not open for further replies.
Back
Top