[ale] Monitoring the serial port

John Mills jmmills at telocity.com
Wed Sep 4 16:05:31 EDT 2002


ALErs-

On Wed, 4 Sep 2002, Pete Hardie wrote:

> John C wrote:
> > Does anyone know of a way to capture serial port output of a device onto a
> > Linux system and log everyting it sees to a file?
 
> cat < /dev/ttyS2 > /log/logfile is a simplistic way

I've used 'minicom' for this - in fact I had a pair of them running to
capture traffic both ways on the RS-232C line between a Win box and a
radio, roughly thus:
                                   'Breakout'
                                    connector
            TxD                     ........              RxD
         >>>--------------------->>------+--->>--------------->>>
  WinBox    RxD                     .    |.               TxD    Radio
         <<<---------------------<<----+-|---<<---------------<<<
                                    ...|.|.. 
                                       V V
                                       V V
  LinBox          RxD                  | |
   Minicom(1) <<<----------------------+ |
                  RxD                    |
   Minicom(2) <<<------------------------+

Salient points:
  1) A special cable was built (actually a M-F in-line breakout connector)
     which brought out the two signal lines and routed each of them to
     the RxD of a separate serial port on the Linux box.

  2) This clearly violates the usual load spec on RS-232C drivers, but
     with short cables it was no problem.

  3) The two Minicoms were each started with different "capture file"
     ('-C <filename>' option)

  4) The TxD ports of those two LinBox serial ports were not connected,
     so by turning on 'echo' at the Minicoms, I could enter notes into
     the log files by simply typing into the respective Minicom window.
     That also allowed me to establish their sequencing for later
     comparison of 'inquiry/command' and 'reply'.

I had bought a Win utility for this, and never even used it - I preferred 
the two-window annotation approach.

 - John Mills


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list