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:56] – 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 | ||
| Line 50: | Line 42: | ||
| 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 | ||
| - | ---- | ||
| - | |||
| -> [[docs: | -> [[docs: | ||
| <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), | As of the time of this edit (2019-06-19), | ||
| </ | </ | ||
| Line 73: | Line 52: | ||
| - Install python3 and and to PATH if not installed. | - Install python3 and and to PATH if not installed. | ||
| - Install requirements: | - Install requirements: | ||
| - | - 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: < | - Execute the exploit: < | ||
| - Enter stok and router' | - Enter stok and router' | ||
| Line 83: | Line 62: | ||
| - Install OpenWrt to OS1: < | - Install OpenWrt to OS1: < | ||
| - It will take couple of minutes and will be restarted to OpenWrt. | - It will take couple of minutes and will be restarted to OpenWrt. | ||
| - | ===== Upgrading OpenWrt ===== | ||
| - | -> [[docs: | ||
| - | |||
| - | <WRAP BOX> | ||
| - | |||
| - | FIXME These are generic instructions. Update with your router' | ||
| - | |||
| - | ==== LuCI Web Upgrade Process ==== | ||
| - | |||
| - | * Browse to ''< | ||
| - | * Upload image file for sysupgrade to LuCI | ||
| - | * Wait for reboot | ||
| - | |||
| - | ==== Terminal Upgrade Process ==== | ||
| - | |||
| - | If you don't have a GUI (LuCI) available, you can alternatively upgrade via the command line. | ||
| - | 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 === | ||
| - | |||
| - | * Login as root via SSH on 192.168.1.1, | ||
| - | |||
| - | < | ||
| - | cd /tmp | ||
| - | wget http:// | ||
| - | sysupgrade / | ||
| - | </ | ||
| - | |||
| - | === mtd === | ||
| - | |||
| - | If '' | ||
| - | |||
| - | * Login as root via SSH on 192.168.1.1, | ||
| - | |||
| - | < | ||
| - | cd /tmp | ||
| - | wget http:// | ||
| - | mtd write / | ||
| - | </ | ||
| - | |||
| - | </ | ||
| - | |||
| - | ===== Debricking ===== | ||
| - | -> [[docs: | ||
| - | |||
| - | ===== 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 | ||
| - | | vlan0 (eth0.0) | ||
| - | | vlan1 (eth0.1) | ||
| - | | wl0 | EXAMPLE WiFi | EXAMPLE Disabled | ||
| - | |||
| - | </ | ||
| - | |||
| - | ==== 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 | | ||
| - | |||
| - | </ | ||
| - | |||
| - | ==== 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 210: | 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> |