This repository contains the files necessary to extend the capabilities of WiFi router Xiaomi Mi AIoT Router AC2350 in black (however, some of the files are also suitable for the white version).
art
partition on the black version of the router to equalize the 2.4 GHz WiFi transmission power limits with the white versionBdata
partition to remove some restrictions (SSH access, access to the u-boot console, etc.)crash
partition dump generator for switching the router to emergency mode, in which all partitions become writable (for example, Bdata, art)stok=
from the URLhttp://192.168.31.1/cgi-bin/luci/;stok=<STOK>/api/misystem/set_config_iotdev?bssid=any&user_id=any&ssid=-h%0Anvram%20set%20ssh_en%3D1%0Anvram%20commit%0Ased%20-i%20%27s%2Fchannel%3D.%2A%2Fchannel%3D%5C%5C%22debug%5C%5C%22%2Fg%27%20%2Fetc%2Finit.d%2Fdropbear%0A%2Fetc%2Finit.d%2Fdropbear%20start%0A
On Linux
printf "%s6d2df50a-250f-4a30-a5e6-d44fb0960aa0" "12345/E0QM98765" | md5sum - | head -c8 && echo
On macOS
printf "%s6d2df50a-250f-4a30-a5e6-d44fb0960aa0" "12345/E0QM98765" | md5 | head -c8
python3.7 -c 'from calc_passwd import calc_passwd; print(calc_passwd("12345/E0QM98765"))'
dd if=/dev/mtd0 of=/tmp/ALL.backup
scp root@192.168.31.1:/tmp/ALL.backup ./
Tip: backup of the original firmware, taken three times, increases the chances of recovery :)
flash_fw.sh
to the router (on PC):
scp flash_fw.sh root@192.168.31.1:/tmp/
firmware.7.mod.bin
to the router (on PC):
scp firmware.7.mod.bin root@192.168.31.1:/tmp/
/bin/ash /tmp/flash_fw.sh &
This action is required only once.
crash
partition:
/root/scripts/crash.sh
crash
partition:
mtd write /tmp/crash_unlock.bin crash
reboot
Bdata
partition:
/root/scripts/bdata.sh
mtd write /tmp/bdata.mod.bin Bdata
crash
partition:
mtd erase crash
reboot
Required only on the black version of the router. This action is required only once.
crash
partition:
/root/scripts/crash.sh
crash
partition:
mtd write /tmp/crash_unlock.bin crash
reboot
art
partition:
/root/scripts/art.sh
mtd write /tmp/art.mod.bin art
crash
partition:
mtd erase crash
reboot
If you have a healthy bootloader, you can use recovery via TFTP using programs like TinyPXE on Windows (with firewalls disabled!) or dnsmasq on Linux.
test.img
test.img
and set it to Online
)To switch the router to TFTP recovery mode, hold down the reset button, connect the power supply and release the reset button after the steady enlightened orange LED starts blinking (about 10 seconds after power up). The blinking orange LED also indicates that you still have a healthy bootloader.
Check the LAN LEDs (or the TinyPXE log output) to see the whether the data is transferred to the router. Once the blue LED starts flashing fast, you can reboot the router by disconnecting and reconnecting the power supply.
After the reboot the orange LED becomes steady which is fine: The original firmware waits for the initial setup.
You will need a full dump of your flash, a CH341 programmer, and a clip for in-circuit programming.
Please use the official documentation on the OpenWRT website.
NB! Before installing OpenWrt on a black version of the router you should follow the 'Patch art Partition' section to be able to switch the 2.4 GHz WiFi transmission power limits from the OpenWrt application. The art
partition can not be unlocked and altered after installing OpenWRT so you need to do this with the original firmware.
brew install p7zip squashfs
cd utils
7z x ../fw/miwifi_r2350_firmware_bd55f_3.0.36_INT.bin.7z
dd
with a block size of 1, you can use binwalk
as an alternative.
./unpack.sh
my
is the name of your mod)
sudo ./unsquash.sh my
squashfs-root.my.mod
directorysudo ./pack.sh my
sudo chown $(id -un):$(id -gn) firmware.my.mod.bin