# usb host: sd card reader works through usb hub but not direct



## badger (Apr 11, 2012)

CM7, Alpha 3.5: I have an otg cable, then a y cable. I use a phone charger as the power supply for the y cable.

I can connect a usb stick (sandisk cruzer titanium) to the y cable, and all works fine. However, connecting my sandisk micromate sdhc card reader doesn't work (it doesn't mount, mounting manually using the terminal just gives a 'device not found' error).

However, if I connect a usb hub* to the y cable, then connect the sd card reader to the hub, it works.

* It's actually a targus usb docking station, which AFAICT is essentially a big usb hub with various usb-to-[vga/ps2 etc] adapters plugged in

I don't think it's a power supply issue, because I can connect the power lead of the y cable to the hub, and then connect the sd card reader direct, it still doesn't work, even though in this case it would (presumably) be getting exactly the same power as when plugged into the hub (my hub supplies usb power even when not connected to a host). And I'm pretty sure the y cable is functioning correctly, because if I don't connect the power lead of the y cable, nothing works at all (even the hub goes into power-only mode because it doesn't think it is connected to a host).

I'm kind of stuck for ideas about what's special about the hub that means the card reader works there but not directly.

Any ideas?


----------



## Dubi (Jan 19, 2012)

had a look at the logcat output when connecting the sd reader. It may give you some clues.
I know with mine I usually see some complain about not having enough power, which is easy ixed overwriting some system property


----------



## badger (Apr 11, 2012)

Ok, thanks, I'll try that when I get home - I did look at the output of dmesg and there were various messages about not enough power, but they seemed to show up whether it worked or not...

If it is the not enough power issue, can you remember which system property needs to be overwritten?

Thanks!


----------



## badger (Apr 11, 2012)

The output from logcat shows the sd card being mounted when plugged in via the hub, but shows nothing (not even an error message) when plugged in directly.


----------



## Dubi (Jan 19, 2012)

when you said "directly" you mean without additional power?
The TP can't provide power to the USB OTG so you always need to get the power from somewhere.


----------



## badger (Apr 11, 2012)

When I say directly, I mean "not using the usb hub"; I'm providing the power with the y cable.


----------



## Dubi (Jan 19, 2012)

ok, then check the dmesg output when you plug the SD reader
I will check when I'm home, but I remember some specific message about not having enough power and that the device will be disabled.


----------



## badger (Apr 11, 2012)

Yeah, I get the message about insufficient power,

When I connect it to the y cable, I get the following:



> <6>[12393.187990] usb 1-1: rejected 1 configuration due to insufficient available bus power
> <4>[12393.188019] usb 1-1: no configuration chosen from 1 choice


but when I connect it to the hub, and then connect the hub to the y cable, I get the following:



> <6>[12506.348434] scsi2 : usb-storage 1-1.5:1.0
> <5>[12507.352933] scsi 2:0:0:0: Direct-Access SanDisk SDDR-113 9412 PQ: 0 ANSI: 0


I guess it's fairly black and white, it's still odd though because when I connect the reader to the y cable, I'm connecting the power bit of the y cable to the hub just as a power source, so I'd expect exactly the same amount of power to be available! Oh well.

I'd still be interested to know which is the system property you mentioned overwriting though?


----------



## Dubi (Jan 19, 2012)

yes, that's the message I was getting when connecting my USB reader.
Doing something like this:

```
<br />
echo -n 1 | tee /sys/bus/usb/devices/1-1/bConfigurationValue<br />
```
will enable the device (at least it did it for me)


----------



## badger (Apr 11, 2012)

Works a treat, thanks very much Dubi!


----------

