Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Xiaomi Router Mini with full Unifi support, turn into a beast with custom asus rom!

views
     
TSI<3LYN
post Jan 6 2016, 08:02 PM, updated 10y ago

On my way
****
Senior Member
614 posts

Joined: Sep 2009


Warning/Disclaimer: It might brick your device if you don’t understand what you’re doing. I am not responsible for any things that happened to your device or you. It will be much easier for you if you had experience with linux commands and/or flashed a router with custom firmware before.

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.

I was almost ready to give up... until i found a promising firmware by hiboyhiboyhiboy ( http://www.right.com.cn/forum/thread-161324-1-1.html it is in chinese if you can read) . I've compiled my own version of Padavan firmware, you can check Files you need (to download) section for the link. It customized based on Padavan ( https://bitbucket.org/padavan/rt-n56u ). If you want, you can compile it from the source by following this guide ( https://bitbucket.org/padavan/rt-n56u/wiki/...wToMakeFirmware ).

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 by
CODE
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 and unzip it (you dont need to unzip it, it is already in the extracted form)
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 smile.gif

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

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(blacktubi @ Jan 6 2016, 08:44 PM)
Great instruction. biggrin.gif

Anyway, how's the wireless performance on the ported Asus firmware as I know wireless performance is hit and miss on most non Xiaomi firmware.
*
i am yet to test both 2.4 and 5Ghz in detail.

I will report back once i did some bandwidth and stability test.
TSI<3LYN
post Jan 6 2016, 10:50 PM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(blacktubi @ Jan 6 2016, 08:56 PM)
Great! Please share the wireless performance.

I am still stuck with Xiaomi stock firmware and having to use a VLAN switch for Unifi. sweat.gif
*
just did some testing

got weird results though

my router is at my living room.

the signal strength within the line of sight (few meters away) is about -40 dBm

furthest corners away from the router at 2nd floor is about -60 ~ -65 dBm

650MB within line of sight @ 3m25s (2.4G wireless mode N)
650MB within line of sight @ 2m06s (5G wireless mode N)

650MB room at 2nd floor directly above the router @ 2m50s (2.4G wireless mode N)
5G 650MB room at 2nd floor directly above the router @ 1m54s (5G wireless mode N)

the latency is stable for most places in my house (just standard double story house), except for the further corner away from the router.

I have no other comparisons, but It is much better than the router (D-Link L7-N-R2000) that TM provided though.

It is also much better than vanilla OpenWRT firmware.

This post has been edited by I<3LYN: Jan 6 2016, 10:52 PM
TSI<3LYN
post Jan 6 2016, 11:52 PM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(blacktubi @ Jan 6 2016, 11:29 PM)
I calculated and it is around 41Mbit/s for 5Ghz 2m06s. hmm.gif

Do you have 802.11AC enabled as that's where the problem is.
*
there are 2 issues, i've AC enabled on router but the devices I test on don't support AC, secondly the pc that upload the file might be hit a bottleneck due to the hdd and network speed. I need to change my approach to at least try to maximize the speed of N mode doh.gif
TSI<3LYN
post Jan 7 2016, 09:49 AM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(wcypierre @ Jan 7 2016, 01:10 AM)
Check out your phone? If your phone uses qualcomm most likely it has 802.11ac in it
*
good suggestion... but i need another source that able to split out data at 1300mbps and also support wireless AC doh.gif
TSI<3LYN
post Jan 7 2016, 05:18 PM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(zhuoyang @ Jan 7 2016, 04:59 PM)
Can you do a test how is the WiFi coverage and performance compared to pandorabox?
I tried the latest openwrt chaos calmer, the WiFi really sucks compared to both official firmware and pandorabox.
*
the signal is definitely better than openwrt.. i say it is on par with PandoraBox/official firmware.

It is compiled with the proprietary wifi driver as far as i know. hence the better performance compared with openwrt which is using generic driver.


are you using unifi? how did you get pandorabox running with unifi? blink.gif

This post has been edited by I<3LYN: Jan 7 2016, 05:20 PM
TSI<3LYN
post Jan 8 2016, 11:37 AM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(zhuoyang @ Jan 7 2016, 05:48 PM)
I am using it just for access point. My router still using tm provided dir-615 (running dd-wrt for ultimate stability)
*
i see.

Personally, i think it is better to use Xiaomi for the entire setup, since it has much better hardware ( and wifi? i don't know, i was using D-Link DIR614 and it is crap) . Otherwise it is a waste of the hardware to use it just as an AP.
TSI<3LYN
post Jan 8 2016, 03:05 PM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(zhuoyang @ Jan 8 2016, 11:53 AM)
Yea planning to install this custom firmware soon
*
i am compiling my own version from the Padavan source code for security reasons brows.gif

so you will get the clean version of padavan's firmware with minimum modification (without the chinese addons) for the xiaomi-mini router.

I probly can get it uploaded by tonight or so if there are no problem with the compile process and test runs.

stay tuned.



Updates:
I've compiled my own version, everything is working fine so far, make sure you select the correct Wifi country code (just select any country with 1-13 channels) /channel otherwise it could auto selecting the channel 14 which is not supported in most countries including ours.

This post has been edited by I<3LYN: Jan 8 2016, 04:49 PM
TSI<3LYN
post Jan 12 2016, 11:30 AM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(kelvin @ Jan 12 2016, 08:41 AM)
Hi,
Can I flash when my router is now stock firmware. ( xiaomi firmware ) 
Thanks.
*
yes, you can. You can flash it from any firmware as long as it is the same router.
TSI<3LYN
post Jan 12 2016, 01:30 PM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(goolias @ Jan 12 2016, 11:55 AM)
Hi,

Mind to share your compiled version ?
*
already shared the first post.
TSI<3LYN
post Jan 12 2016, 03:48 PM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(goolias @ Jan 12 2016, 01:33 PM)
You mean this link: ba454a7 ?
*
Custom Padavan firmware megablue edition v1
TSI<3LYN
post Jan 12 2016, 04:00 PM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(acbc @ Jan 12 2016, 03:49 PM)
Just a TP-Link Smart Easy Switch to do the VLAN taggings.
*
not worth it for me to buy another equipment just to do the VLAN taggings, kind of defeat the purpose of getting a cheap and powerful router, furthermore i dont need gigabit ethernet.
TSI<3LYN
post Jan 13 2016, 05:30 PM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(zhuoyang @ Jan 13 2016, 11:32 AM)
Why would you comment on this thread then, when it's a custom firmware thread ?
Also why would we to need spend extra RM100 for a switch just for vlan tagging , when we already have a hardware capable of doing so.
*
thanks for saying that. I was going to say something similar but kind of hold back a bit to avoid argument tongue.gif

if i were to buy another equipment just to have better out of the box experience, i might as well as just a router that does all that with vanilla setup rather than spending it on 2 piece of equipments. doh.gif

for me choosing xiaomi mini router because it is highly hackable and cheap.

This post has been edited by I<3LYN: Jan 13 2016, 05:51 PM
TSI<3LYN
post Jan 13 2016, 05:34 PM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(kelvin @ Jan 13 2016, 09:31 AM)
I want to make sure that all the steps work as in your guide before I flash my Xiaomi mini router. I tested with a TP - Link TL-WDR4300 flash with openwrt. I copy the 2 files to a USB pendrive format with Fat32 and plug in to the USB of the TP Link router. SSH to the router and I issue the command cd /extdisks/sda1 , but it says cannot cd to extdisks . Is there something that I miss out ?
Thanks.
*
because every firmware mount the drives at different locations

you can try to follow every steps with your xiaomi router prior
CODE
mtd -r write breed-mt7620-xiaomi-mini.bin Bootloader


because it is the exact step that would cause your router to brick if you did something wrong.

anything prior this doesn't write anything to your router that could cause your router brick.

you're safe to to familiarize yourself, find out anythings that you're uncertain then you could just raise the questions in this thread.

This post has been edited by I<3LYN: Jan 13 2016, 05:50 PM
TSI<3LYN
post Jan 14 2016, 02:11 PM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(kelvin @ Jan 14 2016, 09:17 AM)
Hi,
After finish flash the ROM and refresh 192.168.1.1, but "Page No Found". When turn On the router, no yellow light, straight away the blue light up. Tried 2 times, the same problem happen. Is my flashing step wrong or anything I done it not correct?
Thanks.
*
which step were you at?

did you manage to boot into Breed?

are you sure it is "Page not found" instead of other error? if it is page not found make sure the url in your address bar is exactly http://192.168.1.1/ instead of being redirected. access it from incognito mode if you want to be sure.
Also try, http://my.router/


This post has been edited by I<3LYN: Jan 14 2016, 02:19 PM
TSI<3LYN
post Jan 14 2016, 03:10 PM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(kelvin @ Jan 14 2016, 02:51 PM)
I was at step 10 of your guide. I manage to boot to breed, select option  no. 2 to update the firmware. It updated until the bar is complete, then at the bar, some Chinese character says if it do not reboot, you need to refresh. This is where I am stuck. After refresh, I do not get the page, it only show me a pink color page,    i forgot the error written there. At the same time the routet blue light is flashing. What should I do now
*
dont worry, as long as you still can access to breed, most things can be recovered.

how long did you wait after the progress bar reached the end? give it 10 minutes before you reboot.

Please do the step 11 as well.

QUOTE
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,



Also, you should try to access your route from incognito mode

In some cases, some cache that your previous router/firmware left behind could redirect the default page to the wrong url.

This post has been edited by I<3LYN: Jan 14 2016, 03:13 PM
TSI<3LYN
post Jan 14 2016, 03:35 PM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(kelvin @ Jan 14 2016, 03:27 PM)
Thks for the prompt reply, i waited like 25 mins after the progress bar reachef the end. Still the screen remain the same. Anyway I will try again tonight in incognito mode and keep you inform on the progress.
I was curious why the blue light kerp blinking. Normslly when ypu on the routet, it is yellow then turn to blue, but my case , it will straight go to blue blinking when i turn it on
*
the behavior of the LEDs got changed with the bootloader & firmware.
TSI<3LYN
post Jan 14 2016, 04:35 PM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(kelvin @ Jan 14 2016, 03:57 PM)
One more question, if i successfully reboot to breed and do srep 11,i. e reseting the configuration to default, then i rebbot. After rebooting, the gui will be in english to set the settings for unifi, cos now is in breed mode , there is no advance setting as i your guide in the last step
*
yes, the UI will be in English.
TSI<3LYN
post Jan 16 2016, 05:05 PM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(kelvin @ Jan 16 2016, 09:43 AM)
Is it possible to SSH again to the router once upgraded. I just wamt to check the wireless setting /etc/config/wireless. I just cannot Ssh when i try to use putty. Thanks.
*
Administration -> Services -> Enable SSH server
TSI<3LYN
post Jan 16 2016, 10:00 PM

On my way
****
Senior Member
614 posts

Joined: Sep 2009


QUOTE(kelvin @ Jan 16 2016, 07:04 PM)
Login as root, tried the password when i install breed , message is wrong password. tried a few password that i know , butt all to no avail. Any solution? Thanks
*
dude... your username is admin... doh.gif why you use root to login

2 Pages  1 2 >Top
 

Change to:
| Lo-Fi Version
0.0419sec    0.53    7 queries    GZIP Disabled
Time is now: 30th November 2025 - 10:09 AM