From: "John R. Hogerhuis" <jhoger@pobox.com>
To: qemu-devel@nongnu.org, jhoger@pobox.com
Subject: Re: [Qemu-devel] Redirect COM1 to ttyUSB0
Date: Fri, 05 Aug 2005 02:30:30 -0700 [thread overview]
Message-ID: <1123234230.22550.209.camel@aragorn> (raw)
In-Reply-To: <1123198731.22550.135.camel@aragorn>
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.
prev parent reply other threads:[~2005-08-05 10:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-04 23:38 [Qemu-devel] Redirect COM1 to ttyUSB0 John R. Hogerhuis
2005-08-05 9:30 ` John R. Hogerhuis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1123234230.22550.209.camel@aragorn \
--to=jhoger@pobox.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).