Beaglebone Black USB Host turns off

Hello,

First a little bit of a background:

I have a beaglebone black connected to the mains with a 5V, 1A DC power supply.
I’m running an Xbee USB adapter board (http://goo.gl/ygIboV), and an XBee 900HP (http://goo.gl/0ZhtM6) on the USB port.
It’s running stock Angstrom Linux.

The problem is this:

About every 24 hours, the lights on my Xbee adapter board turn off and the device is nowhere to be seen on my lsusb output. Usually I can still ssh into the board after this happens. After a reboot, the board is fine for another 24 hours before the same thing happens again.

I have a hunch that the problem is the power supply, but is there anything else I could try before I go out and buy a new, more powerful supply?

My other question is why would the Xbee work at all if the problem is in fact a power supply that isn’t strong enough?

Thanks,

Kent Friesen

There is a bug in the linux USB driver so hotplugging does not work.
I the XBee for som reason disconnects itself, it won't be found.
Try put a hub in between.

If the problem disappears, then you ran into this, and not an adapter problem.

Ulf

Hi,

Thanks for the suggestion. I cannot try your suggestion at the moment as I do not have the beaglebone black here with me at the moment. If the problem turns out to be the hotplugging bug, is there any sort of patch to fix the bug? I’m planning to use the beagleboard in a production environment, so I would really prefer not to add an extra piece of hardware to the equation.

Maybe I should approach the problem from a different angle. Are there any Xbee capes out there for the beaglebone black? That would work out much better than having a cable and a Xbee USB adapter, and would reduce the probability of failure somewhat.

Regards,

Kent Friesen

Hey Freezen,

I am having a huge headache with USB, as well. This is how I have solved the problem, somewhat indefinitely, but I would love your feedback and perspective on it.

So, I have a very nice USB hub, Multi-TT, yadda yadda:
https://www.google.com/shopping/product/16657881332461573039?q=multitt%20hub&client=ubuntu&hs=6zE&channel=fs&biw=1301&bih=678&ei=NqCKUprbLaWViALGyICgDg&ved=0CKEEEKYrMAE&prds=scoring:p

(you can find it cheaper)

Apperently Hot-Plug works IF the hub you have is booted with a device installed in it. For example, I can hot plug in a wireless adapter so long as I have a thumbdrive installed in the hub when my BBB boots.

I Imagine your xbee’s will be installed in the hub when you boot, but if they drop out and come back in, you may get a USB Babble Error if there is nothing else in the hub.

https://github.com/beagleboard/kernel/issues/64#issuecomment-28486198

Maybe getting a decent hub and leaving a thumbdrive in the hub will make your system more stable.

I know, it’s a lame solution, but it is what it is.

Another possibility is just getting some xbee breakout boards and connectiong the XBee directly to your BBB’s tty’s. A protocape and a pair of XBee breakouts would get you around the USB subsystem completely. This might be preferred, anyway.

http://www.droids.it/cmsvb4/content.php?143-990-001-XBee-Simple-Board

or

https://www.sparkfun.com/products/8276
https://www.sparkfun.com/products/8272

with

http://www.adafruit.com/products/572

Definitely would use tty. I have rolled my own and also will have a cape soon.

Hi,
does anybody know if there is a progress with this bug? I have installed latest available Angstrom distro and running “Linux beaglebone 3.8.13 #1 SMP Tue Jun 18 02:11:09 EDT 2013 armv7l GNU/Linux” and I can see random problem with USB host. One scenario: after reboot I can see 5V at connector and when I insert keybord it’s detected (dmesg, lsusb), when I reconnect mouse it works too but when I disconnect I can see there is 0V at USB and lsusb still displays mouse. 0V is there till reboot. I think it’s some race condition or so in USB detection code. Scenario may change it’s rather random. I don’t think it’s because of USB overcurrent protection. USB driver is instructed to power off. Seems it’s compiled in module in kernel, I can see lsmod related module. Is it possible somehow restart USB support ?

I found it’s rather well known problem (many posts) but I’ve not found reliable solution - I think it’s software bug not electrical. Any help appreciated before I sink in kernel code :wink:

I believe it’s pretty common critical problem to be left unsolved.

Thanks
Tomas

Dne sobota, 16. listopadu 2013 6:18:29 UTC+1 APRichelieu napsal(a):

I’m running 3.12 and the bug still exists… very disappointing. It’s so repeatable it should be easy to narrow in on. I am begging people to let me help them, give them test cases, bug info, etc. Crickets

Hi,

Sorry I didn’t get back to you guys. I have not done any sort of USB hub setup, nor do I see myself doing such. For now the XBee has been working for about a week, so the bug is just waiting to occur again. As for my setup, what I may do for now (although it’s an extremely ugly hack) is just reboot the board whenever the USB device disappears, since the device will be hooked to the board for 99% of its life. A more longterm solution to my personal problem will be a standalone custom board or a custom cape for the xbee. As for the bug itself, I cannot help, because I do not know the ins and outs of the x86 IBM PC compatible computer that I would need to fix it.

Regards,

Kent Friesen

There is a problem in the driver, which I noted when I tried hotplugging.
With my fix, I can hotplug a mouse, keyboard, USB serial and a hub, do not know if my fix solves your problem though.

Started a crowdfunding project for this at http://igg.me/at/eMagii/x/5581172

I have a un-powered usb hub plugged into my beaglebone black and after an unkonwn amount of time power to the hub shuts off .

Hello,

I have the same problem as yours.
Did you find something?

Please Help :slight_smile:

I too lose power to my USB bus after about a minute of operation. The unpowered USB hub is connected to a cheap USB keyboard, a Razer Death Adder mouse (whose details were included in case the additional current draw from a laser mouse messes anything up), and a micro USB wifi adapter.

I also noticed that when starting up the BBB with the fully loaded hub and an ethernet cable plugged in, the ethernet controller wont connect

Hi,

I have been following this USB thread for a while and wanted to add my 2 cents. I have a related but “opposite” problem. My hot plug works but my cold plugs does not. Let me clarify.

What works:

  1. Boot the Beagle Bone Black (the “BBB”) with now USB pluged in
  2. Plug in a powered USB hub
  3. Everything works as expected
  4. Unplug usb
  5. Plug USB back in. Everything works as expected. So hot plug works.

What fails

  1. Power up the BBB with the powered USB connected. The USB hub come up alot faster than the BBB.
  2. No matter what is done, there is no way to get the BBB to see the USB devices apart from following up a reboot / power cycle as stated above.

Comments:

OS: Richard Nelson’s Linux version 3.8.13-bone30 (root@imx6q-sabrelite-1gb-1) (gcc version
4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu8) ) #1 SMP Thu Nov 14 06:23:24 UTC 2013

