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

Hello! I have a Noobie question.. :slightly_smiling_face: What's the different between the firmware that I'm building with the image builder using the latest snapshot files and the one compiled from the source?

the new snapshot include luci

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

both should be the same (at least on binary level after decompresig into squashfs), however using imagebulder gives you an opportunity to add build-in package like pppoe,luci, 6to4, uhttpd etc... So you don't have to manually install it after flashing firmware
For more details please see official guide: https://openwrt.org/docs/guide-user/additional-software/imagebuilder

1 Like

I wonder if that's better than the regular snapshot?

If you are testing a router or a package etc, then snapshots are ideal. Otherwise the regular release will be more stable

Hi, im new here

I have mi4a 100m(non gigabit) router and since I have other plugin that i want to use and read somewhere its better to build from source, Ive try to build from github and checkout with tag 19.07.7(since its mention here https://openwrt.org/toh/hwdata/xiaomi/xiaomi_mi_router_4a_100m),
compile using make and it did build a sysupgrade file in /bin/target folder

However it brick the router and ive been trying @hoddy method ever since. My case is the same as Hard Bricked Xiaomi 4A Gigabyte but i managed to get boot display via tinypxe output if pc is connected via non-ethernet port, if connected via ethernet ive get no dhpd found. Still trying to figure out and i appreciate any help given

Moving along, what are the correct way to checkout and adjust feed conf based on commit hash? is it ok if i just add commit hash to feed conf?

Thank you very much.

If you're getting a DHCP error (like the one you link too "dhcpd67 error") try rebooting the PC as it's unable to bind to the port (probably software is still running in the background), other than that make sure you have the correct stock firmware image for your device (the difference between international and global matters) and that it is named test.bin.

Some antivirus doesn't like TinyPXE so you may need to disable it (While offline), or as some people suggest can be a good fix just try a different PC.

As for creating your image yes its defiantly best practice, however, I can't remember what's current for the 100m, I don't think (though maybe wrong!) that 19.07.7 is working for that device, that is why you may need to use a snapshot or build from a modified version which some people on the forums have created. The only working version I know of (again i don't own this router so I'm not up to date on it) is 19.07.4, and you can find snapshots of it here:
http://downloads.openwrt.org/releases/19.07.4/targets/ramips/mt76x8/openwrt-19.07.4-ramips-mt76x8-xiaomi_mir4a-100m-squashfs-sysupgrade.bin

hi @hoddy

yeah i forgot to mention mine is international version, im supposed it will not work with test.bin that u provide. ive found someone post link to the international bin. Ill try it out later.

Meanwhile, ive try some changes regarding building snapshot, ive read somewhere in the forum that there are difference in rom layout. Now im not an expert so i just apply the patch and build again. Ive got a success compile but first i need to debrick the router to test. If not, the second approach would be downgrade to china firmware via miwifi tools and try to flash using sysupgrade.

Im not sure whether this all work but if somebody got a pointer please do help me. Im going to try when im back home

1 Like

I'm not sure if I'm miss reading what you're saying but you can't install OpenWrt via the debrick method if that's what you are trying to do, from a bricked router the only option is to debrick to the Xiaomi Stock firmware (and you're correct if you had the international FW it has to be the same) and then rerun the exploit again to then install your chosen OpenWrt FW.

You might find it easier to install a snapshot then use OpenWrt to switch between new versions of builds that you create, but that's really as long as it is short tbh.

hei @hoddy

i didnt mean to flash openwrt without get into stock os first. what i did was simply follow your guide and it works. oh and im not sure if it helps but i done it with using the non ethernet port, i can just pull out the cable and test which ever port that responds with tinypxe.

i managed to get it run on v19.07.7 and managed to get my plugin running, but theres only 7mb ram left lol

so theres nothing wrong with my git checkout. suppose we should make target option divide by china or international by applying the patch but i dont know how to do a pull request, if anybody would teach me that would be a great help

next im trying with gigabit china version, ive read in this thread some only work with a specific pull. ive give it a try before im going to sleep.

i hope i am able to contribute to this community soon

update : the china version works

1 Like

A lot of people here doing great work to make a stable version for the gigabit, you'll find the most stable versions on the OpenWrt page for the router, currently, DB's is my personal preference but that's no discredit to any other builds.

I think we are all just holding out in the hope for a stable release in OpenWrt 21.02 which should hopefully be soon.

1 Like

Make sure you have the correct firmware for your router (difference between international and global matters), also some firewalls and antivirus can cause issues you may need to temporarily disable them (while you are offline), and if all else fails try a different PC if you can.

1 Like

Hoddy is correct. The main difference between international and Chinese version, is the boot loader and partition layouts.

Ironically the international version is easier to debrick, as it has a web ui to recover the router. just follow the breed recovery procedure loads of examples on the web, even the RG3gv2 method i think?

1 Like

This looks like memory leak in whaterver daemon/service responsible for Wifi bridge.
My stats after almost 2 months:

root@OpenWrt:~# free
              total        used        free      shared  buff/cache   available
Mem:         124300       37480       69836         628       16984       55192
Swap:             0           0

Never goes above 50Mb

What image are you using? I'm running the default pre-built by @db260179 from here:

Havent updated yet past 1.3 since it is stable for me

Hi.

I cannot download the debrick files from
https://hoddysguides.com/xiaomi-debrick-tools-all.

It says:
"Due to high numbers of downloads we require all user to register for downloads,
please head to the registration page to continue."

I also cannot register.

What should i do?

Juliano

download from zorro link Xiaomi Mi Router 4A Gigabit Edition (R4AG/R4A Gigabit) -- fully supported and flashable with OpenWRTInvasion - #678 by Zorro

Does anyone know if 4AG SU-MIMO or MU-MIMO (for respective radio modules)?

It's not MU-MIMO based on their website

I tried Snapshot 21.02 in my Mi Router 4AGE and the WiFi speeds there sucks,I did a bunch of speed test the Packet loss is insane 5%-20% and the download and upload speed is so bad, my customized Regular Snapshot build and db260179's build is so stable when it comes to WiFi 0% Packet loss all the time,and i figured out why I'm having memory leaks and that is because of Relayd(WiFi Bridge) I wonder why that happens but i tried it on latest build of db260179's it's still memory leaks too but without Relayd memory leak is gone same with regular snapshot