Page 1 of 1
USB on Raspberry Pi Zero W not working
Posted: Thu Aug 16, 2018 5:36 am
by raghava216
I brought out wires from the PP22 and PP23 USB pads on the rear side of Pi Zero W to an external connector. Also, took out wires from PP1 (5V) and PP6 (GND) for providing power to Pi Zero externally. During the process, I am sure that I did not short either of the USB wires to those coming from PP1 or PP6.
When I switched on the Pi, it booted up normally, but the mouse that I connected to its USB port did not work. Then, I measured the voltage between the PP1 (5V) and the micro USB connector body and found it to be 5V. So, it is getting the power but data lines are not working.
Any idea how to fix this?
Re: USB on Raspberry Pi Zero W not working
Posted: Thu Aug 16, 2018 6:09 am
by Imperf3kt
The Pi needs to assert itself as host.
You should short pin 4 on the microUSB connector, to ground (pin 5) using a 100 ohm resistor.
At least, as per my experience discussed here:
viewtopic.php?f=29&t=218905&p=1348903#p1348903
Re: USB on Raspberry Pi Zero W not working
Posted: Thu Aug 16, 2018 6:35 am
by raghava216
Any idea what would have happened with my Pi zero w?
Also, I think its difficult to put a 100 ohm resistor between pins 4 and 5 as u suggested.
Can I directly short them instead?
Re: USB on Raspberry Pi Zero W not working
Posted: Thu Aug 16, 2018 6:42 am
by Imperf3kt
I've seen devices that do this, and the information I pulled from Wikipedia isn't exactly clear on why the resistor is necessary, if at all.
I myself am going to try this sooner or later, so may have more info later.
As far as I can determine, it should be fine to do so.
Re: USB on Raspberry Pi Zero W not working
Posted: Thu Aug 16, 2018 7:49 am
by aBUGSworstnightmare
Sorry, but what are 'the wires' good for, and how did you connect your mouse?
If there is something connected to 'your wires' you can't connect another device to the RPI microUSB connector. If you want to connect multiple devices you will have to use a USB hub.
Re: USB on Raspberry Pi Zero W not working
Posted: Thu Aug 16, 2018 9:41 am
by Imperf3kt
aBUGSworstnightmare wrote: ↑Thu Aug 16, 2018 7:49 am
Sorry, but what are 'the wires' good for, and how did you connect your mouse?
If there is something connected to 'your wires' you can't connect another device to the RPI microUSB connector. If you want to connect multiple devices you will have to use a USB hub.
As I understand it, 'the wires', connect to the D+ and D- connections in the MicroUSB port, via use of the PP pads. It looks as if the OP wants to place a (single) full size USB-A port on the other end of said wires.
Basically, so using an OTG cable can be skipped, and possibly, so the position of the port can be repositioned inside an enclosure.
A hub is indeed necessary, if more than one USB device is required at a time.
Re: USB on Raspberry Pi Zero W not working
Posted: Thu Aug 16, 2018 10:11 am
by raghava216
In my final application, I can't have the usb cables coming sideways from the Pi Zero (default provision). Hence, I brought out those usb lines out. In lab, I connected mouse to the Pi Zero through an OTG cable.
Re: USB on Raspberry Pi Zero W not working
Posted: Thu Aug 16, 2018 11:30 am
by aBUGSworstnightmare
Understood. So, in case it is not working you will have to check your wiring. Try to keep the wire lenght same for D+ and D-.
I did similiar thing but used a PCB with Pogo-Pins instead of wires. Needed a WiFi stick which is supporting monitor mode

- CIMG1955.jpg (102.29 KiB) Viewed 1954 times
Re: USB on Raspberry Pi Zero W not working
Posted: Thu Aug 16, 2018 11:35 am
by thagrol
According to the device tree docs you should be able to force the usb driver into host mode:
Code: Select all
Name: dwc2
Info: Selects the dwc2 USB controller driver
Load: dtoverlay=dwc2,<param>=<val>
Params: dr_mode Dual role mode: "host", "peripheral" or "otg"
g-rx-fifo-size Size of rx fifo size in gadget mode
g-np-tx-fifo-size Size of non-periodic tx fifo size in gadget
mode
Source:
https://github.com/raspberrypi/firmware ... ays/README
Try adding
to /boot/config.txt.
Re: USB on Raspberry Pi Zero W not working
Posted: Mon Aug 20, 2018 7:20 am
by raghava216
thagrol wrote: ↑Thu Aug 16, 2018 11:35 am
According to the device tree docs you should be able to force the usb driver into host mode:
Code: Select all
Name: dwc2
Info: Selects the dwc2 USB controller driver
Load: dtoverlay=dwc2,<param>=<val>
Params: dr_mode Dual role mode: "host", "peripheral" or "otg"
g-rx-fifo-size Size of rx fifo size in gadget mode
g-np-tx-fifo-size Size of non-periodic tx fifo size in gadget
mode
Source:
https://github.com/raspberrypi/firmware ... ays/README
Try adding
to /boot/config.txt.
I tried this. But, it didn't work.
The Pi Zero W is still not getting detected with SSH.
Re: USB on Raspberry Pi Zero W not working
Posted: Mon Aug 20, 2018 2:03 pm
by thagrol
raghava216 wrote: ↑Mon Aug 20, 2018 7:20 am
I tried this. But, it didn't work.
The Pi Zero W is still not getting detected with SSH.
Ok.
- Have you enabled ssh?
- Have you rebooted since making that change?
- Do you have a stock cmdline.txt or have you modified it in anyway? E.g. to load any extra modules.
- With a monitor, USB hub, and keyboard connected to the stock USB port (and nothing to the one you added), are the USB devices recognised and are they reported by