OEM to OpenWrt, WAN function moves to LAN port 1


I have a Mofi 3500-3GN ver. 2 rev. 2 (which the company ships with OpenWrt-based but customized firmware, their version "9.2 std" somewhat based on Barrier Breaker r36346, kernel 3.3.8).

When upgrading from the company-provided firmware to OpenWrt 18.06.1, I thought the WAN stopped working, but in fact I needed to move my WAN cable to the first physical LAN port and then it behaves fairly normally.

(I upgraded the firmware with the following two .bin files)


Two questions:

  1. How can I fix this manually so WAN functionality is on the physical WAN port?
  2. Where is this controlled in the build process, hardware profiles, etc so that it will be corrected for other users in future releases?

(I have git installed and have fetched and (for other reasons) built my own copy of 18.06.1)

Help to fix OpenWrt builds for Mofi3500
Trying to use USB-to-RS232 (FTDI) with Mofi 3500

Reset to defaults.

It's likely been changes to the default network and ports between versions 14 and 18.


The RT3050 chip has one CPU eth port which passes through an internal 6 port switch. The port numbers on the case may not match the switch ports. It is the manufacturer's choice how to wire them out.

Standard advice is to log in via wifi while changing the Ethernet configuration. Use swconfig dev switch0 show to see which port is actually active as you plug an Ethernet cable into each port.


If the LAN and WAN ports belong to the same switch then you can change the config in VLAN configuration. But as @lleachii suggested, it will be much better if you reset to defaults. This is because between v14 and v18 a lot of changes have happened.


If you mean reset to factory defaults in the web GUI, (or umount /overlay && firstboot from command line), then yes I am resetting on each firmware that I've tried (and not selecting "keep settings" anyway).

Okay I have the 4-pin onboard serial hooked up anyway so I'm doing it that way. With nothing connected:

root@OpenWrt:/etc/config# swconfig dev switch0 show |grep link
        link: port:0 link:down
        link: port:1 link:down
        link: port:2 link:down
        link: port:3 link:down
        link: port:4 link:down
        link: port:5 link:down
        link: port:6 link:up speed:1000baseT full-duplex

So I suppose port 6 is the internal link to the wifi radio. By connecting them one by one, I note a dmesg such as:

[  928.829080] rt3050-esw 10110000.esw: link changed 0x01

So the wiring seems to be:

hex - port - label
0x10  -  4  -  LAN1
0x08  -  3  -  LAN2
0x04  -  2  -  LAN3
0x02  -  1  -  LAN4
0x01  -  0  -  WAN

Where hex column means from the dmesg "link changed 0x01" type message, port means from the swconfig command you suggested, and label is the physical writing on the router case.


No, it's likely the CPU. Usually a logical bridge called br-lan is made to link VLAN1 and WLAN0.

If you can now see the console, determine which ports are on LAN, and just access the LuCI web GUI.