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

Unfortunately there is no official firmware available for R3GV2.you need to open your router desolder the flash chip and reprogram it by CH341A programmer.

Thank you for the feedback. Sound like an adventure, asap i will decide if do it.
But i can see that are some confusion at the forum. I can confirm that openwrtInvasion work with R3Gv2 but the debrick method doesn't .

One more time tks for the support.

1 Like

Hello, I don’t have any tools for disassembling, so I followed the tutorial on disassembling, https://www.wyr.me/post/619. Because I saw that the system is a simple openWRT, I found a firmware and flashed it again. I can’t connect to the router now. Maybe it’s because I selected the wrong firmware for flashing the firmware, and now I can’t connect using a network cable or tiny PXE. May I ask Is there a solution? thank, thank, thank...
你好,我没有拆机操作工具,按照免拆机教程来操作了,https://www.wyr.me/post/619 , 因为系统是简单的openWRT,又找了一个固件刷了一遍, 我现在是不能连接到路由器,可能是因为刷写固件选择了错误的固件,然后现在使用网线或者 tiny PXE 都无法连接,请问有解决方法么?

no wpad on repo...

1 Like

i myself run a build based on @Byte github repository and the kernel (checksum and all) is the exact same as the one from openwrt repo and i can install kernel signature dependent packages like wireguard, luci-app-sqm, etc.

how Change mac address on Wlan ?

Run opkg update first to download the list of packages, it is there.

You'll probably need to opkg remove wpad-basic before you can install it. Note that this will not free up space, since wpad-basic is in the compressed squashfs root - but internally the files will be marked as deleted and appear as so.

If this doesn't work, only recompiling the image with wpad instead of wpad-basic (which would be your best option since that way you won't waste space)

Rebuilding the image is quite easy, since the source code is published. I recommend doing that.

1 Like

As far as i know the R3Gv2 is a rebrand of the 4A Gigabit so might try to use the stock firmware for that before attemting to program with the CH341A.

Try one of these debrick guides to get your router back to stock, then you can retry with the correct firmware. If you use my video (last link) can you check how bad my chinese subtitles are =D

My builds have openvpn ready to use. They have some additional apps but the size is small nevertheless (about 6.2 MiB), so it still leaves plenty of space on the flash. Should you need smaller builds, you can try to build and costumize, the config files I used are there too on the releases page.

@joedotnet I've made a build replacing wpad-basic with wpad and put it on my google drive:

https://drive.google.com/file/d/1wctHb66orRNEC4Y0tBZZyEt1GGA308MI/view

See if it helps. The .config file is there also on the zip file (rename dot-config to .config and put it in openwrt build directory). To build it yourself, clone my repo (on linux, mac or *bsd ready machine) and switch to the apropriate branch, like this:

git clone https://github.com/araujorm/openwrt.git
cd openwrt
git checkout xiaomi-miwifi-3gv2-19.07-mt76updated
cp /path/to/dot-config .config
./scripts/feeds update -a && ./scripts/feeds install -a
make menuconfig  ### if you want to further costumize anything
make -j8

The -j8 switch is optional, but recommended, and you should adjust it to the number of threads/cores of your machine. You can ommit it, but instead of building the image in 10 or 15 minutes it may take hours. Also, you need the machine to be connected to the internet because most source packages are downloaded during the build process.

When done, the image will be in bin/targets/ramips/mt7621/openwrt-ramips-mt7621-xiaomi_mir3g-v2-squashfs-sysupgrade.bin

More info on the README file.

Best of luck.

(edited: wrong order of make menuconfig, corrected "switch to the apropriate branch", not "repo")

1 Like

Thanks, i have solved wpad problem. But new problem or bug how change wlan mac address...

I tried already , thank you for all the feedback.

1 Like

This isn't a "bug" your technically not supposed to change your mac adderess because it should be set from your device hardware itself. However there are a few software work arounds. I'd try some of the methods here to start:

Ah well, if you want to know how to do the programing with the CH341A if you go to some of the first posts in this thread there is a lot of info there.

:warning: WARNING Do not buy R3GV2 . :warning:

well, R3GV2 and R4A Giga version have the same hardware but the software is not . they have different bootloader...

5 Likes

Thanks for clarifying.

1 Like

I installed your latest firmware from github and now openvpn working properly. Thanks for you work

#!/bin/sh /etc/rc.common
# Copyright (C) 2014 OpenWrt.org

START=94
STOP=15

start() {
    echo
    ifconfig wlan0 down
    ifconfig wlan0 hw ether 40:B0:76:D1:40:2C
    ifconfig wlan0 up
}

stop() {
    echo "Stop."
}

I made this script as tutorial on internet
name file clone
copy to /etc/init.d/
chmod +x /etc/init.d/clone
testing
/etc/init.d/clone start
working good mac address wifi change
and to enable autostart
/etc/init.d/clone enable
showing on my openwrt luci web on startup menu
but the problem
this script not runing on startup Mac addres wifi stil no change, i had to click "start or restart" on startup menu than mac addres wifi change
..
point me.. how to make script clone run automatic when it reboot?
Thanks. sorry my english

/etc/init.d/clone enable should have enabled it to autostart, make sure it is actually enabled in the startup tab in Luci. If it is, I'd probably start looking into the logs to see if it created an error. You could also increase the START=94 figure to something like 99 as it's starting about the same time as gpio_switch might cause a bit of confusion. Other than that read up on init.d and how it works.

Just so you know this stops being relevant for this device-specific thread and is more an issue with configuring OpenWrt so should you have more problems might be worth asking them in a new thread or in one with similar content.