Xiaomi Router Mini is probly one of the cheapest dual band wifi router you can get in the market and it is very powerful device for its price. Luckily for me, i purchased it for only RM60ish including shipping from china, the promotion is already expired though.
First thing i realized when i got the Xiaomi Router is, it doesn’t work with Unifi due to non customizable VLAN tags on the official firmware which is expected due to I did some research before I purchase the device. Hence, I flashed it with OpenWrt. I was expecting OpenWrt to work perfectly with Xiaomi Router Mini. However, I soon realized i was wrong. After some tinkering, I found that not only wireless AC doesn’t work (unable to get the driver working), i am unable to get Hypptv (issues with vlan tagging but only for iptv specifically, PPPoE works fine) working as well.
After I failed to get it working, I tried PandoraBox as well but PandoraBox can’t even support vlan tagging correctly.
Updates:
08 January 2016, I've compiled my own version of Padavan's firmware with minimum customization, with come with OpenVPN support and remapped the GPIO and some ports accordingly for Xiaomi Miwifi Mini router. It is compiled from latest commit ( ba454a7 )
Files you need (to download)
1. Breed bootloader
2. Custom Padavan firmware megablue edition v1
For those who had experience with flashing a router this is the short version or overview of the guide.
1. Gain access to the router console either telnet or ssh or web based console
2. Installing the custom bootloader - Breed
3. Boot into Breed, install the Padavan firmware
4. Do the basic configures and vlan taggings to get it to work with Unifi or Maxis broadband
Gain access to the router console either telnet or ssh or web based console
there are various ways to gain access the to console, I only show the easiest way that I found on ( https://wiki.openwrt.org/toh/xiaomi/mini )
1. Connect to your PC to your router with ethernet cable
2. Power on and setup the Xiaomi router until it reboots and gets IP address 192.168.31.1
3. Log-in into the router and grab the value of the stok URL parameter (for instance: "9c2428de4d17e2db7e5a6a337e6f57a3")
4. Replace the <STOK> placeholder and load this URL in your browser or curl, this will start telnetd on the router:
CODE
http://192.168.31.1/cgi-bin/luci/;stok=<STOK>/api/xqnetwork/set_wifi_ap?ssid=whatever&encryption=NONE&enctype=NONE&channel=1%3B%2Fusr%2Fsbin%2Ftelnetd
5. It should spit out some wifi error code, that is ok, don't worry.
6. Replace the <STOK> placeholder, the current password and the desired root password and load this URL in your browser or curl, this will set the router root password
CODE
http://192.168.31.1/cgi-bin/luci/;stok=<STOK>/api/xqsystem/set_name_password?oldPwd=<CURRENTPASS>&newPwd=<NEWPASS>
It should spit out: {"code":0}
7. Telnet to the router, enter user root and NEWPASS chosen above.
Installing the custom bootloader - Breed
1. Now i assuming you have access to your router console/telnet/ssh.
2. This is the risky part, proceed with extreme caution as a broken bootloader could brick your router, the only way for you to revive the router would be 3. physically wire the TTL connection to rewrite the bootloader.
4. Download Breed for Xiaomi router mini ( http://breed.hackpascal.net/r802%20%5b2015...iaomi-mini.bin) .
5. Copy it to the root directory of a usb thumb drive (1GB free space is more than enough) with FAT/FAT32 partition.
6. Plug the thumb drive into the router.
7. at the console, type
CODE
cd /extdisks/sda1/
follow byCODE
ls -l
you should be able to see the breed-mt7620-xiaomi-mini.bin 8. type
CODE
cat /proc/mtd
it will list out the partitions on the router flash chip.9. look for "Bootloader" it should be listed as mtd1: 00030000 00010000 "Bootloader"
10. now dump a backup of the partition to your usb drive with following command
CODE
dd if=/dev/mtd1 of=/extdisks/sda1/Bootloader.bin
11. you should also create a backup for all other partitions listed with
CODE
cat /proc/mtd
as well, just name them accordingly. 12. now you’re ready to install the custom bootloader, type
CODE
mtd -r write breed-mt7620-xiaomi-mini.bin Bootloader
13. it should shows rebooting when the installation is complete.
Boot into Breed, install the Padavan firmware
1. download the custom Padavan firmware megablue edition v1
2. power off your router, look for a pinhole at the back of your router, press and hold it with a pin, while holding the button in the pinhole, power on your router.
3. release the pinhole button when you see orange/yellow light is blinking.
4. open your browser (preferably Chrome) and type 192.168.1.1 into the address bar.
7. you should be able to access the Breed web interface (in chinese but i will guide you!).
8. Now select the second button on the menu it should says 固件更新
9. now you should be located at http://192.168.1.1/upgrade.html select 固件 and upload the custom Padavan firmware. it should look like this https://i.imgur.com/28pq86W.png
10. wait for the progress bar to complete, it should reboots automatically.
11. you might need to boot into Breed for the second time to reset the default settings for the Padavan firmware. to reset the settings, click the 5th button on the menu, the select Config 區 (公版). It should look like this https://i.imgur.com/oFjNtBm.png
click 執行 to reset the settings,
vlan taggings to get it to work with Unifi & Hypptv
1. now the router should be flashed with the the firmware, it should be accessible at 192.168.1.1 with username: admin and password: admin.
2. now we’re going to configure the basic internet and iptv (for unifi, if you’re using maxis broadband you need to adjust the vlan accordingly) .
3. Click Advanced Settings -> WAN
4. WAN Connection type PPPoE
5. Under PPP VPN client setting key in your unifi account username and password
6. Under Ports Isolation and VLAN Filtering
7. Choose IPTV STB Port: LAN2 (last LAN port counting from left to right)
9. VLAN CPU (Internet) VID 500
8. VLAN CPU IPTV VID 600
9. VLVAN LAN2 VID 600
10. it should look something like this https://i.imgur.com/Cxmstbg.png
11. click apply
12. now you should be able to access the internet and Hypptv.
while the rest of the router functions pretty much self-explanatory. i am too lazy to continue as the guide is already extremely long for my taste, There are a lot of things you can do with the Padavan firmware (google it for details)
Now enjoy better network performance with highly affordable price

This post has been edited by I<3LYN: Jan 14 2016, 02:12 PM