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:mir3c [2021/11/05 23:42] – [OEM(?) bootlog] eduardo010174toh:xiaomi:mir3c [2021/11/17 21:44] – [U-Boot Stock Recovery] s.farid
Line 41: Line 41:
 filter  : Model=MiWifi 3C filter  : Model=MiWifi 3C
 ---- ----
 +1. Use OpenWRTInvasion method to gain telnet access.
 +https://github.com/acecilia/OpenWRTInvasion
 +(IP: 192.168.31.1 - Username: root - Password: root)
 +
 +2. Connect to router using telnet.
 +
 +3. Backup all partitions using command:
 +<code>
 +dd if=/dev/mtd0 of=/tmp/mtd0
 +</code>
 +
 +Copy /tmp/mtd0 to computer using ftp.
 +
 +4. Copy openwrt-ramips-mt76x8-xiaomi_miwifi-3c-squashfs-sysupgrade.bin
 +to /tmp in router using ftp.
 +
 +5. İnstall Openwrt to OS1 and free OS2.
 +
 +<code>
 +mtd erase OS1
 +
 +mtd erase OS2
 +
 +mtd -r write /tmp/openwrt-ramips-mt76x8-xiaomi_miwifi-3c-squashfs-sysupgrade.bin OS1
 +</code>
 +
 +Limitations: For the first install the image size needs to be less
 +than 7733248 bits.
  
  
-See [[commit>3c97fb4346d11ab3]] for installation procedure.+Commit page:[[commit>3c97fb4346d11ab3]].
  
  
Line 83: Line 111:
  
 ^ Serial connection parameters\\ for Xiaomi Mi WiFi 3C | 115200, 8N1 | ^ Serial connection parameters\\ for Xiaomi Mi WiFi 3C | 115200, 8N1 |
 +
 +===== Unbrick =====
 +==== U-Boot Stock Recovery ====
 +Recovery mode only works with offical Xiaomi firmware's. Into recovery is checked with RSA if image is signed.
 +
 +  - Download stock firmware: http://bigota.miwifi.com/xiaoqiang/rom/r3l/miwifi_r3l_all_23e37_2.8.51_INT.bin.
 +  - Config static ip on your computer:
 +<code>
 +IP address: 192.168.31.2
 +Subnet mask: 255.255.255.0
 +Default gateway: 192.168.31.1
 +</code>
 +  - Remove power cable from router.
 +  - Connect ethernet cable on Computer and Wan port (Blue Port).
 +  - Press continuously reset button and re-connect power cable. 
 +  - Continue to hold down the Reset button until the front LED colour changes from static orange to blinking orange.
 +  - Open browser and enter http://192.168.31.1
 +  - Select firmware file and click on upload button.
 +  - Wait until router restart (5 minutes).
 +
 +More info and credits: https://visser.io/2018/01/xiaomi-mi-router-3c-recovery-from-system-error-orange-red-led/.
 +
 +==== SPI Programmer ====
 +
 +On step 3 of installation of Openwrt, gets file mtd0 with contains all flash backup.
 +Write this file directly to flash.
  
 ===== Bootlogs ===== ===== Bootlogs =====
