A20-Olinuxino-LIME : cannot use USB HDD

Started by d4, July 12, 2015, 04:10:42 PM

Previous topic - Next topic

d4

dear all,

I have an old (and mostly unused) USB hard disk drive. It is a small model, 500Gb , 2.5'' form factori, and USB 2.0. I connected it to my A20-Olinuxino-LIME, but nothing happens.

As a comparison, when I connect it to my PC, I see this in kernel logs:

Quote
[177476.548175] usb 1-1: new high-speed USB device number 8 using ehci-pci
[177476.681893] usb 1-1: New USB device found, idVendor=07ab, idProduct=fc88
[177476.681900] usb 1-1: New USB device strings: Mfr=3, Product=11, SerialNumber=5
[177476.681903] usb 1-1: Product: Freecom Mobile Drive XXS
[177476.681907] usb 1-1: Manufacturer: Freecom
[177476.681910] usb 1-1: SerialNumber: C757312AAA8F
[177477.213873] usb-storage 1-1:1.0: USB Mass Storage device detected
[177477.216353] scsi6 : usb-storage 1-1:1.0
[177477.216489] usbcore: registered new interface driver usb-storage
[177478.259219] scsi 6:0:0:0: Direct-Access     Freecom  Mobile Drive XXS      PQ: 0 ANSI: 2 CCS
[177478.259555] sd 6:0:0:0: Attached scsi generic sg2 type 0
[177478.261397] sd 6:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/465 GiB)
[177478.263460] sd 6:0:0:0: [sdb] Write Protect is off
[177478.263465] sd 6:0:0:0: [sdb] Mode Sense: 28 00 00 00
[177478.265459] sd 6:0:0:0: [sdb] No Caching mode page found
[177478.265464] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[177478.330719]  sdb: sdb1 sdb2 sdb3
[177478.336467] sd 6:0:0:0: [sdb] Attached SCSI disk

Instead the Olinuxino totally ignores the drive. The command lsusb does not list it.

Since this drive is a USB 2.0, it should not require more than 500mA of current to run, and I see from the specs that the Olinuxino should provide as much...

So what am I missing ? Is there a kernel module that I should load?

thanks in advance.  a.

brmlst

Hi,
which kernel are you using?

What if you try connecting an USB flash drive instead of this disk, does Olinuxino still inìgnores it?

micropad

has the disk got a status led?

can you hear the disk rotation?

d4

I tried with a USB 4BG stick (solid state) and it works.

I tried with a USB hard disk drive that is externally powered, and it works.

I tried with another USB hard disk drive, a Seagate 500Gb USB 3.0 (but it usually works in USB2 ports), and again it does not work. Here is the kern log

Quote
ehci_irq: port change detect
usb 2-1: new high-speed USB device number 7 using sw-ehci
scsi4 : usb-storage 2-1:1.0
scsi 4:0:0:0: Direct-Access     Seagate  Expansion        0636 PQ: 0 ANSI: 6
sd 4:0:0:0: Attached scsi generic sg0 type 0
sd 4:0:0:0: [sda] Spinning up disk.......................ehci_irq: port change
usb 2-1: USB disconnect, device number 7
.ready
sd 4:0:0:0: [sda] READ CAPACITY failed
sd 4:0:0:0: [sda]  Result: hostbyte=0x01 driverbyte=0x00
sd 4:0:0:0: [sda] Sense not available.
sd 4:0:0:0: [sda] Write Protect is on
sd 4:0:0:0: [sda] Mode Sense: ff ff ff ff
sd 4:0:0:0: [sda] No Caching mode page found
sd 4:0:0:0: [sda] Assuming drive cache: write through
sd 4:0:0:0: [sda] READ CAPACITY failed
sd 4:0:0:0: [sda] READ CAPACITY failed
sd 4:0:0:0: [sda]  Result: hostbyte=0x01 driverbyte=0x00
sd 4:0:0:0: [sda] Sense not available.
sd 4:0:0:0: [sda] Write Protect is off
sd 4:0:0:0: [sda] Mode Sense: 00 5a 3a d0
sd 4:0:0:0: [sda] Asking for cache data failed
sd 4:0:0:0: [sda] Assuming drive cache: write through
sd 4:0:0:0: [sda] READ CAPACITY failed
sd 4:0:0:0: [sda]  Result: hostbyte=0x01 driverbyte=0x00
sd 4:0:0:0: [sda] Sense not available.
sd 4:0:0:0: [sda] Asking for cache data failed
sd 4:0:0:0: [sda] Assuming drive cache: write through
sd 4:0:0:0: [sda]  Result: hostbyte=0x01 driverbyte=0x00
sd 4:0:0:0: [sda] Sense not available.
sd 4:0:0:0: [sda] Asking for cache data failed
sd 4:0:0:0: [sda] Assuming drive cache: write through
sd 4:0:0:0: [sda] Attached SCSI disk

