Xiaomi Mi Router 4A Gigabit Edition (R4AG/R4A Gigabit) -- fully supported and flashable with OpenWRTInvasion

I have received two kernel crashes in the log which appear to be the same.

WARNING: CPU: 0 PID: 0 at kernel/kthread.c:75 0x8004ce48[25144.037436] WARNING: CPU: 0 PID: 0 at kernel/kthread.c:75 0x8004ce48
[25144.043755] Modules linked in: pppoe ppp_async iptable_nat xt_state xt_nat xt_conntrack xt_REDIRECT xt_MASQUERADE xt_FLOWOFFLOAD xt_CT pppox ppp_generic nf_nat nf_flow_table_hw nf_flow_table nf_conntrack mt76x2e mt76x2_common mt76x02_lib mt7603e mt76 mac80211 ipt_REJECT cfg80211 xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG slhc nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter ip_tables crc_ccitt compat nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 leds_gpio gpio_button_hotplug
[25144.097544] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.119 #0
[25144.103519] Stack : 00000000 80840000 00000001 8007d9c0 00000000 00000000 00000000 00000000
[25144.111839]         00000000 00000000 00000000 00000000 00000000 00000001 87c0dcd0 031d9b3c
[25144.120157]         87c0dd68 00000000 00000000 00000000 00000038 805e3744 342e3520 3931312e
[25144.128476]         00000000 000004e2 00000000 00017d08 00000000 87c0dcb0 00000000 8004ce48
[25144.136795]         00000009 00000000 005ec5f2 8103043c 00000003 8035ad8c 00000000 80810000
[25144.145114]         ...
[25144.147544] Call Trace:
[25144.147552] [<8007d9c0>] 0x8007d9c0
[25144.153446] [<805e3744>] 0x805e3744
[25144.156915] [<8004ce48>] 0x8004ce48
[25144.160384] [<8035ad8c>] 0x8035ad8c
[25144.163852] [<8000b05c>] 0x8000b05c
[25144.167322] [<8000b064>] 0x8000b064
[25144.170791] [<806e0000>] 0x806e0000
[25144.174259] [<805c910c>] 0x805c910c
[25144.177727] [<8007a468>] 0x8007a468
[25144.181198] [<8002c140>] 0x8002c140
[25144.184665] [<8004ce48>] 0x8004ce48
[25144.188132] [<8002c1e8>] 0x8002c1e8
[25144.191612] [<8004ce48>] 0x8004ce48
[25144.195088] [<8005b6dc>] 0x8005b6dc
[25144.198560] [<80051f44>] 0x80051f44
[25144.202033] [<800646bc>] 0x800646bc
[25144.205506] [<8007487c>] 0x8007487c
[25144.208987] [<80065198>] 0x80065198
[25144.212466] [<805e9c5c>] 0x805e9c5c
[25144.215943] [<800308c0>] 0x800308c0
[25144.219416] [<802f8ff4>] 0x802f8ff4
[25144.222891] [<80006c28>] 0x80006c28
[25144.226359] 
[25144.227843] ---[ end trace 76aca7e096c99128 ]---

Doesn't seem to affect the operation but still worrysome.
Has anyone else seen this in the logs?
EDIT:
I am running 21.02RC2

Hi guys, I already have a Xiaomi Mi Router 4C on which I successfully installed the latest OpenWrt using a script.

Now I bought the 4A Gigabit and it seems like it's a bit more complicated to install OpenWrt with LuCI.

Any ideas how to start?

Is anyone here tried the RC3? I hope by the end of this month it will be finalized

1 Like

Answer to myself: the phyton-script that I have for the 4C also works flawlessly with the 4A, I just had to exchange to firmware-BIN-file to the latest initramfs-file for the 4A (21.02 rc2).

If anyone is interested I could share the script here.

VLAN tagging is a bit harder than swconfig.

2 Likes

Hi.

This is a very good topic about DSA.

https://forum.openwrt.org/t/mini-tutorial-for-dsa-network-config/96998

Juliano.

1 Like

So I've synced my build which contains newer firmware with OpenWRT RC3 and the latest mt76 master and here are my results on different STAs. You can find the build here https://github.com/Byte-bite/OPENWRTMI4A/releases/tag/RC3

The tests are done in the 5ghz band with multiple devices connected to the Mi Router 4A functioning as a dumb AP. An iperf3 server was run on a raspberry pi 4 connected via LAN to the AP unless otherwise noted.

Apple STA


Snapdragon STA

Intel AX201 STA on Windows
The iperf3 server had to be run on the AP itself due to firewall issues on the pi4 server

Broadcom BCM 4345 (pi4 integrated WLAN)

- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-60.00  sec  88.6 MBytes  12.4 Mbits/sec    0             sender
[  5]   0.00-60.04  sec  88.1 MBytes  12.3 Mbits/sec                  receiver
[  7]   0.00-60.00  sec  69.1 MBytes  9.67 Mbits/sec    7             sender
[  7]   0.00-60.04  sec  68.8 MBytes  9.61 Mbits/sec                  receiver
[  9]   0.00-60.00  sec   119 MBytes  16.7 Mbits/sec    4             sender
[  9]   0.00-60.04  sec   118 MBytes  16.5 Mbits/sec                  receiver
[ 11]   0.00-60.00  sec   116 MBytes  16.2 Mbits/sec    9             sender
[ 11]   0.00-60.04  sec   115 MBytes  16.1 Mbits/sec                  receiver
[ 13]   0.00-60.00  sec   113 MBytes  15.9 Mbits/sec    0             sender
[ 13]   0.00-60.04  sec   113 MBytes  15.8 Mbits/sec                  receiver
[SUM]   0.00-60.00  sec   506 MBytes  70.8 Mbits/sec   20             sender
[SUM]   0.00-60.04  sec   503 MBytes  70.3 Mbits/sec                  receiver

iperf Done.

RT 8812AU (Open Source Drivers)

- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-60.00  sec   261 MBytes  36.5 Mbits/sec    0             sender
[  5]   0.00-60.01  sec   261 MBytes  36.5 Mbits/sec                  receiver
[  7]   0.00-60.00  sec   225 MBytes  31.5 Mbits/sec    0             sender
[  7]   0.00-60.01  sec   225 MBytes  31.4 Mbits/sec                  receiver
[  9]   0.00-60.00  sec   296 MBytes  41.4 Mbits/sec    0             sender
[  9]   0.00-60.01  sec   295 MBytes  41.3 Mbits/sec                  receiver
[ 11]   0.00-60.00  sec   268 MBytes  37.4 Mbits/sec    0             sender
[ 11]   0.00-60.01  sec   267 MBytes  37.3 Mbits/sec                  receiver
[ 13]   0.00-60.00  sec   212 MBytes  29.6 Mbits/sec    0             sender
[ 13]   0.00-60.01  sec   212 MBytes  29.6 Mbits/sec                  receiver
[SUM]   0.00-60.00  sec  1.23 GBytes   177 Mbits/sec    0             sender
[SUM]   0.00-60.01  sec  1.23 GBytes   176 Mbits/sec                  receiver

iperf Done.

Connectivity on 5ghz is stable enough to be used on a production environment which I will be further testing.

Speed on 2.4ghz was not tested since it is congested in my Area. I am pleased to report that I did not experience any major connectivity issues with majority of the STAs except for when an Apple STA is connected. Some packets are still dropped but the network recovers in a second at most with the 2.4ghz band being stable enough non critical VOIP applications.

5 Likes

Thanks for sharing. Did you tested the official RC too? What are the most relevant changes in Mt driver patches?

Hi, your firmware works great!
No more this error log on my router:

mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
mt76x2e 0000:01:00.0: Build: 1
mt76x2e 0000:01:00.0: Build Time: 201507311614____
mt76x2e 0000:01:00.0: Firmware running!
ieee80211 phy0: Hardware restart was requested

Hello @Byte, is the only difference in your build the different firmware file? Where is it from?
Did you try submitting this file to the main project?

Hi, just flashed this firmware and i want to say im particularly very happy with the wlan speeds. Although something has catched my eye, when im on the software tab free space shows as 58~ mb, as far as i know device only has 16 mb of rom. Is this normal behavior?

edit : also im getting conflict errors when installing some packages like luci-adblock. It seems that repositories included hasnt catched up with the kernel version in the image, is there fix for this or is it just how it is?

Hi all,
Are there any hardware mods that allow adding a usb port to this device? Or is this possible? Thanks.

ulpian

can't install mwan3

The installed version of package kernel is not compatible, require 5.4.111-1-a3753a3b… while 5.4.124-1-a3753a3b… is installed.

@Byte
Does this version have hardware offloading?
Thank you for your work.

Hi, could you please guide me step by step how to change completely your 3gv2 router to mi4a gigabit firmware?

You can not change it as it is might have the same cpu and stuff but it lacks appropriate hardware like the gigabit ports

Hello @ulpian ,
As far As I know , There is no Hardware mod out there for adding usb ports to routers.

Hi there,
Thanks for your reply.
I've seen this kind of modifications done on some devices before. Like archer c6 hardware mods.
for example: https://openwrt.org/toh/tp-link/archer_c6_v2#hardware_mods
According to the mt7621 datasheet the chipset seems to have a USB host capability. So potantial USB expansion sounds great! Maybe there is a way but we don't know yet.
ulpian

@InvalidOpcode

Thanks for sharing. Did you tested the official RC too? What are the most relevant changes in Mt driver patches?

I haven't tested the official RC but speeds and stability should be the same on 5Ghz.

@l.scorcia

Hello @Byte, is the only difference in your build the different firmware file? Where is it from?
Did you try submitting this file to the main project?

Yup. The only difference is a newer firmware file. The MT76 project initially used a newer firmware but rolled back as it caused stability issues for other devices.

@dorede @josephhoo

The installed version of package kernel is not compatible, require 5.4.111-1-a3753a3b… while 5.4.124-1-a3753a3b… is installed.

Update OPKG lists to let it pass the signature checks before searching for packages.

@Basix

Does this version have hardware offloading?
Thank you for your work.

It should. I haven't touched anything related to mt7621.

It's July now,I wonder when they going to release the official 21.02

1 Like