Forest header image

Symfony Finland
Random things on PHP, Symfony and web development

OpenWrt / ROOter multi-WAN with Huawei E5377, Linksys E3000

The Huawei E5377 is a common MiFi device in the Nordic countries and baltics in countries like Estonia, Finland, and Lithuania Sweden. OpenWrt is a firmware for routers (like DD-WRT), which by default does not have good support for mobile modems. ROOTer is a derivative of OpenWrt which aims to bridge the gap between 3G/4G modems and stationary routers.

Setting up popular LTE/4G modems like the E5377 and E3372 are now using techniques like HiLink and CDC Ethernet Over USB, where as many tutorials and devices expect them to work like older 3G modems.

To enable balancing over ADSL and 4G LTE on a Linksys E3000 router running OpenWrt the following steps are needed:

  1. Download and install Rooter Multiweb
  2. Check and install Modem
  3. Setup load balancing

The load balancing itself is enabled by default in Multiweb and needs no additional. The feature is built on mwan3 OpenWrt Load Balancing functionality.

Download and install the Rooter multiweb for your device from - in this case downloading the one for the Linksys E3000. Note that upgrading from another router requires a BIN image, but if you want to upgrade from OpenWrt, you'll need to convert BIN to TRX format. The installation will take a few moments.

Once installed, plug in your modem. Connect to the LAN network and login to and check the modem status page to see if your modem is already supported. In the case of the Huawei E5377 modem it is not, so we'll need additional work.

We need to identify the device and set the mode to CDC Ethernet, this will make the device appear as a regular ethernet port (likely eth1). This is done using the usbmode application on the command line. The key values you'll need for the E5377 are:

  • Identifier: 12d1:1f02 (vendor:device)
  • Target vendor: 0x12d1 (4817 in decimal)
  • Target product: 0x14dc (5340 in decimal)
  • Message: 55534243123456780000000000000a11062000000000000100000000000000
  • No Driver Loading: 1

The above values are used to identify the device and send the parameters to the device to switch it to CDC ethernet mode. For many modems these settings are already available in the configuration file (/etc/usb-mode.json), but for many modems (E5337, E3372) from Finnish operators Elisa, DNA and Sonera are not.

Go forward and add a new configuration file (/etc/usb-e5337.json) using the command line. The contents are:

        "messages" : [
"devices" : {
                "12d1:1f02": {
                        "*": {
                                "t_vendor": 4817,
                                "t_product": [ 5340 ],
                                "no_driver": true,
                                "msg": [ 0 ]

Once this is complete, go ahead and run the USB status script. Some commands you can run:

  1. List all matching devices:
    usbmode -l
  2. Switch devices using a custom configuration file:
    usbmode -s -v -c /etc/usb-e5337.json

Once you verified that the device is found, run the switching script. To verify that the command worked as expected, using the "dmesg" command you can get a list of system messages. The confirmation message you are looking for is:

[ 1457.250000] cdc_ether 1-1:1.0 eth1: register 'cdc_ether' at usb-ehci-platform.0-1, CDC Ethernet Device, 0c:5b:8f:27:9a:64

Once this is found, then you have a new standard ethernet device connected to your router. Head over to the Network Interfaces and by adding a new one you should have a new choice:

  • Ethernet Adapter: "eth1" Ethernet Adapter: "eth1"

After this is done you can move forward with setting up the rules using the ROOter Multiweb GUI or the standard instructions from the documentation.

Some links regarding modern Huawei modems, OpenWrt and Load Balancing:

Written by Jani Tarvainen on Sunday November 29, 2015
Permalink -

« Online HTTP/2 Checker - PHP 7 for Debian »