I have a Raspberry Pi for which I wrote a program that reads and writes to the GPIO serial port (/dev/ttyS0)
I need to run a set of unit tests on the device, sending several commands and reading what the Raspberry replies, so I make sure my program runs correcly.
The difficulty is that I don't want to physically use the serial port for the tests (I have a lot of raspberries and I want to avoid connecting cables to all of them for the test.
The raspberries are connected to the network and I'm accessing them via ssh.
Is there a way I can redirect the serial port communication, so I can send and receive that data from my computer via ethernet?
Like connecting to ssh, but instead of getting the console I want to directly access the serial port