Date: Fri, 22 Dec 2017 21:37:41 +0100 From: Hans Petter Selasky <hps@selasky.org> To: bob prohaska <fbsd@www.zefox.net> Cc: "Jukka A. Ukkonen" <jau789@gmail.com>, freebsd-arm@freebsd.org Subject: Re: Disapearing pl2303 usb serial adapter on rpi2 Message-ID: <7ba18476-43f5-5c59-c887-6d5e0cc186ea@selasky.org> In-Reply-To: <20171222041657.GA21799@www.zefox.net> References: <20171220170244.GA16029@www.zefox.net> <a312e6db-20ac-e12e-207e-1f0017cf8cad@gmail.com> <20171221161120.GA20324@www.zefox.net> <dfc17d98-a839-0ab9-2d1b-c47fe26be21e@selasky.org> <20171222041657.GA21799@www.zefox.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12/22/17 05:16, bob prohaska wrote: > Hi Hans, > >> Hi, >> >> You might want to run "usbdump" with the appropriate arguments to >> capture all USB traffic during such a cycle. >> > I'll try it next time the pl2303 locks up. > >> Further, you might want to only enable USB HUB debug messages to figure >> out why the USB stack thinks the device is going away: >> >> sysctl hw.usb.uhub.debug=17 >> > I've turned that on, and the console is spitting out a lot of output. > It'll make quite a haystack in which to find a needle 8-) Any hint > what to look for? > Hi, You should look for a port change event reporting a change in the status bits which is non-zero. >> From what I know, the RPI series of cards have a small external USB HUB >> on the board. All USB traffic goes through this High-Speed HUB. When you >> are using LOW and FULL speed, all traffic is translated from High-Speed >> USB into LOW and FULL speed USB. >> > > Would changing the baudrate have any effect? A console certainly needn't > run at 115200 baud. For present purposes 9600 or less is plenty. >> I don't rule out some kind of "bug" in this external piece of hardware. No, doesn't have anything to do with the USB packets. >> > Many have said pl2303 devices are unreliable, but they seem well-behaved > on a Mac and on an RPI3 running Raspbian. Whatever is wrong, it seems not > deterministic, but cumulative, with a touch of random. > >> You might also try to set (my wild guess): >> sysctl hw.usb.no_cs_fail=1 >> > Not sure I understand what this does; is there a description somewhere? This is a recovery mechanism, which triggers if the device appears dead, that it will automatically re-enumerate the USB device. Setting this sysctl prevents that mechanism. > >> Like already mentioned in this thread, the micro USB power input >> connecter on the RPI is not supposed to handle more than 500mA, >> regardless of how strong your power supply is. Then you need to subtract >> the mA's used by the CPU and other chips like ethernet. I wouldn't be >> surprised if ethernet functionality alone required 150mA at +5V. >> > Some time ago I put a voltmeter on the Pi and the voltage stayed over > five volts, but of course short spikes weren't visible in such a test. > On average, however, the connector seemed to handle the load. I think the USB specification mandates that the voltage must stay exactly within certain limits ... I don't remember all the details at the moment, but I think the USB 2.0 specification from usb.org will mention this. > >> USB LOW/HIGH/FULL speed all use some kind of pull-UP or pull-DOWN on the > >> data lines. This resistors are typically wired to +5V or GND (0V) on the >> board and transients in the voltage may be seen as a disconnect by the >> host or device. >> >> Regarding the DTB's. Make sure the USB data pins are correctly >> configured with regards to pullup/pulldown and not used as GPIOs. >> > Wouldn't that sort of error lead to things not working at all? The > problems observed develop after hours or sometimes days. I'm not sure. --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7ba18476-43f5-5c59-c887-6d5e0cc186ea>