Go Down

Topic: Making a serial snooper with a linux box? (Read 621 times) previous topic - next topic

BetterSense

I have some industrial equipment I'm trying to reverse-engineer. It communicates from the main CPU to a controller via a serial connection. I want to hook into the serial connection and dump everything doing down that line to log file so that I can stare at the messages and try to figure out the protocol.

I could just plug the serial cable into my computer but I need the messages to continue going to the controller or else the rest of the system will error. So basically I need to tap into it.

My first thought is to use a laptop with two USB-Serial adapters. I could use a perl script to open both serial connections as files and send everything that comes in the one serial connection right back out the other serial connection, but also dump it to a log file. Will this even work? I can see that it will introduce some latency but I don't think that will be critical.

James C4S

http://lmgtfy.com/?q=rs232+protocol+analyzer

Yielded:
http://www.beyondlogic.org/protocolanalyser/protocolanalyser.htm

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

RuggedCircuits

A hardware solution is possible, but the software solution you describe will work just as well too. I did this very thing on a Linux system using a Python program many moons ago. I suppose Perl might work too, it just won't look as nice  ;)

--
The Quick Shield: breakout all 28 pins to quick-connect terminals

Ran Talbott

Here's one that's simple,  solid, and free.  It splits the two directions between two serial ports.  You can build the breakout cable in literally just a few minutes if you don't need handshaking lines.  Takes several minutes if you do.

Captures everything to a text file,  and even does timestamping of status line changes (and,  iirc,  data:  it's been several months since I used it,  and the protocol wasn't time-critical,  so my memory is a  bit fuzzy on the subject).



Go Up