So it seems that the USB port of the OLinuxino is not providing enough current for the HD . I am surprised.

d4

Quote from: brmlst on July 12, 2015, 05:06:06 PM
which kernel are you using?

I am using the standard Debian image for  A20-Olinuxino-LIME, the kernel is 3.4.90+

brmlst

Likely is a limitation related to the USB current.
When I attach an USB disk to my Olinuxino, I do it through a powered hub.

Indeed it is quite common (not only with Olinuxino) that the USB port can't properly power an external disk, and sometimes, even if you have the disk running, then you can be afflicted by random "mysterious" faults (either disk-faults or whole-system-freeze).

LubOlimex

How do you power the A20-OLinuXino-LIME? Are you using a reliable power supply connected at the power jack?

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

d4

Dear Olimex,

My board is A20-OLinuXino-LIME;
I am using the power supply  SY0612E 12V 0.5A EURO PLUG (CHN)
and I have connected the battery BA-LIPO-3.7V/3000mAh-W-CA

I also tried with another power supply, 5V rated 3W (admittedly a cheap China product as well) , but it does not work either.

a.

d4

Here is the output of the commands


cd /sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply
for j in `find -type f ` ; do echo ============= $j ; cat $j ; done


done with battery and USB disk attached.

Quote
============= ./ac/type
Mains
============= ./ac/power/control
auto
============= ./ac/power/wakeup_abort_count
0
============= ./ac/power/wakeup_active
0
============= ./ac/power/wakeup_total_time_ms
0
============= ./ac/power/wakeup_active_count
1
============= ./ac/power/runtime_active_time
0
============= ./ac/power/wakeup_max_time_ms
0
============= ./ac/power/wakeup_count
1
============= ./ac/power/wakeup_last_time_ms
2558
============= ./ac/power/wakeup
enabled
============= ./ac/power/autosuspend_delay_ms
cat: ./ac/power/autosuspend_delay_ms: Input/output error
============= ./ac/power/runtime_status
unsupported
============= ./ac/power/wakeup_expire_count
0
============= ./ac/power/runtime_suspended_time
0
============= ./ac/current_now
321000
============= ./ac/online
1
============= ./ac/voltage_now
4953000
============= ./ac/uevent
POWER_SUPPLY_NAME=ac
POWER_SUPPLY_MODEL_NAME=ac
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_VOLTAGE_NOW=4953000
POWER_SUPPLY_CURRENT_NOW=321000
============= ./ac/model_name
ac
============= ./ac/present
1
============= ./usb/type
USB
============= ./usb/power/control
auto
============= ./usb/power/wakeup_abort_count
0
============= ./usb/power/wakeup_active
0
============= ./usb/power/wakeup_total_time_ms
0
============= ./usb/power/wakeup_active_count
1
============= ./usb/power/runtime_active_time
0
============= ./usb/power/wakeup_max_time_ms
0
============= ./usb/power/wakeup_count
1
============= ./usb/power/wakeup_last_time_ms
2559
============= ./usb/power/wakeup
enabled
============= ./usb/power/autosuspend_delay_ms
cat: ./usb/power/autosuspend_delay_ms: Input/output error
============= ./usb/power/runtime_status
unsupported
============= ./usb/power/wakeup_expire_count
0
============= ./usb/power/runtime_suspended_time
0
============= ./usb/current_now
0
============= ./usb/online
0
============= ./usb/voltage_now
0
============= ./usb/uevent
POWER_SUPPLY_NAME=usb
POWER_SUPPLY_MODEL_NAME=usb
POWER_SUPPLY_PRESENT=0
POWER_SUPPLY_ONLINE=0
POWER_SUPPLY_VOLTAGE_NOW=0
POWER_SUPPLY_CURRENT_NOW=0
============= ./usb/model_name
usb
============= ./usb/present
0
============= ./battery/temp
300
============= ./battery/type
Battery
============= ./battery/chgendcur
15
============= ./battery/chgmicrovol
4200000
============= ./battery/chgen
1
============= ./battery/ihold
0
============= ./battery/chgcsttimemin
720
============= ./battery/power/control
auto
============= ./battery/power/wakeup_abort_count
0
============= ./battery/power/wakeup_active
0
============= ./battery/power/wakeup_total_time_ms
13
============= ./battery/power/wakeup_active_count
23
============= ./battery/power/runtime_active_time
0
============= ./battery/power/wakeup_max_time_ms
5
============= ./battery/power/wakeup_count
23
============= ./battery/power/wakeup_last_time_ms
506193991
============= ./battery/power/wakeup
enabled
============= ./battery/power/autosuspend_delay_ms
cat: ./battery/power/autosuspend_delay_ms: Input/output error
============= ./battery/power/runtime_status
unsupported
============= ./battery/power/wakeup_expire_count
0
============= ./battery/power/runtime_suspended_time
0
============= ./battery/vhold
4000000
============= ./battery/chgintmicrocur
300000
============= ./battery/current_now
0
============= ./battery/capacity
100
============= ./battery/voltage_max_design
4200000
============= ./battery/health
Good
============= ./battery/adcfreq
100
============= ./battery/online
0
============= ./battery/status
Full
============= ./battery/voltage_now
4186000
============= ./battery/uevent
POWER_SUPPLY_NAME=battery
POWER_SUPPLY_MODEL_NAME=battery
POWER_SUPPLY_STATUS=Full
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_ONLINE=0
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_VOLTAGE_MAX_DESIGN=4200000
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=3300
POWER_SUPPLY_VOLTAGE_NOW=4186000
POWER_SUPPLY_CURRENT_NOW=0
POWER_SUPPLY_ENERGY_FULL_DESIGN=2100
POWER_SUPPLY_CAPACITY=100
POWER_SUPPLY_TEMP=300
============= ./battery/vholden
1
============= ./battery/iholden
0
============= ./battery/model_name
battery
============= ./battery/chgpretimemin
50
============= ./battery/technology
Li-ion
============= ./battery/energy_full_design
2100
============= ./battery/voltage_min_design
3300
============= ./battery/present
1

soenke

uhm, dont connect the 12V power supply to the lime, it is rated for 5V only!

5V 3W might not be enough to power your lime board. Use at least 5W, better 6-10W if you want to power the HDD via USB.

d4

sorry I copy pasted the wrong code. Yes I am plugging the 5V version into Lime. a.

d4

Quote5V 3W might not be enough to power your lime board. Use at least 5W, better 6-10W if you want to power the HDD via USB.

I see. I will buy one and try. Thanks. a.

JohnS

It's best not to even try to power the disk via the board's USB because many need too much starting current and the board (correctly) will not supply it.

I'd go for at least a 10W PSU, preferably more.  Failing to have enough current will just cause you pain.

Once you have everything working reliably you can try a lower power if you wish, knowing you can go back to something that works.

John