I have a serial port device that I would like to test using linux command line.
I am able to use stty and echo for sending commands to serial port, but when device responds I have no way of reading what is coming from serial port. I am using
stty -F /dev/ttyS0 speed 9600 cs8 -cstopb -parenb &&
echo -n ^R^B > /dev/ttyS0
to send a command to the device. Device operates and sends a response back in 300 ms's. How do I print that response to the console using command line?
socat stdio /dev/ttyS0
– pstanton Nov 19 '17 at 08:28cat
rarely works, in my experience; it just returns with nothing. butscreen /dev/ttyACM0 115200
works pretty reliably – Marc Compere Dec 29 '23 at 03:24