I have a device with two serial ports which I connected together, and I SSH into it. I would like to send data via one of the serial ports and read it from the other, to see that they do transmit/receive data.I read on the topic but I'm confused about the various choice of programs that work with tty, and I don't know how to manage this process given that when I invoke one of these programs I either resign control to it, thus losing the ability to do other things besides using the port, or I get no control over it if I attempt to run it in the background.How do I achieve my goal?
How do I test that two connected serial ports really transmit data?
serial port;serial console
You could open an additional session with ssh and issue the following command in it:tail -f /dev/ttyS0it will print out everything that arrives at ttyS0. Of course, this solution is useful if you transmit printable characters only as otherwise your screen may be flooded with garbage. 