Hardware: BBB Rev B. Only started shipping from March 2014 onwards. I noticed a capacitor discrete mounted near the USB port. Is this a Rev B hack?

What I am trying to solve

I would like to have the USB devices come online upon power up without having to observe the (1) BBB on first (2) plug in the USB Hub + devices sequence. I.E. if I stick all this stuff into an embedded gadget it would not come up on power up. I would have to have some sort of two-phase relay hardware in place to (1) power up the BBB first, then (2) the USB + USB devices / dongles.

Any thoughts / solutions?

Best, Mike

Some cut-and-paste info

buntu@woofieone:~$ lsusb
Bus 001 Device 007: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 006: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 001 Device 008: ID 154b:004f PNY
Bus 001 Device 005: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Here is a USB GREP

ubuntu@woofieone:~$ dmesg | egrep usb
[ 0.135150] usbcore: registered new interface driver usbfs
[ 0.135217] usbcore: registered new interface driver hub
[ 0.135457] usbcore: registered new device driver usb
[ 1.464285] usbcore: registered new interface driver cdc_ether
[ 1.479302] usbcore: registered new interface driver rndis_host
[ 1.503131] usbcore: registered new interface driver cdc_ncm
[ 1.523280] usbcore: registered new interface driver cdc_acm
[ 1.567758] usbcore: registered new interface driver usb-storage
[ 1.621644] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[ 1.628255] musb-hdrc musb-hdrc.0.auto: pdev->id = 0
[ 1.633507] musb-hdrc musb-hdrc.0.auto: drivers/usb/musb/musb_dsps.c:468 dsps_musb_init: OK
[ 1.656309] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[ 1.656326] musb-hdrc: MHDRC RTL version 2.0
[ 1.656335] musb-hdrc: setup fifo_mode 4
[ 1.656351] musb-hdrc: 28/31 max ep, 16384/16384 memory
[ 1.656456] musb-hdrc musb-hdrc.0.auto: *** mode=3
[ 1.661525] musb-hdrc musb-hdrc.0.auto: *** power=250
[ 1.692769] musb-hdrc musb-hdrc.1.auto: pdev->id = 1
[ 1.698031] musb-hdrc musb-hdrc.1.auto: drivers/usb/musb/musb_dsps.c:468 dsps_musb_init: OK
[ 1.715656] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
[ 1.715668] musb-hdrc: MHDRC RTL version 2.0
[ 1.715677] musb-hdrc: setup fifo_mode 4
[ 1.715689] musb-hdrc: 28/31 max ep, 16384/16384 memory
[ 1.715786] musb-hdrc musb-hdrc.1.auto: *** mode=1
[ 1.720837] musb-hdrc musb-hdrc.1.auto: *** power=250
[ 1.726151] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.758390] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 1.766666] musb-hdrc musb-hdrc.1.auto: supports USB remote wakeup
[ 1.766748] usb usb1: default language 0x0409
[ 1.766783] usb usb1: udev 1, busnum 1, minor = 0
[ 1.766796] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 1.773951] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.781539] usb usb1: Product: MUSB HDRC host driver
[ 1.786761] usb usb1: Manufacturer: Linux 3.8.13-bone30 musb-hcd
[ 1.793073] usb usb1: SerialNumber: musb-hdrc.1.auto
[ 1.825146] usb usb1: usb_probe_device
[ 1.825166] usb usb1: configuration #1 chosen from 1 choice
[ 1.825217] usb usb1: adding 1-0:1.0 (config #1, interface 0)
[ 1.825330] hub 1-0:1.0: usb_probe_interface
[ 1.825343] hub 1-0:1.0: usb_probe_interface - got id
[ 1.934524] usb usb1: bus auto-suspend, wakeup 1
[ 2.116993] usbcore: registered new interface driver usbhid
[ 2.122933] usbhid: USB HID core driver
[ 5.561628] usbcore: registered new interface driver rtl8192cu
[ 23.760104] usb usb1: usb wakeup-resume
[ 23.760150] usb usb1: usb auto-resume
[ 23.969260] usb 1-1: new high-speed USB device number 2 using musb-hdrc
[ 24.088645] usb 1-1: default language 0x0409
[ 24.088715] usb 1-1: udev 2, busnum 1, minor = 1
[ 24.088730] usb 1-1: New USB device found, idVendor=1a40, idProduct=0101
[ 24.088742] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 24.088753] usb 1-1: Product: USB 2.0 Hub
[ 24.090507] usb 1-1: usb_probe_device
[ 24.090535] usb 1-1: configuration #1 chosen from 1 choice
[ 24.092498] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[ 24.092724] hub 1-1:1.0: usb_probe_interface
[ 24.092741] hub 1-1:1.0: usb_probe_interface - got id
[ 24.363806] usb 1-1.3: new full-speed USB device number 3 using musb-hdrc
[ 24.459263] usb 1-1.3: default language 0x0409
[ 24.461214] usb 1-1.3: udev 3, busnum 1, minor = 2
[ 24.461232] usb 1-1.3: New USB device found, idVendor=0a12, idProduct=0001
[ 24.461245] usb 1-1.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 24.461256] usb 1-1.3: Product: CSR8510 A10
[ 24.461819] usb 1-1.3: usb_probe_device
[ 24.461839] usb 1-1.3: configuration #1 chosen from 1 choice
[ 24.462756] usb 1-1.3: adding 1-1.3:1.0 (config #1, interface 0)
[ 24.463213] usb 1-1.3: adding 1-1.3:1.1 (config #1, interface 1)
[ 24.519918] btusb 1-1.3:1.0: usb_probe_interface
[ 24.519949] btusb 1-1.3:1.0: usb_probe_interface - got id
[ 24.529170] usbcore: registered new interface driver btusb
[ 24.533029] usb 1-1.4: new high-speed USB device number 4 using musb-hdrc
[ 24.612124] usb 1-1.4: default language 0x0409
[ 24.612211] usb 1-1.4: udev 4, busnum 1, minor = 3
[ 24.612227] usb 1-1.4: New USB device found, idVendor=1a40, idProduct=0101
[ 24.612240] usb 1-1.4: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 24.612251] usb 1-1.4: Product: USB 2.0 Hub
[ 24.612741] usb 1-1.4: usb_probe_device
[ 24.612762] usb 1-1.4: configuration #1 chosen from 1 choice
[ 24.612904] usb 1-1.4: adding 1-1.4:1.0 (config #1, interface 0)
[ 24.613060] hub 1-1.4:1.0: usb_probe_interface
[ 24.613074] hub 1-1.4:1.0: usb_probe_interface - got id
[ 24.717887] usb 1-1.4: usb auto-suspend, wakeup 1
[ 58.956081] usb 1-1: USB disconnect, device number 2
[ 58.956095] usb 1-1.3: USB disconnect, device number 3
[ 58.956106] usb 1-1.3: unregistering device
[ 58.956119] usb 1-1.3: unregistering interface 1-1.3:1.0
[ 58.956467] musb-hdrc musb-hdrc.1.auto: shutdown urb de1c4bc0 ep1in-intr
[ 58.956491] musb-hdrc musb-hdrc.1.auto: shutdown urb de329f40 ep2in-bulk
[ 58.956508] musb-hdrc musb-hdrc.1.auto: shutdown urb de329e40 ep2in-bulk
[ 58.966138] usb 1-1.3: unregistering interface 1-1.3:1.1
[ 58.966430] usb 1-1.3: usb_disable_device nuking all URBs
[ 58.966915] usb 1-1.4: USB disconnect, device number 4
[ 58.966930] usb 1-1.4: unregistering device
[ 58.966942] usb 1-1.4: unregistering interface 1-1.4:1.0
[ 58.967341] usb 1-1.4: usb_disable_device nuking all URBs
[ 58.969200] usb 1-1: unregistering device
[ 58.969222] usb 1-1: unregistering interface 1-1:1.0
[ 58.969414] musb-hdrc musb-hdrc.1.auto: shutdown urb de1c46c0 ep1in-intr
[ 58.973932] usb 1-1: usb_disable_device nuking all URBs
[ 59.083145] usb usb1: bus auto-suspend, wakeup 1
[ 67.196410] usb usb1: usb wakeup-resume
[ 67.196457] usb usb1: usb auto-resume
[ 67.405253] usb 1-1: new high-speed USB device number 5 using musb-hdrc
[ 67.524620] usb 1-1: default language 0x0409
[ 67.524688] usb 1-1: udev 5, busnum 1, minor = 4
[ 67.524702] usb 1-1: New USB device found, idVendor=1a40, idProduct=0101
[ 67.524715] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 67.524726] usb 1-1: Product: USB 2.0 Hub
[ 67.526497] usb 1-1: usb_probe_device
[ 67.526525] usb 1-1: configuration #1 chosen from 1 choice
[ 67.528467] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[ 67.528691] hub 1-1:1.0: usb_probe_interface
[ 67.528708] hub 1-1:1.0: usb_probe_interface - got id
[ 67.799792] usb 1-1.3: new full-speed USB device number 6 using musb-hdrc
[ 67.895269] usb 1-1.3: default language 0x0409
[ 67.897204] usb 1-1.3: udev 6, busnum 1, minor = 5
[ 67.897222] usb 1-1.3: New USB device found, idVendor=0a12, idProduct=0001
[ 67.897235] usb 1-1.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 67.897246] usb 1-1.3: Product: CSR8510 A10
[ 67.897799] usb 1-1.3: usb_probe_device
[ 67.897820] usb 1-1.3: configuration #1 chosen from 1 choice
[ 67.898711] usb 1-1.3: adding 1-1.3:1.0 (config #1, interface 0)
[ 67.898948] btusb 1-1.3:1.0: usb_probe_interface
[ 67.898965] btusb 1-1.3:1.0: usb_probe_interface - got id
[ 67.902207] usb 1-1.3: adding 1-1.3:1.1 (config #1, interface 1)
[ 67.969786] usb 1-1.4: new high-speed USB device number 7 using musb-hdrc
[ 68.050043] usb 1-1.4: default language 0x0409
[ 68.050111] usb 1-1.4: udev 7, busnum 1, minor = 6
[ 68.050125] usb 1-1.4: New USB device found, idVendor=1a40, idProduct=0101
[ 68.050138] usb 1-1.4: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 68.050149] usb 1-1.4: Product: USB 2.0 Hub
[ 68.050658] usb 1-1.4: usb_probe_device
[ 68.050679] usb 1-1.4: configuration #1 chosen from 1 choice
[ 68.050816] usb 1-1.4: adding 1-1.4:1.0 (config #1, interface 0)
[ 68.050956] hub 1-1.4:1.0: usb_probe_interface
[ 68.050970] hub 1-1.4:1.0: usb_probe_interface - got id
[ 68.155761] usb 1-1.4: usb auto-suspend, wakeup 1
[ 280.645675] usb 1-1.1: new high-speed USB device number 8 using musb-hdrc
[ 280.857913] usb 1-1.1: default language 0x0409
[ 280.859216] usb 1-1.1: udev 8, busnum 1, minor = 7
[ 280.859265] usb 1-1.1: New USB device found, idVendor=154b, idProduct=004f
[ 280.859305] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 280.859340] usb 1-1.1: Product: USB 2.0 FD
[ 280.859373] usb 1-1.1: Manufacturer: PNY Tech
[ 280.859405] usb 1-1.1: SerialNumber: 055811050105115493000298
[ 280.864561] usb 1-1.1: usb_probe_device
[ 280.864628] usb 1-1.1: configuration #1 chosen from 1 choice
[ 280.868047] usb 1-1.1: adding 1-1.1:1.0 (config #1, interface 0)
[ 280.868795] usb-storage 1-1.1:1.0: usb_probe_interface
[ 280.868877] usb-storage 1-1.1:1.0: usb_probe_interface - got id
[ 280.872671] scsi0 : usb-storage 1-1.1:1.0

Update of previous post:
I’m currently running BBB Linux CNC image based on Debian Wheezy 7.3 on SDCard. I had to upgrade kernel to “Linux arm 3.14.0-rc8-bone0 #1 SMP Sat Mar 29 00:25:15 UTC 2014 armv7l GNU/Linux” from package Debian because of compiled in support for DS3232 RTC clock. I can see hot plug is running correctly. I can plug/unplug mouse and keyboard any time. Cold plug after reboot works as well. HDMI display is working too. Even Velleman 7-port HUB works too - which was not working on Angstrom at all.

Note: I originally built Angstrom image 12/2013 (becuase I need module mentioned above). But because I was not able get it booting from SDCard I moved to my working Debian. Seems there is even older 3.2.28 Kernel than I had before 3.8.13.

  • Tomas

3.8 version…

http://beagleboard.org/latest-images

Gerald

I’ve found meanwhile any version greater than 3.8.x is useless because does not contain cape manager (capemgr). It pays also for Robert Nelson’s 3.13.x repository I’ve tested it but USB hotplug does not work too. HUB also does not work. Maybe there is minor difference (slightly more hopeful) but useless. I have compiled “Linux arm 3.8.13-bone45 #1 SMP Wed Apr 9 00:58:12 CEST 2014 armv7l GNU/Linux” from sources and USB hot plug (and HUB) does not work at all. I need it for cape development because of capemgr. I.e. the only good-hot-USB-plug kernel version is from my point of view 3.14.x.

I suppose it’s also problem of http://beagleboard.org/latest-images.

Tomas