BegleBone Black no USB Hard Drive

This forum is for supported devices using an ARMv7 Texas Instruments (TI) SoC.

BegleBone Black no USB Hard Drive

Postby calzon65 » Fri Jun 27, 2014 6:42 pm

I ran across a strange situation today. I’m running my BBB with the latest Alarm (3.8.13-26-ARCH) and an external power supply; Alarm is installed on my eMMC and I'm booting from the eMMC.

When I plug in a USB solid state thumb drive (e.g., SanDisk Cruzer Blade 4GB), the applicable device appears (e.g., /dev/sda) and I can accesss (mount & read/write) the device with no problem. When I remove the USB thumb drive, the device (/dev/sda) disappears correctly as expected. Now when I plug in a USB3 hard drive (a WD My Passport) no drive light shows up on the hard drive (e.g., not even powered up) I tried both a USB2 and USB3 hard drive, but in both cases the light on the drive did not activate and I can’t hear the hard drive spinning, it's almost like it's not getting any and/or enough power. Also, I am not trying to boot from my USB hard drive, I just want to access it after I boot Alarm from my eMMC.

After trying two different USB (USB2 and USB3) hard drives I did not reboot my BBB when I decide to insert the USB thumb drive again, but now the USB thumb drive is no longer accessible (e.g., no /dev/sda appears). However, if I reboot the BBB, then I can use the USB thumb drive, multiple inserts/removals cause the device to perform as expected (e.g., /dev/sda appears and disappears as expected).

Not only does plugging in a USB (USB2 or USB3) hard drive not work, plugging it in then seems to “deactivate” the USB port for subsequent use for even a USB thumb drive. A reboot is required to clear this situation and make the USB thumb drive work again. Here is the really strange part ... if I run through the same scenarios after booting my BBB with Debian, I don’t have this problem; along with the USB thumb drive, the USB mechanical hard drive starts spinning and is recognized when I plug it in after bootup.

Before posting, I searched our forums but I did not find a post that seemed to match my problem. I did find two posts that seemed to mention similar issues:
viewtopic.php?f=48&t=7052&p=39162&hilit=usb+drive#p39162
viewtopic.php?f=9&t=1214

Because this problem does not exist if I boot my BBB with Debian (I installed a basic version of Debian from http://www.armhf.com), I’m assuming there is some package/driver I need to load for Alarm but I’m not sure what. I prefer to run Alarm versus Debian, but I am at a loss on how to solve this problem. Does anyone have a suggestion on how to allow my USB hard drive to work with Alarm?
calzon65
 
Posts: 80
Joined: Wed May 25, 2011 9:06 pm

Re: BegleBone Black no USB Hard Drive

Postby calzon65 » Mon Jun 30, 2014 9:35 pm

Any of the devs have a thought about this?
calzon65
 
Posts: 80
Joined: Wed May 25, 2011 9:06 pm

Re: BegleBone Black no USB Hard Drive

Postby PLyttle » Tue Jul 01, 2014 3:04 pm

Ok, Ill give it a stab.

most likely a power issue, where the hub shuts down on overcurrent.

Did you try this with a powered hub in between?

The first place to look is the device tree. Compare the one from Debian with the one from ARCH and spot the differences in USB related groups. Could be there is something like "disable-over-current" in the one from Debian.

Remember the specs tolerate a maximum of 500 mA. Anyting over that is considered overcurrent.

LP
PLyttle
 
Posts: 120
Joined: Mon Jun 10, 2013 6:52 am

Re: BegleBone Black no USB Hard Drive

Postby calzon65 » Tue Jul 01, 2014 7:45 pm

PLyttle,

Thank you, some very interesting comments. I will research and post my results. It may be that Arch for the BBB is correctly configured to address USB overcurrent and the version of Debian I installed is not. So you have defiantly peaked my interest to try to answer this riddle.

When you say the device tree, can you help me to understand where and how to look?
calzon65
 
Posts: 80
Joined: Wed May 25, 2011 9:06 pm

Re: BegleBone Black no USB Hard Drive

Postby PLyttle » Tue Jul 01, 2014 8:34 pm

The device tree is a data structure that describes the physical system to the kernel. It makes it possible to use the same kernel source for many (ideally all) different configurations. On Arch you can find it in /boot/dtbs/am335x-boneblack.dtb. You will find some 50 odd other trees, for similar systems.

On Debian I don't really know where it is located. but it won't be hard to find once you know what to look for.

Back to Arch, in order to be able to read your dtb file you need to de-compile it.
you need the dtc (device tree compiler) program, which is available as a package dtc-overlay or dtc

$this->bbcode_second_pass_code('', 'sudo pacman -S dtc-overlay')

type
$this->bbcode_second_pass_code('', 'dtc -I dtb -O dts -o my-decompiled-tree.dts /boot/dtbs/am335x-boneblack.dtb')
which creates my-decompiled-tree.dts sourcefile

It will be readable, but don't expect to understand much of it. Most symbols have been replaced by (mostly) hexadecimal numbers. But give it a go.

success. LP
PLyttle
 
Posts: 120
Joined: Mon Jun 10, 2013 6:52 am


Return to Texas Instruments (TI)

Who is online

Users browsing this forum: No registered users and 15 guests