Archive
Parallel Port Sniffer for Linux!
This software will help you to capture the parallel port data using a small kernel module for Linux. But wait, not only Linux, it also works for Windows, if you use it in a Qemu Virtual Machine under Linux!.
The parallel port sniffer kernel module will create a virtual port for every “real” parallel port in your machine and act like a bridge, re-passing all the commands sent to the virtual port to the real one and capturing the data in real time. The generated output is in the Open Bench Logic Sniffer format and ready to be analyzed with tools like Logic Sniffer which has tools to analyze some known protocols like 1-Wire, I2C, JTAG, SPI, UART, etc.
How to create two wired virtual serial ports on Linux?
![]()
To create two bridged virtual serial ports use the following command:
socat -d -d pty,raw,echo=0 pty,raw,echo=0
The output will show you which are the virtual ports (or pseudo terminals) created, e.g.:
2010/02/19 16:16:33 socat[9662] N PTY is /dev/pts/3
2010/02/19 16:16:33 socat[9662] N PTY is /dev/pts/4
2010/02/19 16:16:33 socat[9662] N starting data transfer loop with FDs [3,3] and [5,5]
Note: if you are using Ubuntu and you do not have this command, try:
sudo apt-get install socat
Code optimization for RXTX parallel port implementation

RXTX is a native lib providing serial and parallel communication for the Java Development Toolkit (JDK). All deliverables are under the gnu LGPL license. The native part is developed in C.
If you are using the parallel port functions of this project for version rxtx-2.1-7r2 or older, you may be interested in this code optimization, it is a small change but it may improve the resource usage in certain cases.

