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

I don't know, I just want a graphical interface to be able to configure the Xiaomi as a second router. I thought that with Openwrt and LuCi it would be to install and work, but I see that it is more difficult than I thought.
Could it be because the Snapshot is old?
If you help me upgrade to a newer one maybe it can work?

Why don't you try 21.02 snapshots? Unlike the normal snapshot the visual interface a.k.a. LuCi comes pre-installed. Or even better just switch to RC2 for better stability and support.

You can do firmware update (or downgrade in this case) with commands.

21.02 snapshots:
https://downloads.openwrt.org/releases/21.02-SNAPSHOT/targets/ramips/mt7621/

21.02 RC2:
https://downloads.openwrt.org/releases/21.02.0-rc2/targets/ramips/mt7621/
ulpian

1 Like

last time i installed RC2,but the 5Ghz WiFi in Wireless Network is not showing up only that 2.4Ghz,did they fix it now?

I am currently using 21.02 RC2 on my router and there is no such problem. Working fine on my end.

ulpian

1 Like

ok I'm gonna try to install it later,thanks for the feedback maybe they fixed it

1 Like

Thank you very much, after a lot of trying, in the end I managed to update to this Snapshot, and I got it to work, I had problems using the wget command because I got this message: (wget: SSL support not available, please install one of the libustream- . * [ssl | tls] packages as well as the ca-bundle and ca-certificates packages.)
But running the command opkg install libustream-ssl I have managed to download the package.
Then I got the following message when trying to install the Snapshot (Device xiaomi, mir3g-v2 not supported by this image Supported devices: xiaomi, mi-router-4a-gigabit - Image version mismatch: image 1.1, device 1.0. Please wipe config during upgrade (force required) or reinstall. Reason: Config cannot be migrated from swconfig to DSA Image check failed.)
But I have fixed it with the following command (sysupgrade -v -F /tmp/*.bin)
And it has already been installed and I have managed to access the web interface. I leave a screenshot of what appeared after forcing the update.
Thank you very much for everything, I have managed to make it work, I am very grateful to all who have dedicated a little of their time to help me. Thank you.

2 Likes

Very nice! I'm glad to hear that.
Enjoy it!
ulpian

Hello all. I'm configuring from scratch an R4a gigabit, after running invation exploit.
Do you recommend just starting with 21.02 RC2 instead of sticking with 19.07?

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