# Serial port monitoring / "injection"



## Zare (Jun 6, 2009)

Hello all,

I have a old DOS program that controls one industrial machine via serial port, and i need to debug it. I installed DOS under QEMU, and i wanted to redirect QEMU's virtual port to physical port. What device am i going to redirect, since BSD has two classes, dial in (tty), and dial out (cua)?

Next, i need to be able to monitor the port, and to manually change port's incoming data (that goes to the virtual machine). Also, i need the port in raised state (carrier), because the program on the other side won't run unless it detects carrier. 

So, to conclude;

I need a way to manually enter data that goes to QEMU's virtual port, and a way to monitor data that goes out of QEMU's virtual port.

First thing that came to mind was to program my own virtual device (kernel module), which i can do right now, but i want to spare some time.

Thank you for your suggestions, in advance.
Zarko Bulatovic.


----------



## vivek (Jun 7, 2009)

According to man page


> The emulated serial port is redirected on the console. Take a look at  -serial dev option.


http://www.freebsd.org/cgi/man.cgi?...ath=FreeBSD+7.2-RELEASE+and+Ports&format=html


----------

