![]() ![]() The socat syntax looks confusing at first, but in fact, it's just 2 nested statements.Ī small price to pay to such a powerful, versatile tool.The files in.txt and out.txt will then contain the captured data. SYSTEM:'tee in.txt |socat - "PTY,link=/tmp/ttyV0,raw,echo=0,waitslave" |tee out.txt' Googling "socat serial port pty tee debug" will point you to several "standard procedure" examples, one being: socat /dev/ttyS0,raw,echo=0 \ In your usecase you could connect your serial port /dev/ttyS0 to a PTY /tmp/ttyV0, then point your application to the PTY, and have socat tee out Input and Output somewhere for you to observe. Socat is a tool to connect (nearly) everything to (nearly) everything, and tee can duplicate streams.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
June 2023
Categories |