reading from serial from linux command line
Same as with output. Example:
cat /dev/ttyS0
Or:
cat < /dev/ttyS0
The first example is an app that opens the serial port and relays what it reads from it to its stdout
(your console). The second is the shell directing the serial port traffic to any app that you like; this particular app then just relays its stdin
to its stdout
.
To get better visibility into the traffic, you may prefer a hex dump:
od -x < /dev/ttyS0
I am monitoring output for arduino uno like:
screen /dev/ttyUSB0 9600