Snooping a serial port

Posted on
Mon Dec 14, 2009 5:02 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Snooping a serial port

Has anyone here had any luck in finding a way to monitor (eavesdrop, snoop, trace, etc.) the raw data on an existing serial connection? There are commands like: watch, portmon and ttysnoop on other OSs, but I have not been able to find anything for OS-X.

The application? I am trying to find out the modem setup (AT commands) that takes place between a communications program and a modem. The modem is actually connected by USB. But, I am able to talk to it using cu (or screen) to the (/dev/ttyx) device. So, it seems that I should be able, somehow, to look at the raw data exchange when the comm program has control of the port. Note, obvious tricks like:
# cat </dev/tty.foobar
do not work.

Any help or pointers appreciated.

Posted on
Mon Dec 14, 2009 8:06 pm
ricks offline
Posts: 122
Joined: Nov 11, 2006
Location: Reno, NV

(No subject)

There seems to be a lot more software based solutions for the PC than the Mac. My solution was to build a y-cable that allowed me to sniff one side of the RS232 communications with another laptop.

I just found the following page [www.lammertbies.nl] which gives a wiring diagram. I could not find the page that I used several years ago to build mine. I remember seeing some companies selling pre-made cables.

Good luck!

Posted on
Tue Dec 15, 2009 7:56 am
anode offline
Posts: 697
Joined: May 27, 2007
Location: NC

(No subject)

I had started doing one via a y cable. Now, if you want to read both the coming and going of the line, you will need 2 serial ports on the snooping computer. (the snooping one is reading the write line and the read line, so 2 serial ports) I had made a crude program for one way reading.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 9 guests