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

That may be true but that test doesn't prove anything about the router at all really other than it does connect. If your happy with the Stock firmware that's fine but I've also been doing testing like @UgaBugaBoo and can confirm speeds are the same as stock and OpenWrt, I've also been testing wired as well and found no change. Perhaps you have a bad firmware Image.

I would consider this off-topic for this forum however I will help, assuming the stock firmware is built on OpenWrt (which I think it is) all the information you need to automate a boot process can be found here:
https://openwrt.org/docs/techref/initscripts
I'm not going to post code snippets for you because as we have said its insecure, unrecommended and unrelated.

BUILD WITH PROPRIETARY DRIVERS BUT 2.4GHZ DOESN'T WORK
If i can't find out why 2.4 ghz doesn't work, i will build one with open source.
By the way, you can't configure wifi settings with luci, you have to use the command line.

Can someone test this firmware and see if there're some problems with 5ghz wifi and why the 2.4ghz wifi doesn't work?

one more thing, if you want to keep the wifi settings, you have to add the iwpriv's to /etc/rc.local.

#AP 2.4GHZ settings
iwpriv ra0 set Channel=6
iwpriv ra0 set AuthMode=WPA2PSK
iwpriv ra0 set EncrypType=AES
iwpriv ra0 set IEEE8021X=0
iwpriv ra0 set SSID=THIS_ROUTER_SSID
iwpriv ra0 set WPAPSK=PASSWORD
iwpriv ra0 set DefaultKeyID=2
iwpriv ra0 set SSID=THIS_ROUTER_SSID


#AP 5GHZ settings
iwpriv rai0 set Channel=36
iwpriv rai0 set AuthMode=WPA2PSK
iwpriv rai0 set EncrypType=AES
iwpriv rai0 set IEEE8021X=0
iwpriv rai0 set SSID=THIS_ROUTER_SSID
iwpriv rai0 set WPAPSK=PASSWORD
iwpriv rai0 set DefaultKeyID=2
iwpriv rai0 set SSID=THIS_ROUTER_SSID


# station settings for 2.4ghz wifi
iwpriv apcli0 set ApCliEnable=0
iwpriv apcli0 set Channel=6
iwpriv apcli0 set ApCliAuthMode=WPA2PSK
iwpriv apcli0 set ApCliEncrypType=AES
iwpriv apcli0 set ApCliSsid=MAIN_ROUTER_SSID
iwpriv apcli0 set ApCliWPAPSK=PASSWORD
iwpriv apcli0 set ApCliEnable=1


# station settings for 5ghz wifi
iwpriv apclii0 set ApCliEnable=0
iwpriv apclii0 set Channel=36
iwpriv apclii0 set ApCliAuthMode=WPA2PSK
iwpriv apclii0 set ApCliEncrypType=AES
iwpriv apclii0 set ApCliSsid=MAIN_ROUTER_SSID
iwpriv apclii0 set ApCliWPAPSK=PASSWORD
iwpriv apclii0 set ApCliEnable=1

https://github.com/jinglei207/openwrt/raw/builds/openwrt-ramips-mt7621-xiaomi_mir3g-v2-squashfs-sysupgrade.bin

This is the repository


https://github.com/jinglei207/openwrt/blob/builds/target.zip
Some changes that i have made, copy this to the openwrt directory if you want to build one yourself.
1 Like

firmware with 5ghz proprietary and 2.4ghz open source wifi drivers
https://github.com/jinglei207/openwrt/blob/builds/2.4_open_source_5_proprietary.bin

4 Likes

Tranks!!! :heart_eyes:

1 Like

Just for information, i have been using zorros build (19.07.3) since he published it.
with packages sqm-qos, nft-qos(not both enabled), mwan3, adblock.
And it works very stablely.
The configuration is wifi 2.4ghz (client) -> Routing -> 5ghz (AP) .
The speed of 2.4ghz wifi as client is very good.
The speed of 5ghz is not checked fully because my phone can only work at 150mbps.
I have an uptime of 20 days now that could have been more than month if it weren't for power surges.
When i have time i will also check byte's build.
Thank you!!

5 Likes

Tried 0.0.3 on Router Mini - worked like a charm on latest FW. All done in Ubuntu, running in WSL2

1 Like

