qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Redirect COM1 to ttyUSB0


From: John R. Hogerhuis
Subject: Re: [Qemu-devel] Redirect COM1 to ttyUSB0
Date: Fri, 05 Aug 2005 02:30:30 -0700

On Thu, 2005-08-04 at 16:38 -0700, John R. Hogerhuis wrote:

> I could use -serial stdio
> but how do I get it connected to the usb port? I'm guessing netcat/socat
> but I've never used that utility.
> 
> Anyone have a recipe that works?


I ended up figuring out a way to do this... using socat.

For qemu, I just provide option -terminal pty and qemu will print the
pty it has opened.

In my case it happened to be /dev/pts/6

So I had a real serial device that wanted to talk to a program in the
virtual DOS machine on /dev/ttyUSB1

So I came up with a socat command that would connect them together:

socat /dev/ttyUSB1,raw,cs8,echo=0 /dev/pts/6,raw,cs8,echo=0

The tricky part for me (since I had never used socat) was turning off
all the echoing and editing it wanted to do.


The only problem is that the app I'm using on the external device
wants to see DSR asserted. I had to make a special adapter that
looped back DTR to DSR.

(anyone know a Linux utility I can use to turn on DTR and leave it on?)

-- John.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]