I have a sketch loaded on a USB/FTDI connected Arduino that
does repeated timed echo of what it receives on Serial back
to Serial.
Sketch is here:
https://github.com/CootCraig/pi_arduino_io_1/tree/master/sketchbook (https://github.com/CootCraig/pi_arduino_io_1/tree/master/sketchbook)
This is working for me:
In one terminal run this (will exit after one client connection)
# socat TCP-LISTEN:54321,reuseaddr /dev/ttyUSB0,raw,echo=0,crnl,b9600
In another terminal, this gives interactive access to the Arduino
# socat - TCP:localhost:54321
This is also working for me:
screen /dev/ttyUSB0 9600
ctl-a \
will exit screen.
There are packages to install socat and screen.