From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E0z4D-00086i-EA for qemu-devel@nongnu.org; Fri, 05 Aug 2005 06:04:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E0z47-00085c-Cn for qemu-devel@nongnu.org; Fri, 05 Aug 2005 06:04:39 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E0z3u-0007TG-Jy for qemu-devel@nongnu.org; Fri, 05 Aug 2005 06:04:23 -0400 Received: from [69.17.117.25] (helo=mail23.sea5.speakeasy.net) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1E0yjY-0000ku-3c for qemu-devel@nongnu.org; Fri, 05 Aug 2005 05:43:20 -0400 Received: from dsl081-088-222.lax1.dsl.speakeasy.net (HELO [192.168.111.2]) ([64.81.88.222]) (envelope-sender ) by mail23.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 5 Aug 2005 09:29:53 -0000 Subject: Re: [Qemu-devel] Redirect COM1 to ttyUSB0 From: "John R. Hogerhuis" In-Reply-To: <1123198731.22550.135.camel@aragorn> References: <1123198731.22550.135.camel@aragorn> Content-Type: text/plain Date: Fri, 05 Aug 2005 02:30:30 -0700 Message-Id: <1123234230.22550.209.camel@aragorn> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: jhoger@pobox.com, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, jhoger@pobox.com 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.