Pi - Teensy dual serial comms

I want to set up 2 serial comm ports to communicate between one PI3B+ and one Teensy3.2. I want to use the two spare USB ports on the Pi, one for each comms port and connect them to two of the TX, Rx pairs on the Teensy. I need to communicate at 155200 baud. SO I am looking for a USB cable to plug into the PI and the other end of the USB cable needs to have a 3V3 logic level Tx, Rx, Gnd, Vcc pins to go to the teensy. I need two of these. Do you sell something like this? I would like to place an order this afternoon if this is a suitable solution.

Second question - I want to write a program in C to run on the PI which will run a loop which will read chars on the serial port and write chars to the serial port. How will I simply be able to access the USB serial ports and identify and set the parameters in C? This should be a simple program like 10 lines of code long or so.

I think this is a very simple question and quick to code and put together. But the type of question that can take weeks to do if one does not know some little thing that is not obvious to find.


The USB UART devices should automatically be configured as device files when attached to the RPi, something like /dev/tty01, should be easy enough to find, either with the ls command, or dmesg | tail if not apparent with the ls command.

The Linux user will need to be added to the the group the tty device is configured with or it won’t be able to access the device. This can be done with the usermod command.

Core has the following USB UART which should be suitable:

For an introduction to using the tty devices under Linux, refer to the following page. It’s fairly old, but still reasonably accurate.

1 Like

I wonder if you will have any difficulty identifying which of the USB-UARTs you want to access, if it matters.
Maybe use the hardware UART of the RPi and a USB-UART.