Watching serial port activity.

nikie n.estner at gmx.de
Tue May 30 18:24:37 EDT 2006


xkenneth wrote:

> Hi,
>
>    I'm writing a couple python applications that use the serial port
> (RS-232) quite extensively. Is there any way I can monitor all activity
> on the serial port and have it printed as the transactions occur? I'm
> trying to reverse engineer a microcontroller serial routine and I'd
> like to see any response the chip sends back.

I've done similar things in the past, and the best tools I found at
that time were:
- Serial Port sniffer from www.hhdsoftware.com
Similar to portmon, but (in my experience) more stable. Windows only,
though.
- VMWare
You can run your serial port app in a VMWare and connect the virtual
serial port to a file or named pipe on the host system. But this won't
help you if the app uses serial commands not available for files/pipes.
- Hardware cable
If you know how to use a soldering iron, this might be the best way: a
serial cable has an RX and a TX wire, connect each of them to the RX
wires of two separate serial cables, that way you can "wiretap" the
whole communication to two different serial ports (e.g. on your laptop)
in a running system. Dead useful for debugging!




More information about the Python-list mailing list