How to install OpenWrt on Xiaomi AX3000T router

Hello everyone! Today I’m gonna write about installing the OpenWrt open source firmware in a Xiaomi AX3000T router because when I tried it myself I’ve found that some information was spread around the internet or the development post on the official OpenWrt online forum.

In this tutorial we’ll see how to install the official snapshot version that is currently available for this unit. I assume that you have basic Linux knowledge (e.g. how to access your router via SSH, etc) and that you have internet access to finish installing the LuCI web interface.

Disclaimer

Installing/Flashing a custom firmware is a risky task and should be performed only by experienced users or enthusiasts, do it at your own risk. Doing so may void your warranty and/or result in a bricked or dead device. Please, fully read the tutorial and make sure you understood the steps before proceeding to the actual installation.

Important Notes

I have tested the steps shown here on the Chinese variant of the AX3000T router (RD03). The global version (RD23) isn’t working with OpenWrt yet because of missing exploits to enable installation, then it should be avoided for now if your goal is to install a custom firmware.

Another thing is that if you install OpenWrt the router is gonna lose the NFC and Mesh functionalities.

Tutorial

So, let’s dive in the tutorial steps. You may start by scrolling down to the section “OpenWrt Install Instructions” because it’s the tutorial’s main section and the other sections are mentioned there.

Hard Reset Instructions

If you previously setup your unit in any way, please follow the instructions from this section to reset it to its default stock firmware factory reset state.

Method #1: With the router already powered on and completely booted, press the reset button on its back side using a paper clip for at least 40 seconds

Method #2: Turn on the router while pressing the reset button on its back

On both methods the LED should become orange, after ~30s blink once and after ~40s it will blink fast. Once it’s back on orange static color, release its reset button then disconnect the router from power for at least 10s and turn it back on so it gets fully reset.

Firmware Version Downgrade Instructions

The installation of OpenWrt requires an enabled SSH service. This is possible only if the unit is running version 1.0.47 because the exploit to enable SSH uses a function that is only present on this specific firmware version.

Note: You may need a Windows installation to run the firmware downgrade steps (the program by Xiaomi only runs on Windows OS).

1- Download the 1.0.47 bin file from here and the Xiaomi Router Repair Tool from here

Tip: To download the Xiaomi tool, click on the blue button as shown on the image below

Xiaomi Router Repair Tool download page

I’d recommend that, just in case, you reset your router before proceeding to the next step (see the “Hard Reset Instructions” section above).

2- Run the Tool and upload the firmware file following the instructions from the video linked below:

Tip: If your PC cable is connected to the router but nothing happens while running the Repair Tool, try clicking once on the router’s reset button or try to close and reopen the tool

3- Once done, the router LED will blink fast on white color. Then reboot the router (remove its power for at least 10 seconds)

Setup Wizard Instructions

This section provides detailed instructions to help finishing the router’s setup wizard. This is a requirement for the exploit to work.

1- Check the router IP (in my unit it was 192.168.31.1)

2- Open any internet browser and access the router IP

2.1- Click on the blue button to agree to the terms

Setup wizard step 1

Then it will load the screen below:

Setup wizard step 1 loading screen

2.2- On the next screen, click on the light blue button

Setup wizard step 2

As the router is disconnected from the internet, it’s gonna fail to detect the connection automatically.

2.3- On the connection setup screen, select the DHCP option

Setup wizard step 3

Tip: If instead of going to the screen above, it shows another screen, follow the steps as shown below

Setup wizard optional flow for step 3

2.4- Insert a WiFi password (that will be the web admin password) and hit Next

Setup wizard step 4

2.5- Then the setup wizard is done

Setup wizard final screen

OpenWrt Install Instructions

1- Download the files:

xiaomi_mi-router-ax3000t-initramfs-factory.ubi
and
xiaomi_mi-router-ax3000t-squashfs-sysupgrade.bin

From https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/

Tip: You may verify the SHA256SUM hashes of the downloaded files to make sure they have been correctly downloaded

2- Verify that your OS has Python (3.8+) and OpenSSL installed using:

python --version
openssl -version

3- Download the XMiR-Patcher

git clone https://github.com/openwrt-xiaomi/xmir-patcher.git
cd xmir-patcher/

