On 7/19/20 5:23 PM, Richard Shaw wrote:
I would like to monitor serial port communications read only, but I
haven't found a tool that makes that easy in the Fedora repos.
I've done that with "socat" to monitor communications with an APC UPS. Here
is my recipe:
socat /dev/ttyU3412A,raw,echo=0 \
SYSTEM:'tee in.txt |socat - "PTY,link=/tmp/ttyV0,raw,echo=0,waitslave" |tee
out.txt'
In the above, ttyU3412A is the physical serial port. ttyV0 is created by socat, and that
is what you connect to. All traffic gets logged to the two .txt files.
Please note that this is one long command line. The SYSTEM thing is an argument to the
first socat.
Steve