4

I have a Raspberry Pi Zero with one mini cable to USB wire which I used to today to connect a USB hub. The items connected to USB are not working. It's a USB wire powered hub. Is it safe to attach it and does it generally work?

2
  • A USB hub usually has one special port used as the upstream data line. Unless you are using that, this cannot work, and if that port is a normal USB jack (I think usually they aren't, to prevent confusion), then a standard microUSB cable may != an OTG cable.
    – goldilocks
    Oct 29, 2016 at 15:12
  • 1
    "Is it safe to attach it and does it generally work?" -> As long as the hub is not powered. If it is, you must make sure it is connected properly via an OTG adapter to the data uplink jack or else you will end up with two competing 5V supplies and that is probably not good.
    – goldilocks
    Oct 29, 2016 at 15:15

1 Answer 1

6

The internet, e.g. here, claims both that it works and that it does not at the same time.

I have a Zero with an old 4-port USB 2.0 hub (that just happend to lie about) that works just fine. While the hub could be powered by its own power supply it runs smoothly bus powered and with keyboard, mouse, and WiFi dongle attached. It's connected to the Pi using one of those micro-USB-OTG adapters that are sometimes bundled with the Zero. See below.

Some more clarification (per Goldilock's comments): the connection from the data port of the Pi Zero must be made with the upstream port of the hub. This is why a standard cable (Type A plug to micro-B plug, the kind of cable used to connect a phone to a PC or charger, see here will not work. It's A-plug would only connect to a downstream port of the hub. An USB-OTG adapter on the other hand provides a Type A receptacle (this is where the hub is connected) and a micro-A plug (this goes to the Pi's data port), see here.

An alternative to this is a dedicated OTG-hub, e.g. here, which comes with the correct cable attached (micro-B plug, see note below).


Working setup with OTG adapter and USB hub:

  • Left: cable that came with the hub, Type A plug (goes to host sytem) to Type Mini B plug (goes to upstream port of the hub).
  • Right: USB OTG adapter that came with the Pi Zero, Type A jack (receptacle) to Micro A plug (goes to the data port of the Pi)

enter image description here

  • Hub with Mini B jack (upstream port) and cable with Mini B plug.

enter image description here

  • full setup, Pi with power cable (power port, left), OTG adapter to hub (data port, middle), and HDMI (right).

enter image description here


Note: By the book (An OTG product must have a single micro-AB receptacle and no other USB receptacles.) an OTG device should have an micro-AB (and not an micro-B) jack and the OTG cable should have an micro-A plug (not an micro-B).

The Pi Zero however has an micro-B jack and the adapters that ship with it also come with a micro-B plug. It would seem that neither the Pi nor other devices really care about the USB spec.

5
  • I don't see why it shouldn't work via an adapter since OTG hubs should and do work, and "OTG" seems to be at most just a particular configuration for the wires. However, it's not clear from the question that the OP actually has it connected this way (I suspect it is a regular microUSB cable connected to one of the hub's slave ports).
    – goldilocks
    Oct 29, 2016 at 15:10
  • It's not a dedicated OTG hub (if there is such a thing) but some pretty standard and pretty old hub... but you're right, if not connected to the upstream port of the hub it will not work. Which is why - as you have explained in the comment to the question - a standard (non-OTG) micro-USB cable will not work.
    – Ghanima
    Oct 29, 2016 at 16:43
  • There is such a thing.
    – goldilocks
    Oct 29, 2016 at 16:45
  • Should this work (aliexpress.com/item/…)?
    – user431
    Oct 30, 2016 at 16:28
  • @goldilocks: I bought the one I mentioned in the above comment and it does not work.
    – user431
    Dec 25, 2016 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.