I am reverse engineering how a CPS software package communicates to a radio device. I have the basics down, and want to trick the software into thinking COM1 is the radio, when in reality I want to capture the control flow pin state changes (CTR and RST).

I am running Windows XP in Qemu and/or Virtual Box with Linux as the base OS. Is there a way for Linux to emulate a software-defined serial port that captures all pin state changes?

I have tried using socat, specifically with something like this socat -d -d pty,raw,echo=0,b9600 pty,raw,echo=0,b9600, but attempts to change the control flow pins on the resulting /dev/pts/X will result in an ioctl error. Also, simple cat /dev/pts/X only shows content sent over the device, not control flow changes.

How would I do this? And, how would I pass the resulting device to a Windows VM to make it think it is communicating with COM1?


1 Answer 1


To answer my own question, you can use the Linux kernel module tty0tty to capture the control pins and data flow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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