Huawei E303 3G Stick

This article describes how to use the Huawai E303 3G (UMTS) stick with the Raspberry Pi. It might also work for other Huawai models or even for different manufacturers. Let me know in the comments.

The Huawei E303 emulates a regular ethernet interface, which makes it very easy to use. It takes about two minutes to set up and will even support hot plugging. This is much easier than then wvdial approach described in many existing tutorials on the web.

The E303, like many other USB peripherals, defaults to mass storage (“memory stick”) mode to provide driver installation files for the OS. Once installed, the driver then switches the device to its actual function. On Linux, however, we don’t need to install any driver at all. We will use a small utility called usb-modeswitch to switch the E303 to 3G mode. Install this while the stick is not plugged in:

$ sudo apt-get install usb-modeswitch

Then add the following two lines to /etc/network/interfaces:

iface eth1 inet dhcp
allow-hotplug eth1

Now plug the stick directly into the Pi. Hubs may interfere with the E303 so be sure to disconnect them for now. Even if the stick is not connected through the hub, the hub may still stop it from working correctly. So first check that everything is working without a hub connected, then connect the hub and test whether it’s still working.

Verify that the new interface eth1 is active:

$ ifconfig eth1
eth1      Link encap:Ethernet HWaddr 12:34:56:78:9a:bc
          inet addr: Bcast: Mask:
          RX packets:79 errors:0 dropped:0 overruns:0 frame:0
          TX packets:69 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:9661 (9.4 KiB) TX bytes:6858 (6.6 KiB)

Ping your favorite server to test the connection.

The Huawei web interface is at It requires JavaScript, so use e.g. the Epiphany browser that comes preinstalled in NOOBS. Make sure the settings meet your needs. Specifically, enter your SIM card PIN or disable PIN entry. You can also use a regular cellphone to disable PIN entry.

Ready :-) You can unplug and replug the stick at any time.

Diagnosing the 3G stick

If the 3G stick is not working, try the following steps. This may help isolate the problem. Make sure you’re connecting the stick directly and are not using a hub.

First unplug the stick. Then remove usb-modeswitch if you installed it:

$ sudo apt-get remove usb-modeswitch

Now plug the stick directly into the Pi and watch it show up in lsusb:

Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 005: ID 12d1:1f01 Huawei Technologies Co., Ltd.

Note the ID <vendor>:<product> part. The values highlighted above indicate that the E303 is in mass storage mode. This is the useless mode that we need to switch away from.

Now (re)install usb-modeswitch:

$ sudo apt-get install usb-modeswitch

Then unplug and replug the stick. After a few seconds, run lsusb again:

Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 008: ID 12d1:14db Huawei Technologies Co., Ltd.

Verify that the product part of the ID has changed, indicating that the stick is now in 3G mode. If this step is working then continue with editing /etc/network/interfaces as described above. If not, then usb-modeswitch could not switch your stick to 3G mode (or it already is in 3G mode but doesn’t work for some other reason).

One thought on “Huawei E303 3G Stick

  1. Thank you !
    I can confirm that this worked for me .
    Once it worked for me, As an additional test I also pulled the power plug off the Pi for a couple of minutes and powered the Pi back up again (all this was done with the Huawiei E303 still connected to the PI) . The system worked perfectly with active 3g connectivity :)

    Spent a whole day trying various other methods online with tediously long procedures.

    Thanks again!

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.