How to sniff serial data on GNU/Linux

Use the Serial Line Sniffer program:

http://sourceforge.net/projects/slsnif/

Consider the following scenario:

Device (A)
Host (B)
Sniffer (C)

All connections are set as 9600 N81.

Device (A) is connected to Sniffer (C) with a null modem (crossed serial cable) on port /dev/ttyUSB1 of Sniffer (C).
Host (B) is connected to Sniffer (C) with a null modem (crossed serial cable) on port /dev/ttyUSB0 of Sniffer (C).

On Sniffer (C), launch the slsnif program with the following parameter:

slsnif -p /dev/ttyUSB0 /dev/ttyUSB1

On the terminal of Sniffer (C), you can see the serial data exchanged between A and B.

On a modern computer without “native” serial ports, you must use Serial/USB adapters.
The important point is to use null modem between A and C and between B and C.

A ——( null modem )——- C ——-( null modem )—— B

A package for Slackware 12.2 is available here:
http://www.slacky.eu/forum/download/file.php?id=401

happy sniffing

Advertisements

One thought on “How to sniff serial data on GNU/Linux

  1. Attractive component to content. I simply stumbled upon your site and in accession capital to assert that I acquire in fact enjoyed account your weblog posts. Any way I’ll be subscribing to your augment and even I success you get entry to consistently fast.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s