Home

LEDE - MiWiFi 3G - UniFi Ready

DualBand AC1200 : 2.4GHz~300Mbps + 5Hz~867Mbps, 4x high-gain external antenna MIMO 2x2:2
MediaTeck MT7621AT DualCore @880Mhz, 128/256MB Flash/RAM size
1xWAN + 2xLAN gigabit ports, 1xUSB storage

XiaoMi MiWiFi 3G Router on LEDE SnapShot  (both Vlan.500 + Vlan.600 working) laughing

Some XiaoMi router (named as MiWiFi) is based on OpenWRT customisation, bought 1 of this value-for-money MT base board during my recent trip in China, main objective is trying to flash LEDE/OpenWRT.  Googling around found some helpful references, thanks and credits go to the following smile :

Important note : I'm on one-way-ticket and ready to brick my toys without any intention to return to stock firmware.  If you wish to return to stock firmware later, please go Googling research on how to backup/restore the orginal firmware/key first before start the journey.


Pre-requisite & Preparation


Flash to LEDE/OpenWRT - short version

Basically :

  • Download stock Developer ROM from official website
  • Initial setup stock router, then flash the Dev ROM
  • On mobile phone login to XiaoMi account, then connect to the device's wifi, continue to complete setup link the device to XiaoMi account
  • On PC, login to XiaoMi account, should see the device appear, download the SSH access bin file, remember to write down the root password
  • Login to stock router, flash the SSH bin file
  • PuTTY into the router, execute flash commands
  • Done, LEDE ! cool

Flash MiWiFi 3G to LEDE/OpenWRT - Detail Steps

Download the MiWiFi 3G Dev ROM from http://miwifi.com/miwifi_download.html  :

Go to LEDE Snapshot for MT7621 branch, download this 2 files and copy to USB thumbdrive : mir3g-squashfs-kernel1.binmir3g-squashfs-rootfs0.bin

Also download : mir3g-squashfs-sysupgrade.tar  <-- I always re-flash again after initial flash, also in future upgrade just flash this file will do


Initial setup stock router

Pretty straight forward, connect PC/laptop to the device's LANport, default IP is 192.168.31.1, refer to the following printscreen will do :

2017-09-25 23.47.25-InitialSetup.jpg2017-09-25 23.47.40.jpg2017-09-25 23.47.57.jpg2017-09-25 23.48.21.jpg2017-09-25 23.48.44.jpg2017-09-25 23.49.10.jpg2017-09-25 23.49.17.jpg2017-09-25 23.49.30.jpg2017-09-25 23.49.51-MiWiFi-3G.jpg2017-09-25 23.50.16.jpg
 


Flash Dev ROM

Flash the Dev ROM via stock webgui as follows:

2017-09-25 23.50.47-Flash-Dev.jpg2017-09-25 23.51.52.jpg2017-09-25 23.52.01.jpg2017-09-25 23.52.06.jpg

Wait patiently until it's fully completed, it can take a while wait for at least 5~8mins.

The device will restore to default after flashing to Dev ROM, connect LAN cable (with internet access) to the device's WAN port, then continue below on mobile app to re-setup the device and link it to your XiaoMi account.


Setup MiWiFi router via Mobile App

  • Login to your XiaoMi account first via the MiWiFi mobile app (DO NOT connect to the device's wifi at this stage)
  • After login successfully, then only connect to the device's wifi (default wifi no password)
  • the mobile app will prompt a new device discover, continue to complete setup and link the device to your XiaoMi account

100-App-SignIn.jpg110-App.jpg120-Connect.jpg130-Setup.jpg140-.jpg150-.jpg160-.jpg170-.jpg

Once setup the device and linked to your XiaoMi account successfully, now back to PC/laptop below.


Download & flash SSH access bin file

Back to PC/laptop, connect to internet :

2017-09-25 23.59.54-Login.jpg2017-09-26 00.00.21-Download-SSH.jpg2017-09-26 00.00.49.jpg

After getting the SSH bin file, just flash it via stock webgui like the above how to flash Dev ROM.

Once flashed to the SSH bin file, next is ready to flash LEDE.


Flash LEDE

Plug-in the USB (with the 2 LEDE files downloaded earlier) into the device's USB port, on PC/laptop, connect to the device's LANport, run PuTTY login to the device (192.168.31.1) as root with the password provided above :

(ARE U OK ?? ... yeah, not ok with the stock firmware tongue-out ...)

 

continue to run the following command to flash LEDE :

cd /extdisks/sda1      (<-- my device show sda1 as the USB drive)
ls   (<-- to check and confirm the 2 LEDE files is there)

mtd write lede-ramips-mt7621-mir3g-squashfs-kernel1.bin kernel1
mtd write lede-ramips-mt7621-mir3g-squashfs-rootfs0.bin rootfs0
nvram set flag_last_successs=1
nvram commit
reboot

Wait patiently until it's fully completed, it can take a while wait for at least 5~8mins.  Go have some coffee breathe some fresh air first ...

The device should flash to LEDE successfully, PuTTY login to the device again, default IP is 192.168.1.1

Done, LEDE !!laughing!!

Continue command to set new password and install LuCI webgui for easier setup later :

passwd
opkg update   (<-- wait a while until it's fully loaded ....)
opkg install luci
reboot

After reboot, I'll login to LEDE and reflash (without saving settings) with the .tar file again, then only continue to setup ...


UniFi VLANs & Network Setup

First, setup switch vlans as follows, note Vlan.600 IPTV at LANport2 :

then WinSCP login to the device, go and edit the etc/config/network file, ensure UniFi setup like below, particularly the vlan & vid number :

 

I personally will install the following "must-have" packages :

  • luci-ssl  (secure access to router)
  • SQM QoS  (CAKE with Piece_of_cake or Layer_cake script to resolve Bufferbloat issue)
  • AdBlock  (with daily auto-update)
  • DDNS + No-IP script

DSLReports tests result with the above SQM's Layer_cake on UniFi's VIP50 package = A+ laughing

AdBlock --> no more annoying ads/malwares/botnet smile


DualBand Wireless

Tested some devices like iPhone6/7plus, iPad mini 2, Android devices, so far seem to be ok, signal quite strong though :


The device can get quite hot, so I get a small phone stand and a fan to cool it down

Overall design footprint is quite small, not bad looking, generous hardware spec at this price, setback is only has 2 LANports ... Anyway, with less than RM200, definitely a "must-have" all-in-one LEDE toys for me kiss