Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| toh:xiaomi:xiaomi_mi_router_4c [2020/11/27 22:32] – [Supported Versions] mactavishao | toh:xiaomi:xiaomi_mi_router_4c [2023/02/03 13:21] – [Tags] fix tags danitool | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| /* DO NOT CREATE NEW DEVICEPAGES VIA COPY & PASTE! */ | /* DO NOT CREATE NEW DEVICEPAGES VIA COPY & PASTE! */ | ||
| /* USE https:// | /* USE https:// | ||
| + | |||
| + | |||
| + | <WRAP important 100%> | ||
| + | |||
| /*****/ | /*****/ | ||
| Line 10: | Line 14: | ||
| {{ : | {{ : | ||
| + | |||
| ===== Supported Versions ===== | ===== Supported Versions ===== | ||
| Line 19: | Line 24: | ||
| ---- | ---- | ||
| - | ===== Experimental Versions ===== | ||
| - | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | ||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ | ||
| - | |||
| - | //None at this time.// | ||
| ===== Hardware Highlights ===== | ===== Hardware Highlights ===== | ||
| Line 35: | Line 31: | ||
| header | header | ||
| align : c, | align : c, | ||
| - | filter | ||
| filter | filter | ||
| - | filter | ||
| ---- | ---- | ||
| ===== 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 | ||
| headers : Model, Version, Current Release, Firmware OpenWrt Install, Firmware OpenWrt Upgrade, Firmware OEM Stock | headers : Model, Version, Current Release, Firmware OpenWrt Install, Firmware OpenWrt Upgrade, Firmware OEM Stock | ||
| align : c,c,c | align : c,c,c | ||
| - | filter | ||
| filter | filter | ||
| - | filter | ||
| ---- | ---- | ||
| - | */ | ||
| - | |||
| - | |||
| - | /* 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 | ||
| - | filter | ||
| - | filter | ||
| - | ---- | ||
| - | |||
| -> [[docs: | -> [[docs: | ||
| - | FIXME Please add the installation procedure here. | + | < |
| - | + | 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. | |
| - | ==== Flash Layout ==== | + | |
| - | < | + | |
| - | FIXME // | + | |
| - | + | ||
| - | Please check out the article [[docs: | + | |
| </ | </ | ||
| - | ==== OEM easy installation ==== | + | - Download or clone [[https://github.com/acecilia/OpenWRTInvasion|OpenWRTInvasion]] |
| - | + | | |
| - | <WRAP BOX> | + | |
| - | FIXME //The instructions below are for Broadcom devices and only serve as an example.//\\ | + | |
| - | **//Remove / modify them if they do not apply to this particular device!// | + | - Execute the exploit: <code>python3 remote_command_execution_vulnerability.py</code> |
| - | + | - Enter stok and router' | |
| - | This section deals with | + | |
| - | | + | |
| - | * The steps required such as reset to factory defaults | + | |
| - | + | - Copy OpenWrt download link. | |
| - | **Note:** Reset router to factory defaults if it has been previously configured. | + | |
| - | | + | - Install OpenWrt to OS1: <code>mtd -r write /tmp/openwrt.bin OS1</code> |
| - | | + | - It will take couple of minutes |
| - | * Wait for it to reboot | + | |
| - | * Telnet to 192.168.1.1 | + | |
| - | </ | + | |
| - | + | ||
| - | ==== OEM installation using the TFTP method ==== | + | |
| - | + | ||
| - | -> [[docs: | + | |
| - | + | ||
| - | === Specific values needed for tftp === | + | |
| - | + | ||
| - | <WRAP BOX> | + | |
| - | + | ||
| - | FIXME Enter values for " | + | |
| - | + | ||
| - | ^ Bootloader tftp server IPv4 address | + | |
| - | ^ Bootloader MAC address (special) | + | |
| - | ^ Firmware tftp image | [[: | + | |
| - | ^ TFTP transfer window | + | |
| - | ^ TFTP window start | approximately FILL-IN seconds after power on | | + | |
| - | ^ TFTP client required IP address | + | |
| - | + | ||
| - | </WRAP> | + | |
| - | + | ||
| - | ===== Upgrading OpenWrt ===== | + | |
| - | -> [[docs: | + | |
| - | + | ||
| - | <WRAP BOX> | + | |
| - | + | ||
| - | FIXME These are generic instructions. Update with your router' | + | |
| - | + | ||
| - | ==== LuCI Web Upgrade Process ==== | + | |
| - | + | ||
| - | | + | |
| - | | + | |
| - | * Wait for reboot | + | |
| - | + | ||
| - | ==== Terminal Upgrade Process ==== | + | |
| - | + | ||
| - | If you don't have a GUI (LuCI) available, you can alternatively upgrade | + | |
| - | There are two command line methods for upgrading: | + | |
| - | + | ||
| - | * '' | + | |
| - | * '' | + | |
| - | + | ||
| - | Note: It is important that you put the firmware image into the ramdisk (/tmp) before you start flashing. | + | |
| - | + | ||
| - | === sysupgrade === | + | |
| - | + | ||
| - | | + | |
| - | + | ||
| - | < | + | |
| - | cd /tmp | + | |
| - | wget http:// | + | |
| - | sysupgrade / | + | |
| - | </ | + | |
| - | + | ||
| - | === mtd === | + | |
| - | + | ||
| - | If '' | + | |
| - | + | ||
| - | | + | |
| - | + | ||
| - | < | + | |
| - | cd /tmp | + | |
| - | wget http:// | + | |
| - | mtd write / | + | |
| - | </code> | + | |
| - | + | ||
| - | </WRAP> | + | |
| - | + | ||
| - | ===== Debricking ===== | + | |
| - | -> [[docs:guide-user: | + | |
| - | + | ||
| - | ===== Failsafe mode ===== | + | |
| - | -> [[docs: | + | |
| - | + | ||
| - | ===== Basic configuration ===== | + | |
| - | -> [[docs: | + | |
| - | Set up your Internet connection, configure wireless, configure USB port, etc. | + | |
| - | + | ||
| - | ===== Specific Configuration ===== | + | |
| - | + | ||
| - | <WRAP BOX> | + | |
| - | FIXME Please fill in real values for this device, then remove the EXAMPLEs | + | |
| - | + | ||
| - | ==== Network interfaces ==== | + | |
| - | The default network configuration is: | + | |
| - | ^ Interface Name ^ Description | + | |
| - | | br-lan | EXAMPLE LAN & WiFi | EXAMPLE 192.168.1.1/24 | | + | |
| - | | vlan0 (eth0.0) | + | |
| - | | vlan1 (eth0.1) | + | |
| - | | wl0 | EXAMPLE WiFi | EXAMPLE Disabled | + | |
| - | + | ||
| - | </WRAP> | + | |
| - | + | ||
| - | ==== Switch Ports (for VLANs) ==== | + | |
| - | <WRAP BOX> | + | |
| - | FIXME Please fill in real values for this device, then remove the EXAMPLEs | + | |
| - | + | ||
| - | Numbers 0-3 are Ports 1-4 as labeled on the unit, number 4 is the Internet (WAN) on the unit, 5 is the internal connection to the router itself. Don't be fooled: Port 1 on the unit is number 3 when configuring VLANs. vlan0 = eth0.0, vlan1 = eth0.1 and so on. | + | |
| - | ^ Port ^ Switch port ^ | + | |
| - | | Internet (WAN) | EXAMPLE 4 | | + | |
| - | | LAN 1 | EXAMPLE 3 | | + | |
| - | | LAN 2 | EXAMPLE 2 | | + | |
| - | | LAN 3 | EXAMPLE 1 | | + | |
| - | | LAN 4 | EXAMPLE 0 | | + | |
| - | + | ||
| - | </WRAP> | + | |
| - | + | ||
| - | ==== Buttons ==== | + | |
| - | -> [[docs: | + | |
| - | Here, we merely name the buttons, so we can use them in the above Howto. | + | |
| - | + | ||
| - | <WRAP BOX> | + | |
| - | FIXME Please fill in real values for this device, then remove the EXAMPLEs | + | |
| - | + | ||
| - | The Xiaomi Mi Router 4C has the following buttons: | + | |
| - | + | ||
| - | ^ BUTTON | + | |
| - | | EXAMPLE Reset | reset | | + | |
| - | | EXAMPLE Secure Easy Setup | | + | |
| - | | EXAMPLE No buttons at all. | + | |
| - | + | ||
| - | </ | + | |
| ===== Hardware ===== | ===== Hardware ===== | ||
| ==== Info ==== | ==== Info ==== | ||
| - | <WRAP BOX> | ||
| - | FIXME | ||
| - | - This table is automatically generated, **once the correct filters for Brand and Model are set.** | ||
| - | - If you see " | ||
| - | - If you still don't see a table here, or a table filled with ' | ||
| - | - If you see a table with the desired device data, everything is OK and you can delete this text and the ''< | ||
| - | - If it still doesn' | ||
| - | </ | ||
| - | |||
| ---- datatemplatelist dttpllist ---- | ---- datatemplatelist dttpllist ---- | ||
| template: meta: | template: meta: | ||
| cols : Brand, Model, Versions, Device Type, Availability, | cols : Brand, Model, Versions, Device Type, Availability, | ||
| - | filter | ||
| filter | filter | ||
| - | filter | ||
| ---- | ---- | ||
| Line 241: | Line 77: | ||
| /* Thanks, your wiki administration - Oct. 2015 */ | /* Thanks, your wiki administration - Oct. 2015 */ | ||
| - | // | + | **PCB** |
| - | **Insert photo of front of the casing** | + | |
| - | //Back://\\ | + | {{media:xiaomi: |
| - | **Insert photo of back of the casing** | + | |
| - | //Backside label:// | + | **PCB (Close Up)** |
| - | **Insert photo of backside label** | + | |
| - | ==== Opening the case ==== | + | {{media: |
| - | **Note:** This will void your warranty! | + | {{:media: |
| - | <WRAP BOX> | + | ===== Flash layout ===== |
| - | FIXME //Describe what needs to be done to open the device, e.g. remove rubber feet, adhesive labels, screws, ...// | + | |
| - | * To remove the cover and open the device, do a/b/c | + | |
| - | </ | + | |
| - | //Main PCB://\\ | + | ==== Stock /proc/mtd ==== |
| - | **Insert photo of PCB** | + | < |
| + | dev: | ||
| + | mtd0: 01000000 00010000 " | ||
| + | mtd1: 00020000 00010000 " | ||
| + | mtd2: 00010000 00010000 " | ||
| + | mtd3: 00010000 00010000 " | ||
| + | mtd4: 00010000 00010000 " | ||
| + | mtd5: 00010000 00010000 " | ||
| + | mtd6: 00100000 00010000 " | ||
| + | mtd7: 00c60000 00010000 " | ||
| + | mtd8: 00af0000 00010000 " | ||
| + | mtd9: 00200000 00010000 " | ||
| + | </ | ||
| - | ==== Serial | + | ==== OpenWrt snapshot / |
| - | -> [[docs:techref:hardware:port.serial]] general information about the serial port, serial port cable, etc. | + | <code> |
| + | dev: | ||
| + | mtd0: 00020000 00010000 " | ||
| + | mtd1: 00010000 00010000 " | ||
| + | mtd2: 00010000 00010000 " | ||
| + | mtd3: 00010000 00010000 " | ||
| + | mtd4: 00010000 00010000 " | ||
| + | mtd5: 00100000 00010000 " | ||
| + | mtd6: 00ea0000 00010000 " | ||
| + | mtd7: 002052ab 00010000 " | ||
| + | mtd8: 00c9ad55 00010000 " | ||
| + | mtd9: 00a10000 00010000 " | ||
| + | </ | ||
| - | How to connect to the Serial Port of this specific device:\\ | ||
| - | **Insert photo of PCB with markings for serial port** | ||
| - | <WRAP BOX> | + | ===== OpenWrt back to STOCK ==== |
| - | FIXME //Replace EXAMPLE by real values.// | + | |
| - | </ | + | |
| - | ^ Serial connection parameters\\ for Xiaomi Mi Router 4C @@Version@@ | + | 0. Consider OpenWrt factory reset first |
| + | < | ||
| + | 1. Download STOCK firmware | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | 2. Copy to router | ||
| + | < | ||
| + | 3. Write to " | ||
| + | < | ||
| + | 4. Router will reboot and after few minutes will boot into stock firmware with IP address 192.168.31.1 | ||
| - | ==== JTAG ==== | + | ===== Debricking |
| - | -> [[docs:techref:hardware: | + | Using Mi Wifi Repair tool: |
| + | [[http:// | ||
| + | [[https://www.dropbox.com/ | ||
| + | [[https:// | ||
| + | \\ | ||
| - | How to connect to the JTAG Port of this specific device:\\ | + | ===== Hardware Mod - USB Port ==== |
| - | **Insert photo of PCB with markings for JTAG port** | + | |
| - | ===== Bootloader mods ===== | + | See the photos for break down of where to solder etc. |
| - | -> [[docs: | + | 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. | ||
| - | ===== Hardware mods ===== | + | **Software mod** |
| - | None so far. | + | 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 < | ||
| + | In this file change: | ||
| + | < | ||
| + | &ehci { | ||
| + | status = " | ||
| + | }; | ||
| + | &ohci { | ||
| + | status = " | ||
| + | }; | ||
| + | </ | ||
| + | to | ||
| - | ===== Bootlogs ===== | + | < |
| - | ==== OEM bootlog ==== | + | &ehci { |
| - | <WRAP bootlog> | + | status |
| - | < | + | }; |
| - | </WRAP>\\ | + | &ohci { |
| + | status | ||
| + | }; | ||
| + | </code> | ||
| - | ==== OpenWrt bootlog ==== | + | Enable usb kernel module support in "make menuconfig", |
| - | <WRAP bootlog> | + | |
| - | < | + | |
| - | </ | + | |
| - | ===== Notes ===== | + | <wrap warning> You can use 5V power supply from router |
| - | // | + | |
| - | * ... | ||
| ===== Tags ===== | ===== Tags ===== | ||
| [[meta: | [[meta: | ||
| - | {{tag> | + | {{tag> |