From owner-freebsd-usb@FreeBSD.ORG Mon Oct 4 11:48:02 2010 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19168106566C for ; Mon, 4 Oct 2010 11:48:02 +0000 (UTC) (envelope-from br@bsdjail.com) Received: from bsdpad.com (bsdpad.com [81.19.69.224]) by mx1.freebsd.org (Postfix) with ESMTP id 7425B8FC1C for ; Mon, 4 Oct 2010 11:48:01 +0000 (UTC) Received: from [81.19.69.226] (helo=bsdjail.com) by bsdpad.com with esmtp (Exim 4.71 (FreeBSD)) (envelope-from ) id 1P2jWR-0001PD-Lx; Mon, 04 Oct 2010 15:47:59 +0400 Received: (from br@localhost) by bsdjail.com (8.14.4/8.14.4/Submit) id o94BlxGD005406; Mon, 4 Oct 2010 15:47:59 +0400 (MSD) (envelope-from br) Date: Mon, 4 Oct 2010 15:47:59 +0400 From: Ruslan Bukin To: Ed Schouten Message-ID: <20101004114759.GA5048@bsdjail.com> References: <20101004100641.GA3403@bsdjail.com> <201010041308.28424.hselasky@c2i.net> <20101004112650.GF77154@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20101004112650.GF77154@hoeg.nl> User-Agent: Mutt/1.5.20 (2009-06-14) X-Broken-Reverse-DNS: no host name for IP address 81.19.69.226 Cc: freebsd-usb@freebsd.org Subject: Re: /dev/ttyU0 - block at open X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Oct 2010 11:48:02 -0000 On Mon, Oct 04, 2010 at 01:26:50PM +0200, Ed Schouten wrote: > Ruslan, > > * Hans Petter Selasky 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 > WWW: http://80386.nl/