Adminx
Posts: 4
Joined: Thu Sep 08, 2016 8:38 pm

Huawei E3372 and E3531 working on PI Zero

Thu Sep 08, 2016 9:04 pm

Hi All

I just wanted to let you know, that I have successfully configured a Huawei E3372 (not branded) on Raspberry PI Zero with Raspbian, without any additional USB hub.

Also the Huawei E3531 is confirmed to work with the configuration below.

Hopefully this short guide will help someone, I wasted a bit time to get it working... first I tried to use wvdial...

I'm using a USB power adapter with 2A.
The stick is directly connected to the PI with an OTG cable.
I used the routing mode and not the modem mode (which is needed for wvdial) as I found this solution much easier.

I've done the following steps:

Add the following line to the bottom of /boot/config.txt

Code: Select all

max_usb_current=1
apt-get install usb-modeswitch usb-modeswitch-data
Create /etc/udev/rules.d/70-usb-modeswitch.rules with the following content:

Code: Select all

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1f01", RUN+="/usr/sbin/usb_modeswitch -v 0x12d1 -p 0x1f01 -V 0x12d1 -P 0x1405 -J"
Restart your PI, afterward the Huawei E3372 should be recognized as a eth device and should get an IP address from the 192.168.8.0/24 range.

lsusb before udev rule:

Code: Select all

[email protected]:~# lsusb
Bus 001 Device 003: ID 12d1:1f01 Huawei Technologies Co., Ltd.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
lsusb after udev rule:

Code: Select all

[email protected]:~# lsusb
Bus 001 Device 003: ID 12d1:14dc Huawei Technologies Co., Ltd.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Huawei software version on the stick:

Code: Select all

22.200.15.02.1217
Huawei webinterface version on the stick:

Code: Select all

17.100.12.01.1217
Raspbian wheezy with all updates until 08.09.2016 which are available in the default repos.
Kernel version: 4.4.13+

Best

rjmarshalluk
Posts: 1
Joined: Fri Jan 06, 2017 1:37 pm

Re: Huawei E3372 and E3531 working on PI Zero

Fri Jan 06, 2017 3:13 pm

After messing around with various other solutions for an E3531 and Raspberry Pi3, this worked a treat. Thanks! :D

drgeoff
Posts: 10229
Joined: Wed Jan 25, 2012 6:39 pm

Re: Huawei E3372 and E3531 working on PI Zero

Fri Jan 06, 2017 5:38 pm

The max_usb_current line is completely superfluous (but not harmful) on a Zero. The power input line is directly connected to the supply to the USB (data) socket's power pin. No deliberate current limitation is present.

User avatar
ab1jx
Posts: 868
Joined: Thu Sep 26, 2013 1:54 pm
Location: Heath, MA USA
Contact: Website

Re: Huawei E3372 and E3531 working on PI Zero

Sat Aug 12, 2017 3:11 am

That's probably mostly fine, but just a note. With a USB hard drive (Seagate in a StarTech adapter) I'm getting a kernel panic if I try to boot with the modem connected. It says it can't mount the partition, etc. I just found it, haven't investigated yet. I made the /boot/config.txt change and copied and pasted the udev file verbatim since the numbers matched exactly (12d1:1f01). I have an E3372S-153. It does seem to modeswitch, I get the 12d1:14dc numbers afterward. I don't see it in ifconfig, plugging it in after booting. Or in dmesg, and the LED on the modem is blinking green. It's blinking twice every 2 seconds which according to Hauwei's quick start guide just means it's powered on. I haven't looked at the udev line that's going to modeswitch.

This is on a Pi 3, I do have another one without a hard drive and a Zero. OK, it finally showed up in dmesg as a storage device with the unswitched numbers 12d1:14dc. But there's also

Code: Select all

[  783.743972] cdc_ether 1-1.4.2:1.0 eth1: register 'cdc_ether' at usb-3f980000.usb-1.4.2, CDC Ethernet Device, 0c:5b:8f:27:9a:64
[  783.744395] usbcore: registered new interface driver cdc_ether
so maybe I just need to add it to /etc/network/interfaces. And unplug it while I'm booting up. Oh, I do have the modem plugged into a powered hub, the hard drive isn't.

User avatar
ab1jx
Posts: 868
Joined: Thu Sep 26, 2013 1:54 pm
Location: Heath, MA USA
Contact: Website

Re: Huawei E3372 and E3531 working on PI Zero

Sun Jan 21, 2018 11:09 pm

I don't remember what was up with that, I'm about to try again with a ZeroW.

Have you been able to receive and send SMS messages with this setup? It may take extra software.

User avatar
ab1jx
Posts: 868
Joined: Thu Sep 26, 2013 1:54 pm
Location: Heath, MA USA
Contact: Website

Re: Huawei E3372 and E3531 working on PI Zero

Mon Jan 22, 2018 4:13 am

Bah, I gave up again for the 3rd time at least. I did the USB mode switch thing. Added the modem to /etc/network/interfaces as eth1, which is what it shows up as in dmesg. I can ifup it and get a DHCP lease. But it doesn't like my sim. It works fine in my phone (Motorola XT1527) because I'm using it to post this. The web interface at 192.168.8.1 keeps telling me to insert a sim.

The sim fits in the socket at least 4 different ways, I didn't try sideways. Now I'm thinking it might be too small. I think they come in 4 different sizes, mine I think is the next to the smallest.

This is what the PDF shows:
installing_sim_pdf.png
installing_sim_pdf.png (8.1 KiB) Viewed 10476 times
This is what the actual sim and modem look like:
sim_in_modem.jpg
sim_in_modem.jpg (63.46 KiB) Viewed 10476 times
It doesn't fit the space snugly at all, but it's also the only sim I've ever had. My phone is falling apart from old age, I was planning to replace it with the modem. If I get a bigger sim then it won't fit the phone, and I'm not planning to pay $50/month for a 2nd one. I was hoping to occasionally swap it back and forth.

Yeah, I think I've got a micro and the modem wants a mini. https://en.wikipedia.org/wiki/Subscribe ... ity_module OK, there are adapters, I need to stop whining and order one. I'm glad I figured this out while I still have internet. If I could find decent dimensions or a Postscript drawing it is feasible to cut your own instead of waiting a week. The critical part is how the contacts line up.
GSM_Micro_SIM_Card_vs._GSM_Mini_Sim_Card_-_Break_Apart.png
GSM_Micro_SIM_Card_vs._GSM_Mini_Sim_Card_-_Break_Apart.png (20.71 KiB) Viewed 10443 times

User avatar
ab1jx
Posts: 868
Joined: Thu Sep 26, 2013 1:54 pm
Location: Heath, MA USA
Contact: Website

Re: Huawei E3372 and E3531 working on PI Zero

Wed Mar 20, 2019 3:36 am

I gave up and bought a NOS Motorola phone instead. I couldn't make the Huawei see the local phone towers I normally use (AT&T) despite a couple plug-in gain antennas near the ceiling. It sees a tower from a different company (T Mobile) but that does me no good.

Return to “Advanced users”