* [Qemu-devel] Redirect COM1 to ttyUSB0
@ 2005-08-04 23:38 John R. Hogerhuis
2005-08-05 9:30 ` John R. Hogerhuis
0 siblings, 1 reply; 2+ messages in thread
From: John R. Hogerhuis @ 2005-08-04 23:38 UTC (permalink / raw)
To: qemu-devel
QEMU on Linux hosting FreeDOS running an old DOS serial comm
application.
I want to redirect the guest's COM1 to ttyUSB0 which will have a real
device connected to it.
How is this done with QEMU?
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'm pretty sure that I don't need flow control signals passed through
for the serial protocol in use (though if anyone has a solution that
handles flow control too, I'd like to hear about it).
Thanks much,
-- John.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] Redirect COM1 to ttyUSB0
2005-08-04 23:38 [Qemu-devel] Redirect COM1 to ttyUSB0 John R. Hogerhuis
@ 2005-08-05 9:30 ` John R. Hogerhuis
0 siblings, 0 replies; 2+ messages in thread
From: John R. Hogerhuis @ 2005-08-05 9:30 UTC (permalink / raw)
To: qemu-devel, jhoger
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-08-05 10:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-04 23:38 [Qemu-devel] Redirect COM1 to ttyUSB0 John R. Hogerhuis
2005-08-05 9:30 ` John R. Hogerhuis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).