[ILUG] Serial Port Logging

Kenn Humborg kenn at bluetree.ie
Wed Sep 19 19:07:12 IST 2001


> The bulletproof way to do this on a Linux box is to write a program which
> emulates a printer i.e. accepts data on a serial port and logs
> said data and
> sends it to the real printer via another port, handling
> handshaking on both
> ports as necessary. I'd be surprised if you'd write such a
> program for less
> than one of the devices Kenn mentioned will cost you. (Just curious Kenn -
> with your heavy use of loggers, I did expect you to jump in here. Have you
> never needed such a program, or do you just use those cute little
> boxes with
> a fast enough Linux box [and it's not going to need to be all
> that fast] ?)

Well, we use those little widgets from B&B to snoop on serial
transmissions up to 57600 quite successfully.  Given that there
is absolutely no flow control possible on the "tap" port, you
just have to make sure that your receiving UART can hold enough
characters to handle the worst interrupt latency in your OS.

I haven't done this with Linux, but with WinNT 4 workstation
on a P3-700, 57600 works OK on my on-board serial port, but can
drop a bit on my ISA-card serial ports.  I've grabbed data from
a 9600 baud line on a P133 laptop running 95 and NT4 (slowly :-)
with no losses.  (And this is with our in-house serial comms
library that really need a bit of re-work to efficiently handle
the higher speeds of 57600 and up.)

I imagine that Linux should be better.  Just make sure that you
don't have any nasty devices like, say, cheapo SCSI cards with
flaky drivers and dodgy devices that might cause your interrupt
latency to go sky-high on occasion...

Later,
Kenn





More information about the ILUG mailing list