/dev/ttyU0 - block at open

Ruslan Bukin br at bsdpad.com
Mon Oct 4 11:48:02 UTC 2010


On Mon, Oct 04, 2010 at 01:26:50PM +0200, Ed Schouten wrote:
> Ruslan,
> 
> * Hans Petter Selasky <hselasky at c2i.net> wrote:
> > This is not directly related to USB, but rather TTY.
> > 
> > Ed, any clues?
> > 
> > --HPS
> > 
> > On Monday 04 October 2010 12:06:41 Ruslan Bukin wrote:
> > > Hi!
> > > 
> > > I am using u3g driver for Gobi 2000 QDL device.
> > > The open ("/dev/ttyU0", O_RDWR) does not return anything,
> > > But it returns immediately with only O_NONBLOCK or O_NDELAY flags.
> > > 
> > > is it normal behavior or not?
> > > 
> > > The device is answering for commands normally in non-block state,
> > > but only returns error when I try to write firmware to it.
> > > 
> > > I think may be the problem is in block/non-block modes.
> 
> What kind of cable do you have connected to it? Does it have the carried
> detect (DCD) line properly wired up? If not, the behaviour should be
> okay, since CLOCAL is turned off by default. If you're not interested in
> any carrier, you should open it with O_NONBLOCK.

It is the mini pci express QDL device. It is not the modem, 
but it switches to wwan modem after receiving firmware.

even I set 
stty -f /dev/ttyU0 raw clocal
it blocks on open.

The communication with device looks like this:

=> QDL protocol server init request sent
01 51 43 4f 4d 20 68 69 67 68 20 73 70 65 65 64 
20 70 72 6f 74 6f 63 6f 6c 20 68 73 74 00 00 00 
00 05 05 30 07 48 
<= QDL protocol init response received
7e 02 51 43 4f 4d 20 68 69 67 68 20 73 70 65 65 
64 20 70 72 6f 74 6f 63 6f 6c ff ff ff ff 24 00 
17 5c 05 05 00 00 00 00 00 00 00 00 00 00 00 00 
00 30 d6 8a 7e 
=> QDL protocol prep request sent
25 05 2c 50 a9 00 01 00 00 00 04 00 00 40 97 
<= QDL protocol prep response received
7e 26 00 00 01 00 00 00 04 52 65 7e 
=> QDL protocol init request sent
27 00 00 00 00 00 00 2c 50 a9 00 db ae 
QDL protocol server sent 1048576 bytes of image
QDL protocol server sent 1048576 bytes of image
QDL protocol server sent 1048576 bytes of image
QDL protocol server sent 1048576 bytes of image
QDL protocol server sent 1048576 bytes of image
QDL protocol server sent 1048576 bytes of image
QDL protocol server sent 1048576 bytes of image
QDL protocol server sent 1048576 bytes of image
QDL protocol server sent 1048576 bytes of image
QDL protocol server sent 1048576 bytes of image
QDL protocol server sent 610348 bytes of image
<= QDL protocol init response received
7e 0d 19 00 00 00 00 74 27 7e 
failed

the answer "7e 0d 19 00 00 00 00 74 27 7e" means that some error occur
after sending the fw image.

ok. probably the problem is elsewhere...

thanks

> 
> -- 
>  Ed Schouten <ed at 80386.nl>
>  WWW: http://80386.nl/




More information about the freebsd-usb mailing list