4- Copy the .ubi file you downloaded on step 1 to the “firmware” folder inside the xmir-patcher directory created on step 3

5- If not already done, turn your Xiaomi AX3000T on

5.1- Check the router IP (in my unit it was 192.168.31.1)

5.2- Open any internet browser and access the router IP

Xiaomi AX3000T router web interface login screen

5.3- Login to the router and check that your firmware version is 1.0.47

Xiaomi AX3000T router web interface main screen

If not (like the screenshot above), follow the instructions from the “Firmware Version Downgrade Instructions” section

6- Prepare your router to flash OpenWrt

If it has been previously setup in any way, reset it to factory reset state by following the instructions from the “Hard Reset Instructions” section on the beginning of this page. If it is already reset, finish the setup wizard by following the instructions from the “Setup Wizard Instructions” section before going to the next step.

Note: To successfully connect, use an Ethernet cable between your PC and the router, disconnect it from other equipment (e.g. internet modem, other routers, etc) and make sure the router LED is displaying a static orange color (if not, reset your router following the instructions from the “Hard Reset Instructions” section on the beginning of this page)

7- Run the script inside xmir-patcher folder

./run.sh

Tip: Use !START.bat on Windows

7.1- And if needed use option 1 “Set IP-address” to update router’s IP accordingly

7.2- Select option 2 “Connect to device (install exploit)”

Xiaomi MiR Patcher exploit screen example

7.3- Select option 7 “Install firmware (from directory “firmware”)”

The router will reboot after the process is finished (it usually takes between 40-70 seconds)

8- Once the boot finishes (white LED on), connect the internet cable on WAN port now (the nearest port to the power plug connector)

8.1- Login as root via SSH on 192.168.1.1, then enter the following commands to install the sysupgrade:

cd /tmp

wget https://downloads.openwrt.org/snapshots/targets/mediatek/filogic/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-squashfs-sysupgrade.bin

sysupgrade /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-squashfs-sysupgrade.bin

8.2- To install LuCI web interface type inside the SSH terminal

opkg update
opkg install luci

Wait for it to finish (depends on the internet speed)

9- Open any web browser and access the IP 192.168.1.1

Tip: Default credentials are root and empty password

9.1- Enable WiFi

On the top main menu, navigate to Network > Wireless

Or access the URL below directly

http://192.168.1.1/cgi-bin/luci/admin/network/wireless
OpenWrt wireless configuration screen

9.2- Edit or remove the networks created by default

OpenWrt wireless network delete option

9.3- Adjust the settings according to your preferences then click “Save & Apply”

Tip: If the interfaces take more than a minute or two to turn on, click on the “Restart” button on the “radioX MediaTek MT…” lines

Note: Set the “Mode” to Access Point and set the “Network” option on “Interface Configuration” section and “General Setup” to LAN (see the example on the image below)

If even after some minutes the 5GHz radio doesn’t turn on, try setting the “Country Code” on Network > Wireless > Edit (near the 5GHz SSID) > Device Configuration > Advanced Settings tab to some country different from “00 – World” (for example, the image top part of the image above shows the default option “driver default” that may be changed to some country).

And it’s done, now you have OpenWrt running on your Xiaomi AX3000T.

Adjusting LED Behavior

To mimic the LED behavior of the stock firmware, follow the steps below:

1- Head over to System > LED Configuration

2- Click on “Add LED action” button

2.1- On the new popup screen configure as follows:

Name: (put any name you want)
LED Name: yellow:status
Trigger: Always on

2.2- Then click on “Save”

2.3- Click on “Add LED action” again to create the second state.

Configure it as follows:

Name: (put any name you want)
LED Name: blue:status
Trigger: Network device activity
Device: wan
Trigger Mode: Link On

As far as I tested, the blinking trigger modes (a.k.a. “Custom flash interval” and “Heartbeat interval”) are not that useful if you have any always on LED state as the color change isn’t so noticeable.

Sources

https://forum.openwrt.org/t/openwrt-support-for-xiaomi-ax3000t/180490
https://openwrt.org/inbox/toh/xiaomi/ax3000t
Thanks for all the users that posted their findings on the forum (special thanks to remittor, thecatelmo and vipperhell)

Credits: ТЕХНОСМАК on YouTube and OpenWrt on Github for the images used to create the featured picture on this post

See you around!

Deixe um comentário