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
Next revisionBoth sides next revision
toh:xiaomi:xiaomi_mi_router_4c [2022/03/26 10:55] – [Xiaomi Mi Router 4C] Eon flash chip issue bill888toh:xiaomi:xiaomi_mi_router_4c [2023/02/03 13:21] – [Tags] fix tags danitool
Line 14: Line 14:
  
 {{ :media:xiaomi:mi-router-4c.png?400 |}} {{ :media:xiaomi:mi-router-4c.png?400 |}}
 +
 ===== Supported Versions ===== ===== Supported Versions =====
  
Line 23: Line 24:
 ---- ----
  
-===== Experimental Versions ===== 
- 
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  
-   The official Table of Hardware only lists current, stable versions of OpenWrt.  * 
-   Use this space to describe any on-going efforts to create a newer version       * 
-   of the firmware for this device. Provide links to firmware images,              * 
-   active threads on the forum, or other sources of information.                   * 
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 
  
-//None at this time.// 
  
 ===== Hardware Highlights ===== ===== Hardware Highlights =====
Line 44: Line 36:
  
 ===== Installation ===== ===== Installation =====
-/* stable release */ 
-/* uncomment once stable release is available */ 
 ---- datatable ---- ---- datatable ----
 cols    : Model, Versions, Supported Current Rel, Firmware OpenWrt Install URL_url, Firmware OpenWrt Upgrade URL_url, Firmware OEM Stock URL_url cols    : Model, Versions, Supported Current Rel, Firmware OpenWrt Install URL_url, Firmware OpenWrt Upgrade URL_url, Firmware OEM Stock URL_url
Line 52: Line 42:
 filter  : Model=Mi Router 4C filter  : Model=Mi Router 4C
 ---- ----
- 
- 
- 
-/* snapshot */ 
-/* delete once stable release is available 
----- datatable ---- 
-cols    : Model, Versions, Supported Current Rel, Firmware OpenWrt snapshot Install URL_url, Firmware OpenWrt snapshot Upgrade URL_url, Firmware OEM Stock URL_url 
-headers : Model, Version, Current Release, Firmware OpenWrt snapshot Install, Firmware OpenWrt snapshot Upgrade, Firmware OEM Stock 
-align   : c,c,c 
-filter  : Model=Mi Router 4C 
----- 
-*/ 
  
 -> [[docs:guide-user:installation:generic.flashing|Install OpenWrt (generic explanation)]] -> [[docs:guide-user:installation:generic.flashing|Install OpenWrt (generic explanation)]]
  
 <WRAP center round important> <WRAP center round important>
-The snapshot version is NOT tested and it does not ship with a GUI. Your initial network configuration needs to be done via uci. Afterwards you can install LuCI for GUI. 
 As of the time of this edit (2019-06-19), some users have reported Wi-Fi to be unstable. Do not attempt to perform firmware updates via Wi-Fi in order to avoid damage to your device. As of the time of this edit (2019-06-19), some users have reported Wi-Fi to be unstable. Do not attempt to perform firmware updates via Wi-Fi in order to avoid damage to your device.
 </WRAP> </WRAP>
Line 75: Line 52:
   - Install python3 and and to PATH if not installed.   - Install python3 and and to PATH if not installed.
   - Install requirements: <code>pip3 install -r requirements.txt</code>   - Install requirements: <code>pip3 install -r requirements.txt</code>
-  - Login to Web panel of your router and copy stok code from URL.+  - Login to Web panel of your router and copy the stok URL parameter out of the address field of your browser.
   - Execute the exploit: <code>python3 remote_command_execution_vulnerability.py</code>   - Execute the exploit: <code>python3 remote_command_execution_vulnerability.py</code>
   - Enter stok and router's IP to command line when it asks to.   - Enter stok and router's IP to command line when it asks to.
Line 88: Line 65:
 ===== Hardware ===== ===== Hardware =====
 ==== Info ==== ==== Info ====
- 
 ---- datatemplatelist dttpllist ---- ---- datatemplatelist dttpllist ----
 template: meta:template_datatemplatelist template: meta:template_datatemplatelist
Line 95: Line 71:
 ---- ----
  