Small offtopic. It`s about hack to flash without SPI Prog. I tried it on old Xiaomi MI WiFi mini, and it worked.

Hi,
is there a method to make a backup of the original firmware before flashing? If yes, how can I transfer it to my PC?

Hi, how is this going? What about the wifi range? Is it like stock? Thank you

Today's snapshot (6th of July 2020) seems to work quiet well. The wifi driver problems seem gone after the mt76 updtate from ~2 weeks ago.
I'm running it with luci-app-dawn and 802.11r/v/k without any problems.
Speedtest shows up to 320-350mbps on 5ghz/AC (WPA2 AES) from my mobile download, while 19.07.03. achieved about 300-320 mbps.

I recommend:uci set wireless.default_radio0.ieee80211v=1; uci set wireless.default_radio0.ieee80211k=1; uci set wireless.default_radio0.bss_transition=1; uci commit and the same thing for radio1.

1 Like

Hi @Double-G.

Is that for openwrt master, or for openwrt 19.07 branch?

I was referring to master/snapshot-branch. The settings, at least for 802.11r, should work on 19.07.3 too.
Under any release, one must replace wpad-basic by hostapd-openssl (opkg update && opkg remove wpad-basic && opkg install hostapd-openssl).
Luci-app-dawn requires master/snapshot, that's why I'm using that bleeding edge release. Things really improved since 2 weeks ago, when I hat connectivity problems on the bridge between WLAN and LAN, all gone now, but still testing.

1 Like

I've done a fast 5Ghz Wifi test:

Device Date Latency Download Upload Conn_type Server Lon Lat Int_IP Ext_IP
MI4A Openwrt 06.07.2020 snap (HW_offload_on) lip.07.2020 12:26 2,275 ms 341,7693 Mbps 175,9467 Mbps Wifi Poznan 52,4052 16,9339 192.168.1.139 109.173.xxx.xxx
MI4A Openwrt 06.07.2020 snap (HW_offload_on) lip.07.2020 12:25 1,717 ms 361,836 Mbps 184,3954 Mbps Wifi Poznan 52,4052 16,9339 192.168.1.139 109.173.xxx.xxx
MI4A Openwrt 06.07.2020 snap lip.07.2020 12:22 1,89 ms 295,5664 Mbps 175,5643 Mbps Wifi Poznan 52,4052 16,9339 2001:470:71:394::79f 109.173.xxx.xxx
MI4A Openwrt 06.07.2020 snap lip.07.2020 12:22 2,243 ms 214,8768 Mbps 191,7192 Mbps Wifi Poznań 52,4052 16,9339 2001:470:71:394::79f 109.173.xxx.xxx
MI4A Padavan lip.07.2020 11:29 2,199 ms 350,4062 Mbps 272,4423 Mbps Wifi Poznań 52,4052 16,9339 192.168.1.80 109.173.xxx.xxx
MI4A Padavan lip.07.2020 11:29 1,905 ms 293,3687 Mbps 268,8505 Mbps Wifi Poznań 52,4052 16,9339 192.168.1.80 109.173.xxx.xxx
MI4A Padavan lip.07.2020 11:28 2,62 ms 237,9024 Mbps 256,1538 Mbps Wifi Poznań 52,4052 16,9339 192.168.1.80 109.173.xxx.xxx
MI4A Padavan lip.07.2020 11:27 1,849 ms 475,5605 Mbps 275,3654 Mbps Wifi Poznan 52,4052 16,9339 192.168.1.80 109.173.xxx.xxx
MI4A Padavan lip.07.2020 11:26 1,812 ms 482,5506 Mbps 292,5818 Mbps Wifi Poznan 52,4052 16,9339 192.168.1.80 109.173.xxx.xxx
ArcherC6v2 TP-Link firmware (AP mode) lip.07.2020 11:25 2,374 ms 524,237 Mbps 390,5591 Mbps Wifi Poznań 52,4052 16,9339 2001:470:71:394::79f 109.173.xxx.xxx

So it looks like mt drivers changes made 5Ghz a little better. I also could set different channel than 36 and it didn't caused any problems - both radios are working as intended. Compared to TP-Link C6v2 wireless signal from Mi4A is weaker (C6 has mu-mimo enabled) - a least in my environment.

2 Likes

Hello. How would you config wireless? As i tried to access vi /etc/config/wireless, but no wireless file there. Also tried uci show wireless and nothing comes out. Is there a problem with lastest snapshot regarding this?

Hi mate,
updated to the snapshot from today (r13716-3caad5150c) and the best i could get is 600mbps via cable and 200mbps on wifi, all using HW_offload_on :frowning:

Also, how can I test MI4A Padavan cfw?

Thank you.

Just tested it - same here. A little over 600 via cable on latest snap. I flashed @Zorro build with 4.x kernel - over 900 on cable even without offload.

You can get the firmware from 4PDA or compile it yourself (you can use the code from my repository as i included the MI4A/R3GV2 config).

Hi, are there any RAM upgrade mods, i searched here... maybe some russians on 4PDA ?
128MB RAM is half of the original mir3g that came with NAND storage (a dealbreaker for me), I like SPI flash because flashrom.
openwrt reccomends 256MB ram for dual radio:
""A device with two, “ath10k” radios should have at least 256 MB of RAM for stable operation.""
https://openwrt.org/toh/recommended_routers

Hi, forks
I've SPIROM socketting mod on my R4AGE.
Stock ROM is running well.
But, After update with openwrt, error msg appears like :

SQUASHFS error: xz decompression failed, data probably corrupt
SQUASHFS error: squashfs_read_data failed to read block 0x624a26
(adrs is change)

I think, it's too high SPI ROM clock when openwrt.
Is it diiference value SPI clock in STOCK firmware and OPENWRT firmware ?

And, when I using WINBOND W25Q128JV instead,
also openwrt firmware doesn't works well, but stock rom works !!!.

Thank you.