User Tools

Site Tools


toh:xiaomi:mir3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
toh:xiaomi:mir3 [2018/05/12 22:20]
stephen304 Add one method of recovering from brick.
toh:xiaomi:mir3 [2018/09/11 07:33] (current)
bakemono [How to flash PandoraBox OpenWrt]
Line 4: Line 4:
  
 ===== Hardware ===== ===== Hardware =====
 +==== Info ====
 +^ [[wp>​Instruction set]]                | [[wp>​MIPS architecture|MIPS]] ​  |
 +^ Vendor ​                               | [[wp>​MediaTek]] |
 +^ [[docs:​techref:​bootloader]] ​          | [[docs:​techref:​bootloader:​uboot|U-Boot + Xiaomi U-Boot]] |
 +^ [[docs:​techref:​hardware:​soc|System-On-Chip]] ​ | Ralink MT7620A |
 +^ [[docs:​techref:​hardware:​cpu|CPU]] @Freq       | MIPS 24KEc V5.0 @580 MHz |
 +^ Flash size                            | 128 MiB NAND |
 +^ Flash Chip                            | [[http://​www.esmt.com.tw/​DB/​manager/​upload/​F59L1G81LA(2Y).pdf|ESMT F59L1G81LA]] (different chip might be used)|
 +^ RAM size                              | 128 MiB DDR2  |
 +^ RAM Chip                              | [[http://​www.nanya.com/​en/​Product/​3779/​NT5TU64M16HG-AC|NT5TU64M16HG-AC]] |
 +^ Wireless No1                          | SoC-integrated:​ MT7620A 2x2 MIMO 802.11b/g/n (2.4 GHz) |
 +^ Wireless No2                          | On-board chip: MT7612E 2x2 MIMO 802.11a/​n/​ac (5 GHz)  |
 +^ [[docs:​techref:​hardware:​switch]] ​             | MT7620 built-in 10/100 switch w/ vlan support ​ |
 +^ USB                                   | 1x  |
 +^ [[docs:​techref:​hardware:​port.serial|Serial]] ​ | [[#​Serial|Yes]] (write disabled after first boot by kernel)|
  
-==== Detailed hardware ==== 
-| **[[wp>​Instruction set]]:​** ​               | [[wp>​MIPS architecture|MIPS]] ​  | 
-| **Vendor:​** ​                               | [[wp>​MediaTek]] | 
-| **[[docs:​techref:​bootloader]]:​** ​          | [[docs:​techref:​bootloader:​uboot|U-Boot + Xiaomi U-Boot]] | 
-| **[[docs:​techref:​hardware:​soc|System-On-Chip]]:​** ​ | Ralink MT7620A | 
-| **[[docs:​techref:​hardware:​cpu|CPU]] @Freq** ​       | MIPS 24KEc V5.0 @580 MHz | 
-| **Flash size:​** ​                           | 128 MiB NAND | 
-| **Flash Chip:​** ​                           | [[http://​www.esmt.com.tw/​DB/​manager/​upload/​F59L1G81LA(2Y).pdf|ESMT F59L1G81LA]] (different chip might be used)| 
-| **RAM size:​** ​                             | 128 MiB DDR2  | 
-| **RAM Chip:​** ​                             | [[http://​www.nanya.com/​en/​Product/​3779/​NT5TU64M16HG-AC|NT5TU64M16HG-AC]] | 
-| **Wireless No1:​** ​                         | SoC-integrated:​ MT7620A 2x2 MIMO 802.11b/g/n (2.4 GHz) | 
-| **Wireless No2:​** ​                         | On-board chip: MT7612E 2x2 MIMO 802.11a/​n/​ac (5 GHz)  | 
-| **[[docs:​techref:​hardware:​switch]]:​** ​             | MT7620 built-in 10/100 switch w/ vlan support ​ | 
-| **USB:​** ​                                  | 1x  | 
-| **[[docs:​techref:​hardware:​port.serial|Serial]]:​** ​ | [[#​Serial|Yes]] (write disabled after first boot by kernel)| 
  
- +==== Serial ==== 
-==== Serial ​connection ​==== +The serial port of the router ​can be accessed using the TTL pins. A voltage level converter (such as a CP2102 TTL-USB dongle) is required. Writing to the console is disabled in the factory U-Boot. Writing to the console in the factory firmware is only possible during first boot; afterwards it is disabled by the firmware.
-The serial port of the Router ​can be accessed using the TTL pins. A voltage level converter (such as a CP2102 TTL-USB dongle) is required. Writing to the console is disabled in the factory U-Boot. Writing to the console in the factory firmware is only possible during first boot; afterwards it is disabled by the firmware.+
  
 To enable writing to the console, you must use the following commands: To enable writing to the console, you must use the following commands:
Line 540: Line 539:
   * OLD_PASSWORD is your admin password you'd set while setting up the router or can be reset from Mi Wifi app.   * OLD_PASSWORD is your admin password you'd set while setting up the router or can be reset from Mi Wifi app.
  
-P.S.- Got the instructions ​from http://www.right.com.cn/forum/thread-185797-1-1.html using Google Translate :);):).+You should now be able to access ssh:   
 +**ssh root@192.168.31.1** 
 + 
 +Now you can re-enable serial port (must reboot): 
 +<​code>​ 
 +nvram set uart_en=1 
 +nvram set flag_last_success=1 
 +nvram set boot_wait=on 
 +nvram commit 
 +</​code>​ 
 + 
 +Instructions ​from: https://4pda.ru/​forum/​index.php?​showtopic=736801&​st=19100#​entry68306060 
 + 
 +===== How to flash PandoraBox OpenWrt ===== 
 + 
 +All necessary files r linked here https://​mega.nz/#​F!WY0FiTIS!Cl_Dzm4yhzrQZFazYG3i8Q 
 + 
 +For future firmware/​bootloader update https://​downloads.pangubox.com or http://​downloads.pangubox.cn 
 + 
 +**Flash instructions** 
 + 
 +  - get ssh/dropbear access by above instruction 
 +  - we need the pandorabox bootloader and flash it, transfer/​wget it to cd /tmp 
 +  ​in ssh:<​code>​ 
 +cd /tmp 
 +mtd write pb-boot-xiaomi3-20180726-0d8505f.img Bootloader 
 +reboot</​code>​(if there is a updated bootloader in future use that one) 
 +  - wait 4-5 min after reboot 
 +  - now switch off the router through plug, hold the reset button and switch on the router then release the reset button after 1~2 sec, router will flash breath style yellow led 
 +  ​go to 192.168.1.1, u will see a PandoraBox firmware upgrade page. select ur pandorabox firmware (*-sysupgrade.binand upload it. 
 +  - access the PandoraBox openwrt by 192.168.1.1,​ default password is "​admin"​. This has english language, just select the auto in language option. 
 + 
 +**Revert to stock** 
 + 
 +First, we have to flash our stock bootloader and kernel0 partition back to their initial state. But there is a catch, the bootloader partition is locked in pandorabox firmware or any other normal openwrt firmware. Good news is I have compiled a openwrt firmware with unlocked bootloader option for mir3. You will find it in my mega link. 
 + 
 +  - access the pandorabox firmware upgrade page like before (see 5,6 above) 
 +  - select the firmware "​openwrt-ramips-mt7620-xiaomi_miwifi-r3-squashfs-sysupgrade.bin"​ and upload it. 
 +  - login to the router 192.168.1.1,​ no password, just press login, configure password and enable ssh (well, u can use this firmware as vanilla openwrt) 
 +  - transfer/​wget ur necessary files (Bootloader.bin & kernel0.bin) to cd /tmp 
 +  - in ssh:<​code>​ 
 +cd /tmp 
 +mtd write Bootloader.bin Bootloader 
 +reboot</​code>​ 
 +  - access ssh again<​code>​ 
 +fw_setenv flag_try_sys2_failed 1 
 +cd /tmp 
 +mtd write kernel0.bin kernel0_rsvd 
 +reboot</​code>​ 
 +  - shortly after reboot router will start blinking red (means it's in recovery mode) 
 +  - insert a usb stick in fat32 formatted with stock firmware renamed to miwifi.bin 
 +  - press the reset button for 1~2 sec until the red blinking turns into yellow blinking. 
 +  - now wait for 4-5min and login to the router 192.168.31.1 
 + 
 +This tutorial originally posted here https://​forum.openwrt.org/​t/​xiaomi-mi-wifi-3-support/​2252/​685
  
 ==== Recovering from Softbrick ==== ==== Recovering from Softbrick ====
toh/xiaomi/mir3.1526163639.txt.gz · Last modified: 2018/05/12 22:20 by stephen304