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?
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)
- Hub with Mini B jack (upstream port) and cable with Mini B plug.
- full setup, Pi with power cable (power port, left), OTG adapter to hub (data port, middle), and HDMI (right).
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.