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 and but I don't know how I can print that response to the console using command line, if someone can show me a way to do this, I'd be grateful.