Serial Port Monitoring

Kevin Wang rightsock at gmail.com
Wed Oct 13 01:47:16 UTC 2004


On Tue, 12 Oct 2004 17:50:00 -0600, Omar Castañeda Acosta
<omar at idea.com.mx> wrote:
> I think what Neil means is:
> anyone knows a program that behaves just like tcpdump but for serial ports?
> Specifically he needs one that timestamps its output.

if a line oriented protocol, and don't need anything more than second
accuracy, it's easy enough to write a perl script for this:

stty </dev/ttyS0 baud...parity...etc...

perl </det/ttyS0 -ne 'print int(time())." ".$_;'

microsecond and by-byte is let as an exercise to the reader (read: get
a timing library from CPAN and use sysread/syswrite)

   - Kevin




More information about the fedora-list mailing list