Setting up a 3G/4G modem with OpenWRT on the MPR-L8 or A5-V11

In my previous post, I have explained how to upload an OpenWRT image to the MPR-L8 or A5-V11, now we will go trough how to set it up for working as a mini 3G/4G router.

There are at least 2 major families of 3G/4G routers, usually the 3G ones emulate a serial connection over the USB interface, while the 4G ones emulate a network card over the USB interface. To decide which one you have, for the serial ones there is usually a separate dialer program in windows  to start the connection, while the network ones have a web page is opened in the browser to set up the connection. For my tests I have used ZTE MF110 and ZTE MF680 as serial ones and ZTE MF821D as network one.

The setup is very easy, it is all done trough the OpenWRT web interface and reading this post probably takes more time than doing the setup itself.

In this post I will cover only the serial connection type.

The setup is done in the following steps:

  1. Initial setup of OpenWrt after flashing the firmware
  2. Install additional OpenWRT packages to the router
  3. Setup the 3G/4G connection
  4. Setup the WiFi access point of the router

To do the setup for the first time, you will need a working WiFi internet connection.

1. Initial setup of the router

The first two steps are to log into the router and set up a password for it.

Connect your PC to the router with a LAN cable, disable WiFi on your PC and power on the router. After approximately one minute the router is ready, now open your browser and go to or to openwrt.lan.

Just press the Login button as initially there is no password set up.

After logging in click on the top yellow area to "Go to password configuration..." to set up a password.

Enter your password 2 times and and press Save and Apply. In the following sections always press Save and Apply when changing the router settings.

As many home WiFi networks are configured to the IP address which will cause a conflict with the routers default address (which is the same it is recommended to change the routers IP address.

To do this select Network/Interfaces/LAN/Edit and change the IPv4 address to or to the network address of your choice.

After setting this up, your browser will be redirected to the new IP address, if not, you have to manually enter the new address in your browser.

2. Installing additional OpenWRT packages

The easiest way to install the additional packages is to connect the router to the existing WiFi network as a client and simply install the packages using the OpenWRT web interface.

Connecting to a WiFi network as client:

To connect the to the WiFi as a client, go to Network/WiFi/Scan

Select your network and click "Join Network"

Enter your WiFi password, and select the firewall zone wan.

On the next screen:

Select that the new interface should be part of the wan network in addition to the now created wwan.

If everything went well now you should be connected to the WiFi network with the router.

Installing the needed packages

Go to System/Software and press Update lists

This will load the list of downloadable packages to the router. Now go to the "Available packages" tab and install the following packages: kmod-usb-serial-option, usb-modeswitch and luci-proto-3g.

When this is ready, reboot the router (System/Reboot):

3. Setting up the 3G/4G connection

After reboot, it is time to plug in your 3G modem. If you have plugged it in earlier, you need to remove it and plug it in again.

Now go to Network/Interfaces and click Add new interface.

Give a nice name to the interface e.g. umts (or Victor if you wish) and select the UMTS/GPRS/EV-DO protocol and click Submit.

On the Common configuration tab select the modem device (usually it is /dev/ttyUSB0 or 1 or 2), you may have to experiment to find out which one is working. Set the service type to UMTS/GPRS and enter the APN for the mobile connection. If you need, fill out the pin code and username/password. 

Afterwards go to the Firewall tab and set that this interface is in the wan zone.

If you have difficulties identifying the correct serial port, in the Status/Kernel log you can search for the found USB serial lines. If you don't see them, then your modem was not correctly detected.

In this log you can see that my MF 110 was detected as 3 serial lines.

When you finish setting up the new umts interface, then it should connect automatically. You can check that in the Network/Interfaces menu:

If it is not connected, then you can try pushing the Connect button.

Now our UMTS connection is set up, we can disable the WiFi client connection and add a WiFi hotspot instead.

4. Setting up the WiFi access point in the router

Go to Network/Wifi and select Edit for the client connection:

Enter the desired WiFi name in the ESSID field, change Mode to Access point, change network to lan.

Now go to the Wireless Security tab, select Encryption as WPA-PSK2, Cipher auto and the Key to the password what you want to use for the WiFi network.

You are ready, now you can connect to the WiFi of your mini router and use the mobile internet connection.

Note 1: This router supports multiple virtual WiFi interfaces, so instead of changing the client WiFi connection to the Access point one you can Add a new virtual WiFi adapter and set it up as an Access Point. In this case if you are in the range of the WiFi connection you can share/use the WiFi connection instead of the mobile internet.

Note 2: For some reason, if the modem is plugged in when the device boots or reboots, then the serial ports are not created/detected. This problem is probably related to running or not running usb-modeswitch to put the modem in serial mode. If you experience this, just remove the modem and plug it in back, when the router is already running.


DiiKwad said…
You can also try this:
Anonymous said…
Thanks a lot for the detailed explanation . good job !
Unknown said…
Intercel is a vertically integrated company, buy 3g modems at Best price.
Unknown said…
Thank you for this guide. More clear than the official documentation.
Unknown said…
Intercel Experts in securely communicating to Wireless Industrial Modems
4G Modems, 4G Industrial Modems, 4G Serial Modems
George - Mihai said…
Thank you very much for this detailed tutorial. I managed to use Huawei HG655b as 3G router with Vodafone K3765 usb modem.

Popular posts from this blog

Setting ethernet interface speed in /etc/network/interfaces