Re: Serial Port Monitoring

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 12 Oct 2004 17:50:00 -0600, Omar Castañeda Acosta
<omar@xxxxxxxxxxx> 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


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux