From owner-freebsd-current@FreeBSD.ORG Tue Sep 21 02:58:03 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2BE216A4CE for ; Tue, 21 Sep 2004 02:58:03 +0000 (GMT) Received: from out005.verizon.net (out005pub.verizon.net [206.46.170.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2686243D46 for ; Tue, 21 Sep 2004 02:58:03 +0000 (GMT) (envelope-from Alex.Kovalenko@verizon.net) Received: from [10.0.3.231] ([141.153.167.39]) by out005.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040921025802.NQNS24464.out005.verizon.net@[10.0.3.231]>; Mon, 20 Sep 2004 21:58:02 -0500 From: "Alexandre \"Sunny\" Kovalenko" To: Poul-Henning Kamp In-Reply-To: <44803.1095661627@critter.freebsd.dk> References: <44803.1095661627@critter.freebsd.dk> Content-Type: text/plain Message-Id: <1095735454.2535.21.camel@RabbitsDen> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 20 Sep 2004 22:57:35 -0400 Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out005.verizon.net from [141.153.167.39] at Mon, 20 Sep 2004 21:58:01 -0500 cc: freebsd-current@freebsd.org Subject: Re: TTY cleanups have started... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2004 02:58:03 -0000 On Mon, 2004-09-20 at 02:27, Poul-Henning Kamp wrote: > In message <1095645188.671.650.camel@RabbitsDen>, "Alexandre \"Sunny\" Kovalenk > o" writes: > >On Sun, 2004-09-19 at 05:43, Karel J. Bosschaart wrote: > > >I have USB-to-RS232 dongle (serviced by uplcom). Simple program below > >will hang on 'open' infinitely. > > What do you have in the other end of it ? Do you know the state > of the modem signals ? Below is the console output with nothing attached to the serial end: ucom_dtr: onoff = 1 uplcom_dtr: onoff = 1 ucom_rts: onoff = 1 uplcom_rts: onoff = 1 ucomparam: sc = 0xc20c5e00 ucom0: ucomopen: tp = 0xc1c20000 ucom_dtr: onoff = 1 uplcom_dtr: onoff = 1 ucom_rts: onoff = 1 uplcom_rts: onoff = 1 uplcom_open: sc = 0xc20c5e00 ucomopen: open pipes in = 131 out = 2 ucomstartread: start ucom0: uplcom status = 00 uplcom_get_status: ucom0: ucomclose ucom_cleanup: closing pipes ucom_shutdown ucom_dtr: onoff = 0 uplcom_dtr: onoff = 0 ucom_rts: onoff = 1 uplcom_rts: onoff = 1 ucomreadcb: status = 6 ucom0: ucomreadcb: CANCELLED uplcom_close: close and this is console output with CLIE T615C attached to the serial port and running program which opens port, pushes "Hello, world!" through, waits for output, times out pushes some more bytes, exits: ucom_dtr: onoff = 1 uplcom_dtr: onoff = 1 ucom_rts: onoff = 1 uplcom_rts: onoff = 1 ucomparam: sc = 0xc20c5e00 ucom0: ucomopen: tp = 0xc1c20000 ucom_dtr: onoff = 1 uplcom_dtr: onoff = 1 ucom_rts: onoff = 1 uplcom_rts: onoff = 1 uplcom_open: sc = 0xc20c5e00 ucomopen: open pipes in = 131 out = 2 ucomstartread: start ucomreadcb: status = 0 ucomreadcb: got 1 chars, tp = 0xc1c20000 ucomreadcb: char = 0x00 putc to a clist with no reserved cblocks ucomstart: sc = 0xc20c5e00 ucomstartread: start ucom0: uplcom status = 80 uplcom_get_status: ucomreadcb: status = 0 ucomreadcb: got 2 chars, tp = 0xc1c20000 ucomreadcb: char = 0x0f ucomstop: 2 ucomstop: write ucomstop: done putc to a clist with no reserved cblocks putc to a clist with no reserved cblocks ucomstart: sc = 0xc20c5e00 ucomreadcb: char = 0x1c ucomstop: 3 ucomstop: read ucomstopread: enter ucomstopread: leave ucomstop: write ucomstop: done putc to a clist with no reserved cblocks putc to a clist with no reserved cblocks ucomstart: sc = 0xc20c5e00 ucomstartread: start ucom0: uplcom status = 90 uplcom_get_status: ucomreadcb: status = 0 ucomreadcb: got 1 chars, tp = 0xc1c20000 ucomreadcb: char = 0x1f putc to a clist with no reserved cblocks ucomstart: sc = 0xc20c5e00 ucomstartread: start ucomreadcb: status = 0 ucomreadcb: got 1 chars, tp = 0xc1c20000 ucomreadcb: char = 0x13 ucomstop: 0 ucomstop: done ucomstartread: start ucomreadcb: status = 0 ucomreadcb: got 1 chars, tp = 0xc1c20000 ucomreadcb: char = 0x00 putc to a clist with no reserved cblocks ucomstart: sc = 0xc20c5e00 ucomstartread: start ucom0: ucomclose ucom_cleanup: closing pipes ucom_shutdown ucom_dtr: onoff = 0 uplcom_dtr: onoff = 0 ucom_rts: onoff = 1 uplcom_rts: onoff = 1 ucomreadcb: status = 6 ucom0: ucomreadcb: CANCELLED uplcom_close: close In both cases I had to Ctrl-C from the program running on the laptop (program on CLIE was allowed to run its course). I do not own the breaker box so I can not tell you what modem signal states are, even though with 9 pin USB-to-serial dongle I would suspect we would be lucky if RTS and CTS actually change, most likely there are two data wires and software flow control, however, the right answer is: I don't know. I can start adding more printf statements to the ucom.c or uplcom.c, but at the moment odd thing seems to be that 'open' would attempt to initiate data transfer. --- Alexandre "Sunny" Kovalenko.