Opened 3 years ago

Last modified 18 months ago

#18768 new defect

Nexx WT3020 Failsafe does not work

Reported by: probono Owned by: developers
Priority: normal Milestone:
Component: packages Version: Trunk
Keywords: Cc:


Failsafe mode appears to be broken as of r43977.

I suspect that TCP connections are not working when VLAN is disabled just like on other MediaTek/Ralink chipsets. Possibly some code along the lines of needs to be added in order for OpenWrt Failsafe to work on this device.

However, the configuration is different enough so that I couldn't figure it out on my own. Hence I have documented the details on

Attachments (0)

Change History (23)

comment:1 Changed 3 years ago by anonymous

Please fix the failsafe for this great device

comment:3 Changed 3 years ago by anonymous

...and possibly also related to

comment:4 Changed 3 years ago by probono

comment:5 Changed 3 years ago by marcin1j

The problem is that the switch on MT7620 has VLANs enabled by default and in this mode, eth0 won't receive any packet unless you create at least one eth0.x device for VLANs and bring it up.
Therefore, you have to either:

  1. Create at least eth0.1 and use it as default failsafe device, bringing eth0 up (this is what the preinit script does for rt305x switch),
  2. Turn off VLAN support - easier approach, the following patch will fix network in failsafe mode:
    • target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips

      diff --git a/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips b/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
      index cae6396..42e3386 100644
      a b ramips_set_preinit_iface() { 
      2626               vconfig add eth0 1 
      2727               ifconfig eth0 up 
      2828               ifname=eth0.1 
       29       elif grep MT7620 /proc/cpuinfo; then 
       30               swconfig dev mt7620 set reset 1 
       31               swconfig dev mt7620 set enable_vlan 0 
       32               swconfig dev mt7620 set apply 
       33               ifname=eth0 
      2934       else 
      3035               ifname=eth0 
      3136       fi 

I can't tell which solution conforms better to OpenWrt code base, but for some reason the MT7620 switch driver enables VLAN when probing for device (see gsw_mt7620a.c - the third parameter of mt7530_probe() enables or disables VLAN):

int mt7620_gsw_config(struct fe_priv *priv)
        struct mt7620_gsw *gsw = (struct mt7620_gsw *) priv->soc->swpriv;

        /* is the mt7530 internal or external */
        if (priv->mii_bus && priv->mii_bus->phy_map[0x1f]) {
                mt7530_probe(priv->device, gsw->base, NULL, 0);
                mt7530_probe(priv->device, NULL, priv->mii_bus, 1);
        } else {
                mt7530_probe(priv->device, gsw->base, NULL, 1);

        return 0;

comment:6 follow-up: Changed 3 years ago by daniel.petre@…

Seems the factory image is broken for wt3020 8M with r45973 , i don't have serial console and neither factory nor sysupgrade flashing work! Luckily i installed the web interfaced uboot so i can recover..

comment:7 Changed 3 years ago by wbr@…

Any update on this issue? Would love to be able to use failsafe on this little box.

comment:8 in reply to: ↑ 6 Changed 3 years ago by micmon

Replying to daniel.petre@…:

Seems the factory image is broken for wt3020 8M with r45973 , i don't have serial console

Do you mean access by serial console connection is broken or are you just missing the console converter/cable?

comment:9 Changed 3 years ago by ekstazyst@…

This bug also exists for xiaomi miwifi router mini

comment:10 Changed 3 years ago by anonymous

MT7621 based devices are also affected.

comment:11 Changed 3 years ago by merpmerp

just ran into this problem myself, would love to see this fixed!

comment:12 Changed 2 years ago by…

subscribe myself for updates

comment:13 Changed 2 years ago by anonymous

I've been using the patch to "target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips" above and it works flawlessly

comment:14 Changed 2 years ago by kobayashison


comment:15 Changed 2 years ago by anonymous

Could this patch be applied then to trunk?

comment:16 Changed 2 years ago by ReganGunther

I'd love to see this fixed in trunk too. It would be a huge help to give peace of mind that failsafe can be used easily on this device.

comment:17 Changed 2 years ago by jofi

Why is no one applying the patch to trunk? Any devs here?

comment:20 follow-up: Changed 22 months ago by…

apparently, this was fixed in r48772

please confirm or disconfirm

comment:21 Changed 22 months ago by…

It's not applied to Chaos Chalmer yet. That should definitely be done.

comment:22 Changed 22 months ago by anonymous

Would be great if anyone shared their vanilla CC build with this fix.

comment:23 in reply to: ↑ 20 Changed 18 months ago by ondrej@…

Replying to…:

apparently, this was fixed in r48772

Wouldn't this change introduce a WAN-LAN leakage during router booting? Maybe better approach would be to enable VLANs as usual and use only VLAN 1.

Add Comment

Modify Ticket

as new .

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.