Linux offers various tools. Linux uses ttySx for a serial port device name. For example, COM1 (DOS/Windows name) is ttyS0, COM2 is ttyS1 and so on. Task: Display Detected System’s Serial Continue reading 'How To Check and Use Serial Ports Under Linux'. How can I capture network traffic of a single process? Port with the one you just retrieve. (on some Linux distributions, anyway - on Ubuntu you may need.

Active6 years, 4 months ago

I'm trying to reverse the protocol used by an early nineties logic analyzer an its PC software.The device is connected via RS-232 (propietary wiring) and communicates with a DOS program, successfully running on DOSBOX.

  • I'm able to control the device with the original software but it would be useful to autimathe the downloading of data from the analyzer using a custom program but to do so I need to know what is going on the serial port.
  • A 'true' serial monitor for Linux (ioninja.com. Points 1 year ago * Or to reverse eng serial protocols. A day I would like to see a well integrated serial sniffer within Wireshark. We have plans for releasing a hardware serial monitor which instead of hooking into a serial port driver will use a logic analyzer to capture.

I'm able to control the device with the original software but it would be useful to autimathe the downloading of data from the analyzer using a custom program but to do so I need to know what is going on the serial port.

Ineed to know what mode is the serial port set, while I know for sure the datarate is either 1200 or 9600 bps (configurable on the device) I don't know the flow control (I guess it is RTS/CTS).
I also need to tap into the conversation between the prgram and the device without disturbing their communication.
Reading the serial port with another program (cutecom/minicom) prevents the emulator from receiving the data from the hardware.

So, summing up, what I need to know is:

  • What configuration is set on /dev/ttyS0 (via IOCTL calls, i think)
  • What goes on between program and device.

I was thinking in programming a library which acts as a proxy for the standard c library (via LD_PRELOAD) but there must be an easier way to do this.

Ubuntu Serial Port Sniffer Linux
NeonManNeonMan

2 Answers

You can use slsnif (Serial Line SNIFfer).

Here's a link to the sourceforge project so you can download it. I don't believe it comes with any modern distributions but I could be wrong so check your distro's software repository first.

cmevolicmevoli
Serial port sniffer cable

I use ttyrpld for tty sniffing. I ported it to PPC and run it on 2.6.32. It logs all of the tty traffic on the board to files, one per tty. Works well.

Jonathan Ben-AvrahamJonathan Ben-Avraham
3,0651 gold badge24 silver badges31 bronze badges

Not the answer you're looking for? Browse other questions tagged linuxserial-portioctlsniffer or ask your own question.

  • This program is awesome I really thank the Dev. a lot for such great work

  • This was exactly what I was looking for to automate calibration adjustments of some Fluke instruments. Seriously fantastic work, thanks a lot!

  • stunning. i needed to graph output from a UART device and SC made it really simple. please consider adding an x-axis minimum to graphs (currently, it's fixed at 0) like you have a y-axis minimum.

  • Great piece of software. Very reliable serial port monitor (plus many other features) with a lot of possibilities.

Usb Serial Port Sniffer

Read more reviews >