[wellylug] Serial Port Data + Logging
David Antliff
dave.antliff at paradise.net.nz
Tue Jun 15 23:11:00 NZST 2004
On Tue, 15 Jun 2004, Wayne Koorts wrote:
> Hmmm, I wonder what the output of this would be:
>
> tail -f /dev/ttyS<portno> & > log.file
I can understand why you might suggest this - not a bad idea on the
surface, however tail does some nasty hackish polling with ugly stream
buffering with the end effect that you often don't get what you expect in
the output. You don't actually need to 'follow' the file - as long as you
have the port set up properly, 'cat /dev/ttyS<portno>' will not terminate
unless the driver presents EOF or disconnects the file (which usually
shouldn't happen if you turn off flow control).
ttylog sounds useful - however it's no different from using 'cat' except
it provides a nice way to set the port parameters, just as minicom, cu,
screen, etc do too.
--
David
More information about the wellylug
mailing list