Skip to main content

Huawei e3276s-920 3G USB dongle modem + Raspberry Pi B (Raspbian Buster)

I have an old Raspberry B (with Raspbian Buster OS inside) and a 3G USB dongle Huawei e3276s-920 modem laying around in my closet. Let's try to install the modem and connect to internet.

First, install modeswitch

sudo apt-get install usb_modeswitch

Then check is wether my modem is recognised by the Pi. Plug the modem to usb port on the Pi, and from terminal:

pi@oldraspi:/var/log $ lsusb
Bus 001 Device 004: ID 12d1:14fe Huawei Technologies Co., Ltd. Modem (Mass Storage Mode)

Reboot the Pi with usb modem still plugged in, and again launch this command:

pi@oldraspi:/var/log $ lsusb
Bus 001 Device 007: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard

Note that  12d1:14fe before reboot and 12d1:1506 after reboot.  

Edit /etc/usb_modeswitch.conf, add following lines to the end of the file:

DefaultVendor=0x12d1
DefaultProduct=0x14fe

TargetVendor=0x12d1
TargetProduct=0x1506

MessageContent="55534243123456780000000000000011062000000100000000000000000000"

You may wondering what is 'MessageContent' and where to find it? Well, according to Configuration File Reference for USB_ModeSwitch :
"
* MessageContent           -M <hex string>
A hex string containing the "message" sequence; it will be
sent as a USB bulk transfer
"
Not much help, and I never know where to find it. I just lucky enough that I got it somewhere on the internet the right MessageContent for Huawei  e3276s-920 a.k.a 12d1:14fe. You can extract /usr/share/usb_modeswitch/configPack.tar.gz file and look for file according to your device and find config file inside.

Next step is reboot the Pi, type dmesg to verify that ttyUSB0 is registered. Now that our modem is properly installed, let's install wvdial. We do not use NetworkManager since we don't have GUI. 

sudo apt-get install wvdial

Then edit the configuration file:

sudo nano /etc/wvdial.conf

add the lines bellow, also remember to set correct APN. My APN is 'internet'.

[Dialer Defaults]
Init1 = ATZ
#Init2 = ATQ0 V1 E1 S0=0
Init2 = ATE1
Init3 = AT+CGDCONT=1,"ip","internet"
Modem Type = Analog Modem
MessageEndpoint = "0x01"
Phone = *99#
Stupid Mode =1
ISDN = 0
Password = { }
Username = { }
Modem = /dev/ttyUSB0
Baud = 460800
Auto Reconnect = on

To allow wvdial to connect automatically during reboot we need to edit interfaces.

sudo nano /etc/network/interfaces

And add theese lines:

auto ppp0
iface ppp0 inet wvdial

After reboot, type ifconfig and verify that your PPP connection has assigned ip adress.




Comments