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

For the hackers: you can also use slack if you need more fluent communication: https://join.slack.com/t/openwrt-workspace/shared_invite/zt-cz2m5uf4-Q8wbP_LKggOy9B7IQyaqfA

3 Likes

im using this firmware (http://radek.piastlan.net/openwrt/openvpn-ramips-mt7621-xiaomi_mir3g-v2-squashfs-sysupgrade.bin).
has luci built-in.
after reboot router is good to go.

but wifi signal is very poor.
the other signal is stock firmware with signal on standard (not wall penetrating).
im about 10ft away from both device and the stock r4a is about 2 feet away from the openwrt.

2 Likes

Thank you !
I was not going to censor the first bytes also but then i looked at the dumps and saw different prefix so then i got confused! But you are right, thanks again!

1 Like

A few users have already noticed this including myself:

For me the advantages of openwrt outweigh this but you're free to go back to stock using one of the debrick methods.

2 Likes

Trying to flash Mi Router 4 (just 4, nothing else, nor r3v2) with the instructions. I have snapshot of Padavan's firmware for the device (which was flashed with CH341A) so that's what i'm going to flash. Sent the payload, telnet and ftp are up and running. However, when i'm trying to:
mtd -e OS1 -r write firmware.bin OS1
it gives me:

Could not open mtd device: OS1
Can't open device for writing!

Same goes when i'm trying to flash breed (onto uboot). cat /proc/mtd looks like:

mtd0: 07f80000 00020000 "ALL"
mtd1: 00080000 00020000 "Bootloader"
mtd2: 00040000 00020000 "Config"
mtd3: 00040000 00020000 "Bdata"
mtd4: 00040000 00020000 "Factory"
mtd5: 00040000 00020000 "crash"
mtd6: 00040000 00020000 "crash_syslog"
mtd7: 00040000 00020000 "cfg_bak"
mtd8: 00400000 00020000 "kernel0"
mtd9: 00400000 00020000 "kernel1"
mtd10: 01a00000 00020000 "rootfs0"
mtd11: 01a00000 00020000 "rootfs1"
mtd12: 02600000 00020000 "overlay"
mtd13: 01b80000 00020000 "obr"
mtd14: 00bbf000 0001f000 "ubi_rootfs"
mtd15: 021e8000 0001f000 "data"

I can see there are no such partitions, what do i do then?

1 Like

Hello guys. here is my latest build :
https://dl4.shatelland.com/files/dc5435f9-4fc0-4480-9b69-5a984d292ffd/1199c80f-72c4-45c7-ac30-a3877f14563f
sha256: 7534ddcbd9abc4a548335357e1a3024764baaa30773db7fa8803418e3397d66c
firmware version:
OpenWrt SNAPSHOT r13021-a2cf87a7b1 / LuCI Master git-20.109.77122-82a469f

kernel version:
5.4.33
included packages:
luci with material theme
wireguard
open vpn
dns over https proxy
adblock
sqm qos

7 Likes

Does Wan port work with this build?

1 Like

NO, you have to reconfigureing it.

2 Likes

post #560 Xiaomi Mi Router 4A Gigabit Edition (R4AG/R4A Gigabit): fully supported but requires overwriting SPI flash with programmer

1 Like

It works !!!

Many thanks for your help, the procedure and the links !!

My router is now powered by OpenWRT !!!

Thanks Thanks Thanks Thanks !

2 Likes

WAN not work. How you fix it ?

1 Like

Go to network==>interfaces delete (wan and wan6 )and create them again.

2 Likes

I have a stock image for my Xiaomi ac2100 router and want to extract the stock kernel from it and flash it to the kernel partition. I know this thread is for Mi Router 4A but I assume the steps should be the same.

binwalk miwifi_r2100_firmware_64288_2.0.376.bin 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
676           0x2A4           uImage header, header size: 64 bytes, header CRC: 0x4E0E77B8, created: 2019-11-22 06:41:11, image size: 3391601 bytes, Data Address: 0x81001000, Entry Point: 0x81436420, data CRC: 0xE08FBF6F, OS: Linux, CPU: MIPS, image type: OS Kernel Image, compression type: lzma, image name: "MIPS OpenWrt Linux-3.10.14"
740           0x2E4           LZMA compressed data, properties: 0x6D, dictionary size: 8388608 bytes, uncompressed size: 7256832 bytes
3392392       0x33C388        UBI erase count header, version: 1, EC: 0x0, VID header offset: 0x800, data offset: 0x1000

using "dd if=miwifi_r2100_firmware_64288_2.0.376.bin skip=676 bs=1 count=3391601 of=kernel.bin" I extracted the kernel part.

can I just flash the resulting kernel.bin to the kernel partition or do I have to "prepare/modify" it to flash it?

Thank you so much

1 Like

Hi Guys,
I'm using snapshot from yesterday - r13013-5f126c541a - on my Xiaomi Mi Router 4A (100M) and got the mac80211 error and my wireless went down after nearly 24h without problems. Before this snapshot, I've used the stable 19.07.2 and also got wifi problems.
Does anyone knows how to fix this?
Thanks

Hello Zorro, thanks for your amazing support. I have a questions. Seems the VLAN Tagging is non working in your release.
Have you activated this? CONFIG_BRIDGE_VLAN_FILTERING = Y?

Seem like new kernel got wan>lan speed drop. 300/400Mbps dl/up as i test.
iperf3 test speed drop from 950Mbits/sec > to 450Mbit/sec
How about other you? or i miss some config?

[ OpenWrt SNAPSHOT r13021-a2cf87a7b1 ]

why is memory usage so high?
my old tplink router with same memory has more free ram.

R4A gigabit (19.07)

TPLINK router (18.06)
image

While I have no personal experience with mt7621 SOCs and mt76 in particular, wireless drivers for 802.11ac in general need more RAM to do their job, to achieve faster wireless throughput.

The tplink router also have wireless ac.