Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Sep 2004 22:57:35 -0400
From:      "Alexandre \"Sunny\" Kovalenko" <Alex.Kovalenko@verizon.net>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        freebsd-current@freebsd.org
Subject:   Re: TTY cleanups have started...
Message-ID:  <1095735454.2535.21.camel@RabbitsDen>
In-Reply-To: <44803.1095661627@critter.freebsd.dk>
References:  <44803.1095661627@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1095735454.2535.21.camel>