New Xiaomi Router AC2100

Do you have OpenWRT installed? If not, there is the guide. And if you search for it, you can find other guides and videos.
The latest binaries can be found here.

Please update the guide for Xiaomi Redmi Router AC2100 and add a link for a statically compiled mipsel busybox binary file or explain how to get this file?

@scp07 I need your help, I don't know how to install the black cylinder image "standard_mi_ac2100_OpenWRT_19_07_3" in my openwrt ... I have no idea, it has to be by SSH? Any little tutorial? I've been looking at google for hours and I don't see anything about how to install all that! Thanks friend

It depends from where you start. In every case you should unzip the downloaded file at first to get the binary files you need.

If you are already on OpenWRT at the master branch you should do it via mtd write:
Caution: These commands will overwrite your current configuration!
Upload kernel1.bin and rootfs0.bin to the /tmp folder (by using scp, if you're on Windows you can use WinSCP for that)
Now login via SSH, go to /tmp and use these commands:

mtd kernel1.bin kernel
mtd -r rootfs0.bin ubi

If you are on OpenWRT but on the 19.07.x branch (not on master) you could also use sysupgrade instead of the mtd write procedure described above. The mtd write works in every case and is the purest way to do it. Sysupgrade has the advantage that it's pretty easy to use and it can preserve the configuration but it could cause problems if you are on a newer version than 19.07.x and you want to go back to an older version. To use sysupgrade just go to the web UI (System --> Flash Firmware) and update with the provided sysupgrade file. If you don't have a WebUI you could also upload the sysupgrade file to /tmp via scp and then login via SSH and use sysupgrade -v /tmp/<sysupgradefile>.bin

If you are still on stock firmware you have to use the whole pppoe hack procedure described in several detailed guides already mentiond in this thread:

Both guides work with my precompiled images. It doesn't matter if you have the black cylinder or the white 6-antenna model as the procedure is the same for both but of course you have to use the correct image.

I hope that helps. Otherwise just ask again :slight_smile: .

4 Likes

thanks friend! last night I made it brick .... I put the sysupgrade in tmp and then by ssh and it no longer starts .... I want to restore it from the factory, but my wifi does not work? the links are down! I can't download the repairer or the stock rom .... do you have any files to share? Thank you

From which version did you try to sysupgrade? If you're unsure which way to go you should always try it with mtd write - as that will work always :slight_smile:

I guess your problem (router brick) was caused by incompatible configuration files which were taken over during the sysupgrade - that won't ever happen if you use mtd write.

Just to summarize the difference between OpenWRT mtd write and stock mtd write:

on OpenWRT:
mtd write kernel1.bin kernel
mtd -r write rootfs0.bin ubi

on stock:
mtd write kernel1.bin kernel1
mtd -r write rootfs0.bin rootfs0

I've just added the stock recovery tool including stock images to the Google Drive share. If you need help just tell us.

As already mentioned in this thread there is also a very easy to follow instruction set for unbricking the router: Xiaomi Mi Router 4A Gigabit Edition (R4AG/R4A Gigabit) -- fully supported and flashable with OpenWRTInvasion (just don't use the image file which is mentioned in there as that is for another router model - everything else is the same).

An alternative how to do it without the stock recovery tool is described in the official guide. That's a little bit more complicated in comparison to using the tool as the alternative way requires a DHCP server. If you want to take it easy you should use the miwifiRepairTool.

Credits for the black cylinder backport go to @emirefek. I only adjusted and fixed a few things but the major work was done by him - including testing my fixes.

1 Like

what a good partner! thanks for the recovery! Well I did the sysupgrade by ssh and another command ... when doing it again with stock, I replace these files "rootfs0.bin, kernel1.bin and sysupgrade"

for yours, right? once finished, how do you upgrade to future versions of it the same way with those commands? Thank you

For flashing from stock to OpenWRT you only need rootfs0.bin and kernel1.bin. Nothing else :slight_smile: . In my image folders the names are a little bit longer like "openwrt-ramips-mt7621-xiaomi_mi-router-ac2100-squashfs-kernel1.bin". You can take it like that or just rename it to something shorter like kernel1.bin - and of course it's the same for rootfs0.bin.

For upgrading from my images to a future version you could just use sysupgrade. If you stay on the same major version (e.g. in future doing a upgrade from 19.07.3 to 19.07.4) you can preserve the configuration without any risk and it will work.

However if you want to make sure that everything is fine while upgrading from one major version to another major version (like from 19.07.3 to master) you could upgrade without preserving the configuration. Then it will automatically add a default configuration during the sysupgrade which always fits to the new image version. It's still not the same like a pure mtd write but it's close to it. After the upgrade you can have a look at the new syntax and then copy your old configuration (e.g. from a unzipped backup) to it line by line in a format which fits (for example the switch config section from 19.07.x won't work in master as they changed the technology from sw_config to DSA - therefore another configuration is needed in master and the ethernet ports won't be reachable with your previous settings from 19.07.x if you preserve the configuration - and it's the same if you go the other way around). I hope that makes the picture a little bit more clear. It has nothing to do with the images themselves but only with bigger differences between major versions and what is required in the config files.

In general sysupgrade is working pretty reliable as long as you stay in the same major version branch. It's the same like for all other operating systems: If you do a major upgrade to a new major version you will have to adjust some settings. For minor version upgrades it's pretty easy and straight-forward by just clicking on the flash firmware button in LUCI while preserving the config :slight_smile:

3 Likes

Just quick feedback. I just sysupgraded to your build from emirefek's one. It seemed to have broken internet connection for wifi devices, so I went ahead and just used mtd to rewrite. Working perfect after that :+1:

We changed the definition what is used as radio0 and what is radio1 several weeks ago. Maybe you just used a firmware from emirefek which had the swapped defintion. As a result your config didn't fit to the new standarized images. There's a high chance that this is why mtd write worked while sysupgrade caused problems...

My current images are using the official defintion order like it is also defined in master - so this problem shouldn't occur again :wink: . Thank's for your feedback.

I did the tutorial again from 0, with your files! all good! and version to yours! many thanks! I'm going to try luci-qsm!

so when it is a small update from the web, when it is an important udpate I do this again with the new files.

DUAL-Band works? I imagine it would be to put it 2.4Ghz and 5Ghz with the same ID, right?

Thanks friend!

Edit: any way to install all the packates at once?

I don't understand what you mean. Could you please clarify? Which packages do you want to install?

Regarding major version upgrades: You don't have to go back to stock for that. You can also use mtd write directly via SSH while you're still on OpenWRT. Just use

mtd write kernel1.bin kernel
mtd -r write rootfs0.bin ubi

if you are already on OpenWRT.

1 Like

to install the entire .ipk "packages" folder
some way to do it all automatically? Thank you!

Why do you want to do that? You only have to pick additional software you want to install from the WebInstaller in LUCI. You shouldn't install a ton of packages without any selection. You also wouldn't install all packages available in Ubuntu or Debian at once, right? It's the same for OpenWRT: Just install what you need. In my images everything for a good start is already included. If you need anything on top of that, just pick it from the web installer. No manual work is needed for that. If there are dependencies they are also installed automatically.

Perfect, thanks!

If you meant the "packages" folder from my image zip files: This is just a supplement if anybody has problems installing kmods. It's not meant to be installed for a normal installation :slight_smile:

Normally the web installer should be able to install all kmods needed for specific packages automatically. I just added the kmods for the case that there are problems with the web installer - but normally that shouldn't be the case as the kernel vermagic form my images is the same like from the official repo.

If anybody has problems with mt7615e stopping to work after some time you could use the following script as a quick workaround. The mt7615e drivers are still under active development so under specific circumstances you could experience issues. That happens mainly under very high load and if you operate it much more heavier than what is supported by the driver (e.g. more than 4 SSIDs at the same time / several 802.11s mesh networks with a high througput).

If you're looking into dmesg you can see several "mt7615e Message ... timeout" warnings in such cases. After such warnings the 5Ghz wifi won't work any longer. Sadly it is not enough to restart it by using the "wifi" command. Instead the whole router has to be restarted to initialize the driver from the beginning. Here is a script which is continually checking the dmesg output for such warnings and reboots the router if it finds a reason to do so:

#!/bin/sh
# put this file to /sbin/mt7615reboot.sh
# chmod +x /sbin/mt7615reboot.sh
# add a line with "/sbin/mt7615reboot.sh &" into rc.local
# check if rc.local ends with "exit 0" - add it if it is missing
while true
do
	if dmesg | grep -E -q '^\[.*\] mt7615e 0000:01:00\.0: Message.*timeout$'; then
		reboot
		exit 0
	fi
	sleep 15
done

After you created this script and added it to the rc.local file just reboot to activate the script. From now on it will monitor the mt7615e driver for problems and reboot if it is necessary.

This is not necessary for normal setups - but it could be useful if you're stressing your device much more than what is normal.

If you want to include this script in your backup to restore it whenever necessary (or to preserve it during sysupgrades) you can configure this in /etc/sysupgrade.conf by adding a line "/sbin/wan6check.sh"

2 Likes

How completely disable 5Ghz on this router?

Just don't define any 5Ghz wifi networks and it won't be enabled :slight_smile:

If you want to let several 5 Ghz networks in place in the config file but just want to disable them you can do that via LUCI or in the config file by adding option disabled '1' in each wifi network definition block in /etc/config/wireless.

But why don't you want to use it? You can reach much faster speeds with 5Ghz than with 2.4 Ghz. For normal scenarios it is pretty stable so the workaround I mentioned in my post above is just meant for stress tests and shouldn't be necessary for normal users.

My devices not support 5 GHz frequency (just one computer). It would be great if redmi WPA2 cryptography can be replaced with WPA3 wifi software, but unfortunately not now.