-=== Stock /proc/mtd ===+==== Photos ==== 
 +/* =====>>>>> Standard size for photos: add ?400 to the medialink                                */ 
 +/* When uploading photos, **name them** intelligently. Nobody knows what 20100930_000602.jpg is! */ 
 +/* e.g. {{:media:yourbrand:yourbrand_yourmodel_front.jpg?400|}}                                  */ 
 +/* Thanks, your wiki administration - Oct. 2015 */ 
 + 
 +**PCB** 
 + 
 +{{media:xiaomi:xiaomi-4c-pcb.jpg?400}} 
 + 
 +**PCB (Close Up)** 
 + 
 +{{media:xiaomi:xiaomi-4c-pcb-closeup.jpg?400}} 
 + 
 +{{:media:xiaomi:da00d93cd0c3aaa07be5d65f08e37c8152ec95a9_1_.jpeg?400|}} 
 + 
 +===== Flash layout ===== 
 + 
 +==== Stock /proc/mtd ====
 <code> <code>
 dev:    size   erasesize  name dev:    size   erasesize  name
Line 110: Line 104:
 </code> </code>
  
-=== OpenWRT snapshot /proc/mtd ===+==== OpenWrt snapshot /proc/mtd ====
 <code> <code>
 dev:    size   erasesize  name dev:    size   erasesize  name
Line 126: Line 120:
  
  
-===== OpenWRT back to STOCK ==== +===== OpenWrt back to STOCK ==== 
-0. Consider OpenWRT factory reset first+ 
 +0. Consider OpenWrt factory reset first
 <code>firstboot && reboot</code> <code>firstboot && reboot</code>
 1. Download STOCK firmware 1. Download STOCK firmware
Line 139: Line 134:
 4. Router will reboot and after few minutes will boot into stock firmware with IP address 192.168.31.1 4. Router will reboot and after few minutes will boot into stock firmware with IP address 192.168.31.1
  
 +===== Debricking ====
 +Using Mi Wifi Repair tool:
 +[[http://www1.miwifi.com/miwifi_download.html|Mi Wifi download]]
 +[[https://www.dropbox.com/s/bwkc11ntp2t8ryc/How%20to%20use%20MIWIFIRepairToolx86.pdf?dl=0|PDF guide]] (written for R4A gigabit edition) \\
 +[[https://www.virustotal.com/gui/file/436e57a5e2daf1c5b4ece8851a7b7517c1fbc9e69acba8fac3806aa160f251b5/detection|Numerous antivirus tools report Mi Wifi Repair Tool (files date stamped January 2019) identify it as a 'Potentially Unwanted App' Unclear whether there is a genuine threat or it is a 'false positive'.]]
 +\\ 
  
-==== Photos ==== +===== Hardware Mod - USB Port ====
-/* =====>>>>> Standard size for photos: add ?400 to the medialink                                */ +
-/* When uploading photos, **name them** intelligently. Nobody knows what 20100930_000602.jpg is! */ +
-/* e.g. {{:media:yourbrand:yourbrand_yourmodel_front.jpg?400|}}                                  */ +
-/* Thanks, your wiki administration - Oct. 2015 */+
  
-**PCB**+See the photos for break down of where to solder etc. 
 +On picture are shown all soldier points for desired pins with markings. 
 +Also you must connect 15kOhm resistors to ground from D+ and D- lines.
  
-{{media:xiaomi:xiaomi-4c-pcb.jpg?400}}+**Software mod**
  
-**PCB (Close Up)**+Simple hardware mod does not enable USB, you must enable OHCI and AHCI in board description file and compile appropriate firmware. 
 +Board description file is on location <code>/{your openwrt source location}/openwrt/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts</code>
  
-{{media:xiaomi:xiaomi-4c-pcb-closeup.jpg?400}}+In this file change: 
 +<code> 
 +&ehci { 
 + status = "disabled"; 
 +}; 
 +&ohci { 
 + status = "disabled"; 
 +}
 +</code> 
 +to 
 + 
 +<code> 
 +&ehci { 
 +status = "okay"; 
 +}
 +&ohci { 
 +status = "okay"; 
 +}; 
 +</code> 
 + 
 +Enable usb kernel module support in "make menuconfig", compile firmware file and flash it. 
 + 
 +<wrap warning> You can use 5V power supply from router for powering on USB, but take care because its only 1A of current charge if you connect some power hungry USB peripheral it will make router unstable.</wrap>
  
  
Line 158: Line 180:
  
 [[meta:tags|How to add tags]] [[meta:tags|How to add tags]]
-{{tag>MIPS ramips Mediatek MT7628 wlan 802.11abgn 802.11a 802.11bgn fastethernet 16flash 64ram 3port}}+{{tag>ramips MT7628 16flash 64ram 3port fastethernet USBmod wlan 802.11bgn MIPS}}
  • Last modified: 2024/02/12 11:13
  • by 127.0.0.1