From owner-freebsd-usb@freebsd.org Wed Mar 13 14:47:09 2019 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C79F153564A for ; Wed, 13 Mar 2019 14:47:09 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [IPv6:2607:f3e0:0:1::12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smarthost1.sentex.ca", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C2128243D for ; Wed, 13 Mar 2019 14:47:08 +0000 (UTC) (envelope-from mike@sentex.net) Received: from [192.168.43.26] (pyroxene.sentex.ca [199.212.134.18]) by smarthost1.sentex.ca (8.15.2/8.15.2) with ESMTP id x2DEl6Ok027754; Wed, 13 Mar 2019 10:47:06 -0400 (EDT) (envelope-from mike@sentex.net) Subject: Re: strange USB timing issue with u3g To: Hans Petter Selasky , freebsd-usb@FreeBSD.org References: <3377e001-f035-acec-765c-aee7113f20d4@sentex.net> <2476a53c-e223-1c81-165c-73fa884f30da@selasky.org> From: Mike Tancsa Openpgp: preference=signencrypt Autocrypt: addr=mike@sentex.net; prefer-encrypt=mutual; keydata= mQENBEzcA24BCACpwI/iqOrs0GfQSfhA1v6Z8AcXVeGsRyKEKUpxoOYxXWc2z3vndbYlIP6E YJeifzKhS/9E+VjhhICaepLHfw865TDTUPr5D0Ed+edSsKjlnDtb6hfNJC00P7eoiuvi85TW F/gAxRY269A5d856bYrzLbkWp2lKUR3Bg6NnORtflGzx9ZWAltZbjYjjRqegPv0EQNYcHqWo eRpXilEo1ahT6nmOU8V7yEvT2j4wlLcQ6qg7w+N/vcBvyd/weiwHU+vTQ9mT61x5/wUrQhdw 2gJHeQXeDGMJV49RT2EEz+QVxaf477eyWsdQz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Fgkrsa5gdQhPiGGEdxhq/XSeAAnZ4uVLJKarH+mj5 MEhgZPEBWkGrbDZpezl9qbFcUem/uT9x8FYT/JIztMVh9qDcdP5tzANW5J7nvgXjska+VFGY ryZK4SPDczh74mn6GI/+RBi7OUzXXPgpPBrhS5FByjwCqjjsSpTjTds+NGIY Organization: Sentex Communications Message-ID: Date: Wed, 13 Mar 2019 10:47:05 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <2476a53c-e223-1c81-165c-73fa884f30da@selasky.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Rspamd-Queue-Id: 5C2128243D X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of mike@sentex.net designates 2607:f3e0:0:1::12 as permitted sender) smtp.mailfrom=mike@sentex.net X-Spamd-Result: default: False [-1.43 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.20)[-0.204,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f3e0::/32]; NEURAL_HAM_LONG(-0.93)[-0.928,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[sentex.net]; NEURAL_SPAM_SHORT(0.12)[0.116,0]; HAS_ORG_HEADER(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: smtp.sentex.ca]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[2.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.0.0.0.0.0.e.3.f.7.0.6.2.list.dnswl.org : 127.0.5.1] X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 14:47:09 -0000 On 3/12/2019 5:43 PM, Hans Petter Selasky wrote: > On 3/12/19 9:49 PM, Mike Tancsa wrote: >> > > Hi, > > Maybe the device expects some kind of BIOS to enumerate it quickly and > if not, goes into sleep mode. > > Try setting: > hw.usb.ehci.no_hs=3D1 > > In /boot/loader.conf . > > Does this change anything? usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR usbd_req_re_enumerate: addr=3D2, set address failed! (USB_ERR_IOERROR, ignored) usbd_req_re_enumerate: addr=3D2, set address failed! (USB_ERR_IOERROR, ignored) seems to reliably come up with this setting on when loading u3g out of loader.conf and letting devd do it later. The other variable that can trigger it is if I load a bunch of other klds like umodem, ucom,uplcom and uftdi.=C2=A0 > > USB devices are not allowed to return with a STALL-PID on set-address > messages, so this is violation of established USB standards. Maybe you > need a USB wire-analyzer to nail this issue. > > There are a bunch of tunables for example: > hw.usb.timings Although testing a bit with hw.usb.timings.extra_power_up_time=3D990 seems to make the error on dmesg just up come up at a different, later point. setting hw.usb.timings.port_powerup_delay=3D1000 does seem to help!=C2=A0 At least I was able to boot up 50% of the time.=C2= =A0 Trying with 2000 however, does not seem to make it better.=C2=A0 still 50= /50 > > Which affect how the USB device is enumerated. > > Is your device running the latest firmware from HUAWEI? Not sure. I have never upgraded the firmware in these guys before. Manufacturer: Huawei Technologies Co., Ltd. Model: ME909u-523 Revision: 11.430.63.00.00 IMEI: xxxxx +GCAP: +CGSM Do you know of any references on how to do this ?=C2=A0 Looking at the AT= command manual AT^FOTADET OK ^FOTASTATE: 11 ^DEND: 1,33,IPV4 and tried again AT^FOTADET OK ^FOTASTATE: 11 ^FOTASTATE: 13,13 ^HCSQ: "LTE",50,41,94,10 ^HCSQ: "LTE",44,41,137,22 AT^FOTADLQ ^FOTADLQ: 1,"FIRMWARE1",0,0 I think 13 means "New version query failed" My guess is that I need to setup some specific APN data to talk to Huawei ?=C2=A0 The modem is not specifically designed for the carrier, so= I dont know if the carrier usually has stuff behind the scenes for such updates. Although the command AT^FWLOAD=3D This command is used to specify the upgrade type, transmit the upgrade file into the module using 1K-Xmodem, and start the upgrade. The following table lists the ports supported by the full and differential upgrades. So if I can find a firmware file, I can do an old school xmodem-1k upload. I will see if I can find one from Huawei. > > --HPS > > --=20 ------------------- Mike Tancsa, tel +1 519 651 3400 x203 Sentex Communications, mike@sentex.net Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada =20