2

first experience with Raspberry pi zero, and I decided to go with the simple retropie project. I installed retropie on it without any problems, during installation my controller was connected via the USB OTG cable. It was detected and configured without any problems.

Now to install ROMS I saved them on a 8GB USB drive and connected both to the pi zero via a 4 port usb hub (which was connected via the same OTG cable). The pi zero fails to detect the hub and anything connected to it. The controller and USB drive are detected individually but not via the hub.

The hub is a simple unpowered one, I believe its a USB 2.0 one. I have also tried another hub I had lying around and experienced the same problem.

Both these hubs work fine on my laptop.

I thought maybe my power supply was inadequate which was a 0.5A android charger, so I went ahead and bout a 1.4A charger and booted via that, but still had the same problem.

I searched and found this: https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=127158

many people are having problems with this, some people suggest that you need a powered hub for this to work butr a lot of people in that thread mentioned that they were using simple cheap unpowered ones as well without any problems.

Would appreciate some help please.

my setup:

The yellow is the HDMI cable, the white cable is the power cable. and the USB hub is attached to the USB OTG cable. Anything attached to the hub is not detected.

enter image description here

StuckInPhDNoMore
  • 123
  • 1
  • 1
  • 5

1 Answers1

4

I already have an OTG hub that works fine either powered or not as described here, but note when the hub is powered, it must be used to provide power to the Pi, since otherwise there would be two competing power sources and that is a bad thing.

But I decided to try this with an ordinary (optionally powered) USB hub, and ended up with a similar answer to this one from a similar question. People who are having a problem may want to look at both.

There are two traps I suspect people fall into:

  1. Believing you can plug the Pi into any random port on the hub with a microUSB cable. You can, and power the pi that way, but it will then be a slave device, meaning it won't have access to other devices on the hub.

    Instead, you must connect the hub's data line to the Pi. Unless they are specially designed, hubs have only one of those. This makes the Pi the master. There may be many slaves, but only one master.

  2. Believing you can power the Pi via the hub's data line. You cannot do that because the data line from the hub is intended to connect to a normal USB master, and masters provide power, they do not draw it. In other words, you can connect a normal hub via its data line and power the hub from the Pi, but not vice versa.

    This means with a normal USB hub, no matter what, you will have to connect both ports on the Zero to something, as shown below.

To make sure these points are clear:

  • If you want to use a normal USB hub as a hub with the Zero, you must connect the hub data line to it.
  • A normal hub does not provide power on the data line, so it cannot power the Pi that way.
  • You can power a hub this way from the Pi.

If you want a hub that you can both power the pi from and use as a hub, you need an OTG hub, not just a normal hub with an OTG adapter; see the first link above.

Here's two variations on the normal hub. In the first picture, the Pi is powering the hub:

enter image description here

A is the data line coming from the hub. It is connected to the data jack on the Pi. It's mostly hidden in the picture, but I'm using an OTG adapter on the other end that fits inside the normal size male end of the data cable, so what you can see is the smaller micro B jack sticking out of it into the Pi.

B is an RF keyboard/mouse transciever I used to test that the hub worked to provide slave devices. C is the power supply to the Pi, which is used to power the hub.

It can't be seen in the picture, but the hub is unplugged (there's a third variation on all this, since it also works with the hub plugged in but the pi powered separately).

Here's a variation on that where the hub is powered, and used to power the pi, but this requires two cables between the hub and the pi, one for the data line and a normal one to provide power.

enter image description here

The green dots are at either end of the data line (of which, again, there is only one per hub). The red dots are at either end of a normal microUSB cable used to power the Pi.

I would guess that if the hub is plugged in, it disconnects the power from the data line so there are not competing supplies. I'd also guess that any hub which can be used this way does the same thing, and that most powered hubs can be used this way. But I don't know for sure. In any case, it did not explode for me ;)

One thing you should be sure of: DO NOT PLUG TWO NORMAL PORTS INTO THE PI THIS WAY. One is okay. The other one here is the hub's data line.

goldilocks
  • 60,325
  • 17
  • 117
  • 234