Line 499: Line 553:
 </WRAP>\\ </WRAP>\\
  
 +==== Openwrt Log ====
 +
 +<WRAP bootlog>
 +<nowiki>
 +[04050C0A][04050C0C]
 +DDR Calibration DQS reg = 00008887
 +
 +
 +U-Boot 1.1.3 (Sep  6 2018 - 11:44:39)
 +
 +Board: Ralink APSoC DRAM:  64 MB
 +Power on memory test. Memory size= 64 MB...OK!
 +relocate_code Pointer at: 83fa8000
 +RT2880_RSTSTAT_REG 0xc0030000
 +***************************
 +Board power on Occurred
 +***************************
 +flash manufacture id: c8, device id 40 18
 +find flash: GD25Q128C
 +env is right!
 +============================================ 
 +Ralink UBoot Version: 4.3.0.0
 +-------------------------------------------- 
 +ASIC 7628_MP (Port5<->None)
 +DRAM component: 512 Mbits DDR, width 16
 +DRAM bus: 16 bit
 +Total memory: 64 MBytes
 +Flash component: SPI Flash
 +Date:Sep  6 2018  Time:11:44:39
 +============================================ 
 +icache: sets:512, ways:4, linesz:32 ,total:65536
 +dcache: sets:256, ways:4, linesz:32 ,total:32768 
 +
 + ##### The CPU freq = 575 MHZ #### 
 + estimate memory size =64 Mbytes
 +RESET MT7628 PHY!!!!!!
 +Please choose the operation: 
 +   1: Load system code to SDRAM via TFTP. 
 +   2: Load system code then write to Flash via TFTP. 
 +   3: Boot system code via Flash (default).
 +   4: Entr boot command line interface.
 +   5: Load system2 code then write to Flash via TFTP. 
 +   7: Load system code via web. 
 +   9: Load Boot Loader code then write to Flash via TFTP. 
 + 
 +   n3: System Boot system code via Flash.
 +Booting System 1
 +Erasing SPI Flash...
 +raspi_erase: offs:30000 len:10000
 +.
 +Writing to SPI Flash...
 +.
 +done
 +## Booting image at bc140000 ...
 +   Image Name:   MIPS OpenWrt Linux-5.4.155
 +   Image Type:   MIPS Linux Kernel Image (lzma compressed)
 +   Data Size:    2145791 Bytes =  2 MB
 +   Load Address: 80000000
 +   Entry Point:  80000000
 +   Verifying Checksum ... OK
 +   Uncompressing Kernel Image ... OK
 +commandline uart_en=1 factory_mode=0 mem=64m root=/dev/mtdblock9
 +No initrd
 +## Transferring control to Linux (at address 80000000) ...
 +## Giving linux memsize in MB, 64
 +
 +Starting kernel ...
 +
 +[    0.000000] Linux version 5.4.155 (builder@buildhost) (gcc version 11.2.0 (OpenWrt GCC 11.2.0 r18014-15e55a2190)) #0 Sat Nov 6 05:18:48 2021
 +[    0.000000] Board has DDR2
 +[    0.000000] Analog PMU set to hw control
 +[    0.000000] Digital PMU set to hw control
 +[    0.000000] SoC Type: MediaTek MT7628AN ver:1 eco:2
 +[    0.000000] printk: bootconsole [early0] enabled
 +[    0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
 +[    0.000000] MIPS: machine is Xiaomi MiWiFi 3C
 +[    0.000000] Initrd not found or empty - disabling initrd
 +[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
 +[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
 +[    0.000000] Zone ranges:
 +[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
 +[    0.000000] Movable zone start for each node
 +[    0.000000] Early memory node ranges
 +[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
 +[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
 +[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
 +[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
 +[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
 +[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
 +[    0.000000] Writing ErrCtl register=00057ff9
 +[    0.000000] Readback ErrCtl register=00057ff9
 +[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
 +[    0.000000] Memory: 56932K/65536K available (5164K kernel code, 201K rwdata, 1100K rodata, 1204K init, 205K bss, 8604K reserved, 0K cma-reserved)
 +[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
 +[    0.000000] NR_IRQS: 256
 +[    0.000000] intc: using register map from devicetree
 +[    0.000000] random: get_random_bytes called from start_kernel+0x354/0x548 with crng_init=0
 +[    0.000000] CPU Clock: 580MHz
 +[    0.000000] timer_probe: no matching timers found
 +[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
 +[    0.000009] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
 +[    0.007569] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
 +[    0.073494] pid_max: default: 32768 minimum: 301
 +[    0.078119] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
 +[    0.085137] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
 +[    0.098318] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
 +[    0.107820] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
 +[    0.114459] pinctrl core: initialized pinctrl subsystem
 +[    0.122397] NET: Registered protocol family 16
 +[    0.156468] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
 +[    0.169652] clocksource: Switched to clocksource MIPS
 +[    0.175498] thermal_sys: Registered thermal governor 'step_wise'
 +[    0.175962] NET: Registered protocol family 2
 +[    0.186084] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
 +[    0.193868] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
 +[    0.201979] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
 +[    0.209330] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
 +[    0.216152] TCP: Hash tables configured (established 1024 bind 1024)
 +[    0.222419] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
 +[    0.228691] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
 +[    0.235775] NET: Registered protocol family 1
 +[    0.240018] PCI: CLS 0 bytes, default 32
 +[    0.248559] workingset: timestamp_bits=14 max_order=14 bucket_order=0
 +[    0.262677] squashfs: version 4.0 (2009/01/31) Phillip Lougher
 +[    0.268252] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
 +[    0.293111] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
 +[    0.303509] mt7621_gpio 10000600.gpio: registering 32 gpios
 +[    0.309098] mt7621_gpio 10000600.gpio: registering 32 gpios
 +[    0.314755] mt7621_gpio 10000600.gpio: registering 32 gpios
 +[    0.320420] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
 +[    0.329111] printk: console [ttyS0] disabled
 +[    0.333308] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
 +[    0.342028] printk: console [ttyS0] enabled
 +[    0.342028] printk: console [ttyS0] enabled
 +[    0.350442] printk: bootconsole [early0] disabled
 +[    0.350442] printk: bootconsole [early0] disabled
 +[    0.361272] spi-mt7621 10000b00.spi: sys_freq: 193333333
 +[    0.377728] spi-nor spi0.0: gd25q128 (16384 Kbytes)
 +[    0.382810] 8 fixed-partitions partitions found on MTD device spi0.0
 +[    0.389248] Creating 8 MTD partitions on "spi0.0":
 +[    0.394142] 0x000000000000-0x000000030000 : "Bootloader"
 +[    0.400650] 0x000000030000-0x000000040000 : "Config"
 +[    0.406655] 0x000000040000-0x000000050000 : "Bdata"
 +[    0.412727] 0x000000050000-0x000000060000 : "factory"
 +[    0.418862] 0x000000060000-0x000000070000 : "crash"
 +[    0.424896] 0x000000070000-0x000000080000 : "cfg_bak"
 +[    0.431151] 0x000000080000-0x000000140000 : "overlay"
 +[    0.437279] 0x000000140000-0x000001000000 : "firmware"
 +[    0.451083] 2 uimage-fw partitions found on MTD device firmware
 +[    0.457094] Creating 2 MTD partitions on "firmware":
 +[    0.462201] 0x000000000000-0x00000020be3f : "kernel"
 +[    0.468283] 0x00000020be3f-0x000000ec0000 : "rootfs"
 +[    0.474402] mtd: device 9 (rootfs) set to be root filesystem
 +[    0.482303] 1 squashfs-split partitions found on MTD device rootfs
 +[    0.488594] 0x0000004c0000-0x000000ec0000 : "rootfs_data"
 +[    0.495912] libphy: Fixed MDIO Bus: probed
 +[    0.538220] rt3050-esw 10110000.esw: mediatek esw at 0xb0110000, irq 25 initialized
 +[    0.546828] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
 +[    0.557234] NET: Registered protocol family 10
 +[    0.566108] Segment Routing with IPv6
 +[    0.570021] NET: Registered protocol family 17
 +[    0.574590] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
 +[    0.587754] 8021q: 802.1Q VLAN Support v1.8
 +[    0.598251] VFS: Mounted root (squashfs filesystem) readonly on device 31:9.
 +[    0.612257] Freeing unused kernel memory: 1204K
 +[    0.616850] This architecture does not have kernel memory protection.
 +[    0.623408] Run /sbin/init as init process
 +[    1.298370] init: Console is alive
 +[    1.302501] init: - watchdog -
 +[    2.161888] kmodloader: loading kernel modules from /etc/modules-boot.d/*
 +[    2.239664] random: fast init done
 +[    2.318149] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
 +[    2.336152] init: - preinit -
 +[    3.435443] random: jshn: uninitialized urandom read (4 bytes read)
 +[    3.543589] random: jshn: uninitialized urandom read (4 bytes read)
 +[    3.686252] random: jshn: uninitialized urandom read (4 bytes read)
 +Press the [f] key and hit [enter] to enter failsafe mode
 +Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
 +[    7.937994] rt3050-esw 10110000.esw: port 0 link up
 +[    7.943018] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
 +[    7.949970] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
 +[    8.613426] jffs2: notice: (463) jffs2_build_xattr_subsystem: complete building xattr subsystem, 6 of xdatum (0 unchecked, 1 orphan) and 7 of xref (1 dead, 0 orphan) found.
 +[    8.631098] mount_root: switching to jffs2 overlay
 +[    8.638872] overlayfs: upper fs does not support tmpfile.
 +[    8.650243] urandom-seed: Seeding with /etc/urandom.seed
 +[    8.722891] rt3050-esw 10110000.esw: port 4 link up
 +[    8.806715] procd: - early -
 +[    8.810485] procd: - watchdog -
 +[    9.581379] procd: - watchdog -
 +[    9.585253] procd: - ubus -
 +[    9.621658] urandom_read: 3 callbacks suppressed
 +[    9.621667] random: ubusd: uninitialized urandom read (4 bytes read)
 +[    9.640475] random: ubusd: uninitialized urandom read (4 bytes read)
 +[    9.647610] random: ubusd: uninitialized urandom read (4 bytes read)
 +[    9.660144] procd: - init -
 +Please press Enter to activate this console.
 +[   10.631316] kmodloader: loading kernel modules from /etc/modules.d/*
 +[   10.935485] Loading modules backported from Linux version v5.15-rc6-0-g519d81956ee2
 +[   10.943336] Backport generated by backports.git v5.15-rc6-1-0-gd44432d6
 +[   11.020245] xt_time: kernel timezone is -0000
 +[   11.153318] mt76_wmac 10300000.wmac: ASIC revision: 76280001
 +[   11.312763] urngd: v1.0.2 started.
 +[   11.575013] random: crng init done
 +[   11.578477] random: 1 urandom warning(s) missed due to ratelimiting
 +[   12.191751] mt76_wmac 10300000.wmac: Firmware Version: 20151201
 +[   12.197770] mt76_wmac 10300000.wmac: Build Time: 20151201183641
 +[   12.239664] mt76_wmac 10300000.wmac: firmware init done
 +[   12.532975] PPP generic driver version 2.4.2
 +[   12.551259] NET: Registered protocol family 24
 +[   12.603012] kmodloader: done loading kernel modules from /etc/modules.d/*
 +[   19.938169] rt3050-esw 10110000.esw: port 0 link down
 +[   19.943307] rt3050-esw 10110000.esw: port 4 link down
 +[   23.826585] rt3050-esw 10110000.esw: port 0 link up
 +[   24.506522] rt3050-esw 10110000.esw: port 4 link up
 +[   25.736556] br-lan: port 1(eth0.2) entered blocking state
 +[   25.742134] br-lan: port 1(eth0.2) entered disabled state
 +[   25.747987] device eth0.2 entered promiscuous mode
 +[   25.753052] device eth0 entered promiscuous mode
 +[   25.785999] br-lan: port 1(eth0.2) entered blocking state
 +[   25.791554] br-lan: port 1(eth0.2) entered forwarding state
 +[   26.740178] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
 +</nowiki>
 +</WRAP>\\
  
 ===== Software Mods ===== ===== Software Mods =====
Line 527: Line 804:
 djStolen: Unfortunatelly, even though following these instructions, my device got bricked, therefore I recommend thinking twice before doing it. I am currently working on U-Boot for this device. djStolen: Unfortunatelly, even though following these instructions, my device got bricked, therefore I recommend thinking twice before doing it. I am currently working on U-Boot for this device.
  
-==== Dump SPI Flash ==== 
-Alternatively to installing OpenWRT via SSH you can also use a programmer. 
- 
- 
-{{https://farm1.staticflickr.com/961/42050976771_71e4b6519a_z_d.jpg?400|CH341A}} 
  
 ===== Tags ===== ===== Tags =====
 [[meta:tags|How to add tags]] [[meta:tags|How to add tags]]
 {{tag>ramips MT7628 16flash 64ram 3port fastethernet 802.11bgn dual_firmware}} {{tag>ramips MT7628 16flash 64ram 3port fastethernet 802.11bgn dual_firmware}}
  • Last modified: 2024/07/11 20:36
  • by s.farid