USB modem power issues 

June 2014

Since some months I have a 3G USB dongle from Huawei connected to my Raspberry Pi. Together with Asterisk it acts as GSM gateway using chan_dongle. A couple of USB devices were already connected to the RPi: 2.5" HDD, WLAN stick, DVB-S receiver.

To supply all this and to power the Pi I energize a USB hub by a Goobay 5 Volts/3 Amperes power supply. Since I had connected the USB modem, the Raspberry Pi was in trouble: USB dropped out entirely a few seconds or several hours after reboot and sometime the Pi crashed and was not even accessible by serial console anymore. I have tried two HUAWEI internet sticks: E160 and E1550. Also I have tried three different USB hubs but nothing worked. If the RPi survived the USB crash, I could collect a bunch of error messages from kern.log (the messages differed from time to time, hub to hub, stick to stick):

raspbian kernel: smsc95xx 1-1.1:1.0 eth0: Failed to read reg index 0x00000114: -110
raspbian kernel: NYET/NAK/ACK/other in non-error case, 0x00000002
raspbian kernel: option1 ttyUSB0: option_instat_callback: error -71
raspbian kernel: smsc95xx 1-1.1:1.0 eth0: unexpected urb length 0
raspbian kernel: ERROR::handle_hc_chhltd_intr_dma:2591: handle_hc_chhltd_intr_dma: Channel 2, DMA Mode -- ChHltd set, but reason for halting is unknown, hcint 0x00000012, intsts 0x04000001
raspbian kernel: hub 1-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
raspbian kernel: usb 1-1: USB disconnect, device number 2
raspbian kernel: usb 1-1.1: USB disconnect, device number 3
raspbian kernel: smsc95xx 1-1.1:1.0 eth0: unregister 'smsc95xx' usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet
raspbian kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000034

...followed by a lot of messages by device drivers complaining that USB hardware disappeared.

Due to the 'EMI' message I connected the USB modem with a 5 meter active extension cable but nothing changed.

Based on many power issues with USB on Raspberry Pi reported around the world, I added one 1000 F capacitor directly to the HUAWEI stick to stabilize voltage during high current peaks. This was advised in several USB modem threads ... but nothing changed.

Then I checked the voltage (better late than never): Only 4.86 Volts arrived at the UMTS stick! So I grabbed an old wall power plug with USB port, labeled with 5.1 Volts/1 Ampere, and divided power and data path (see picture). To improve stability I added also 2 x 1000F low-ESR capacitors (that might be overkill).



That's it! Now the system runs stable since weeks. Looks like the power issues reported with USB modems are mainly caused by voltages below 5 Volt and not by insufficient power supplies (even if small power supplies causes volatage drops during current peaks). The USB specification allows 4.75 - 5.25 Volts but my sticks are not capable to deal with the lower end.

Note that in the picture all connections share a common ground. Even if USB uses differential signaling on data lines, there is some communication relatively to ground, too. It does not work if ground is not connected at the upper cable. There is no need to interconnect the shieldings, so you should not do it until you have a good reason.

And do not use a long USB cable between Raspberry Pi and modem. Even with a high quality cable I got USB disconnects every few seconds when using a 5 meter long cable. This cable worked fine with my notebook but not with the Pi. With a 3 meter cable it runs stable.

Have fun!