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

Re: Serial Port Monitoring



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


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