Re: [ILUG] Serial Port Logging

From: Conor Daly (conor.daly at domain oceanfree.net)
Date: Wed 19 Sep 2001 - 22:30:05 IST


On Wed, Sep 19, 2001 at 12:18:26PM +0100 or so it is rumoured hereabouts,
Adrian Flynn thought:
> Niall
>
> Thanks for your reply, however the printer concerned is not on a linux
> machine, and uses non standard print routines, therefore it cannot be
> captured at source. This is why I was planning on taking the serial cable
> which is currently plugged in to the printer and attaching this (with
> suitable plug modifications) to ttyS0 and linking ttyS1 to the printer with
> another cable. The data would then be routed through the Linux machine, be
> logged, and then continue on its merry way ;-)
>
> One possible option might be:
> cat /dev/ttyS0 |tee -a /var/log/printerlog >/dev/ttyS1
>
> However, this is a production printer and I cannot mess with it until I am
> sure!
>
> Any thoughts?
>
> Thanks
>
> Adrian

I don't know if this is really dumb since I haven't ever done any serial
stuff but...

Is it necessary to route the data to the printer *through* the linux box?
Would it not be possible to make a 'Y' connection in the serial cable and
connect one branch of the 'Y' to the linux box and simply

cat /dev/ttyS0 > printerlog

You might connect only the data lines on the logger branch but none of the
control lines or something like that to avoid the logger from trying to
answer the control codes. Something like:

  _____________ _____________
 | | _____ | |
 | computer A |_____>______| 'Y' |___>________| printer |
 |_____________| |_____| |_____________|
                               |
                              \/
                        _______|____
                       | |
                       | linux |
                       | logger |
                       | /dev/ttyS0 |
                       |____________|

Can you configure a serial port to be "listen only"?

Conor

-- 
Conor Daly <conor.daly at domain oceanfree.net>
Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
  6:52pm  up 96 days, 19:10,  0 users,  load average: 0.08, 0.04, 0.03
Hobbiton.cod.ie
  6:54pm  up 12 days,  6:23,  2 users,  load average: 0.00, 0.01, 0.00


This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:12:12 GMT