Random disconnect the Wireless network on Xiaomi Mi Router 4C

Kernel log

[    0.000000] Linux version 5.4.143 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16279-5cc0535800)) #0 Tue Aug 31 22:20:08 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 Mi Router 4C
[    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] On node 0 totalpages: 16384
[    0.000000]   Normal zone: 144 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    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=0001f1e9
[    0.000000] Readback ErrCtl register=0001f1e9
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 57444K/65536K available (5086K kernel code, 206K rwdata, 636K rodata, 1228K init, 205K bss, 8092K 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 0x805cda28 with crng_init=0
[    0.000000] CPU Clock: 575MHz
[    0.000000] timer_probe: no matching timers found
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6647862422 ns
[    0.000009] sched_clock: 32 bits at 287MHz, resolution 3ns, wraps every 7469508094ns
[    0.007573] Calibrating delay loop... 382.46 BogoMIPS (lpj=764928)
[    0.041438] pid_max: default: 32768 minimum: 301
[    0.046078] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.053102] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.066376] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.075803] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.082458] pinctrl core: initialized pinctrl subsystem
[    0.090448] NET: Registered protocol family 16
[    0.120868] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.134320] clocksource: Switched to clocksource MIPS
[    0.140213] thermal_sys: Registered thermal governor 'step_wise'
[    0.140629] NET: Registered protocol family 2
[    0.150783] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.158670] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.166777] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.174150] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.180950] TCP: Hash tables configured (established 1024 bind 1024)
[    0.187229] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.193556] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.200599] NET: Registered protocol family 1
[    0.204840] PCI: CLS 0 bytes, default 32
[    0.213552] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.227956] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.233597] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.259116] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.269518] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.275222] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.280888] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.286591] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.295541] printk: console [ttyS0] disabled
[    0.299748] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
[    0.308485] printk: console [ttyS0] enabled
[    0.316890] printk: bootconsole [early0] disabled
[    0.327745] spi-mt7621 10000b00.spi: sys_freq: 191666666
[    0.352454] spi-nor spi0.0: w25q128 (16384 Kbytes)
[    0.357412] 7 fixed-partitions partitions found on MTD device spi0.0
[    0.363869] Creating 7 MTD partitions on "spi0.0":
[    0.368753] 0x000000000000-0x000000020000 : "bootloader"
[    0.375291] 0x000000020000-0x000000030000 : "config"
[    0.381475] 0x000000030000-0x000000040000 : "factory"
[    0.387739] 0x000000040000-0x000000050000 : "crash"
[    0.393809] 0x000000050000-0x000000060000 : "cfg_bak"
[    0.400063] 0x000000060000-0x000000160000 : "overlay"
[    0.406429] 0x000000160000-0x000001000000 : "firmware"
[    0.419624] 2 uimage-fw partitions found on MTD device firmware
[    0.425705] Creating 2 MTD partitions on "firmware":
[    0.430773] 0x000000000000-0x0000001e7d0b : "kernel"
[    0.436923] 0x0000001e7d0b-0x000000ea0000 : "rootfs"
[    0.443100] mtd: device 8 (rootfs) set to be root filesystem
[    0.451109] 1 squashfs-split partitions found on MTD device rootfs
[    0.457466] 0x0000004e0000-0x000000ea0000 : "rootfs_data"
[    0.464809] libphy: Fixed MDIO Bus: probed
[    0.481346] rt3050-esw 10110000.esw: link changed 0x00
[    0.488550] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    0.499099] NET: Registered protocol family 10
[    0.508265] Segment Routing with IPv6
[    0.512196] NET: Registered protocol family 17
[    0.516801] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.529964] 8021q: 802.1Q VLAN Support v1.8
[    0.541149] VFS: Mounted root (squashfs filesystem) readonly on device 31:8.
[    0.555398] Freeing unused kernel memory: 1228K
[    0.560030] This architecture does not have kernel memory protection.
[    0.566571] Run /sbin/init as init process
[    1.134343] random: fast init done
[    1.246530] init: Console is alive
[    1.250269] init: - watchdog -
[    2.025726] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.137841] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.155769] init: - preinit -
[    3.292362] random: jshn: uninitialized urandom read (4 bytes read)
[    3.383732] random: jshn: uninitialized urandom read (4 bytes read)
[    3.563765] random: jshn: uninitialized urandom read (4 bytes read)
[    3.939700] rt3050-esw 10110000.esw: link changed 0x00
[    6.986226] rt3050-esw 10110000.esw: link changed 0x02
[    7.590483] rt3050-esw 10110000.esw: link changed 0x12
[    7.918432] rt3050-esw 10110000.esw: link changed 0x16
[    8.410381] jffs2: notice: (455) jffs2_build_xattr_subsystem: complete building xattr subsystem, 25 of xdatum (8 unchecked, 17 orphan) and 27 of xref (17 dead, 0 orphan) found.
[    8.427877] mount_root: switching to jffs2 overlay
[    8.437189] overlayfs: upper fs does not support tmpfile.
[    8.448493] urandom-seed: Seeding with /etc/urandom.seed
[    8.580376] procd: - early -
[    8.583615] procd: - watchdog -
[    9.261542] procd: - watchdog -
[    9.266164] procd: - ubus -
[    9.345793] urandom_read: 3 callbacks suppressed
[    9.345802] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.359812] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.366985] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.376807] procd: - init -
[   10.407264] kmodloader: loading kernel modules from /etc/modules.d/*
[   10.448594] Loading modules backported from Linux version v5.10.42-0-g65859eca4dff
[   10.456377] Backport generated by backports.git v5.10.42-1-0-gbee5c545
[   10.524968] xt_time: kernel timezone is -0000
[   10.646186] mt76_wmac 10300000.wmac: ASIC revision: 76280001
[   10.823318] urngd: v1.0.2 started.
[   11.027267] random: crng init done
[   11.030765] random: 1 urandom warning(s) missed due to ratelimiting
[   11.684691] mt76_wmac 10300000.wmac: Firmware Version: 20151201
[   11.690786] mt76_wmac 10300000.wmac: Build Time: 20151201183641
[   11.730349] mt76_wmac 10300000.wmac: firmware init done
[   11.907010] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   12.017703] PPP generic driver version 2.4.2
[   12.035148] NET: Registered protocol family 24
[   12.070864] kmodloader: done loading kernel modules from /etc/modules.d/*
[   19.435977] rt3050-esw 10110000.esw: link changed 0x00
[   22.732768] rt3050-esw 10110000.esw: link changed 0x02
[   23.051617] rt3050-esw 10110000.esw: link changed 0x12
[   23.363168] rt3050-esw 10110000.esw: link changed 0x16
[   26.555681] br-lan: port 1(eth0.1) entered blocking state
[   26.561264] br-lan: port 1(eth0.1) entered disabled state
[   26.567165] device eth0.1 entered promiscuous mode
[   26.572101] device eth0 entered promiscuous mode
[   26.601844] br-lan: port 1(eth0.1) entered blocking state
[   26.607410] br-lan: port 1(eth0.1) entered forwarding state
[   27.603247] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   31.221351] br-lan: port 2(wlan0) entered blocking state
[   31.226859] br-lan: port 2(wlan0) entered disabled state
[   31.232703] device wlan0 entered promiscuous mode
[   31.357714] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   31.364479] br-lan: port 2(wlan0) entered blocking state
[   31.369935] br-lan: port 2(wlan0) entered forwarding state
[   31.390813] br-lan: port 3(wlan0-1) entered blocking state
[   31.396464] br-lan: port 3(wlan0-1) entered disabled state
[   31.402648] device wlan0-1 entered promiscuous mode
[   31.426183] br-lan: port 3(wlan0-1) entered blocking state
[   31.431833] br-lan: port 3(wlan0-1) entered forwarding state
[   31.618944] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes ready
[ 5699.499388] rt3050-esw 10110000.esw: link changed 0x06
[ 5701.746729] rt3050-esw 10110000.esw: link changed 0x16

Hello

Did you solve the problem. I'm reading some threads which has similar problems
and I don't want to put OpenWRT on my brand new 4C if this problem still persists in V21.02.3

the problem has not changed. everything is also constant, randomly falls wlan. Only reboot helps. Nobody wrote about solving the problem, so now the router is on the shelf. The strange thing is, I have exactly the same router in another place, with exactly the same firmware on 21.02.03, with the same device, and it works flawlessly. No WLAN dumps, 300% fault tolerance. But my router does not give such stability, and I do not understand why.

I'm glad upgrading the firmware worked for you!

Exactly the same problem with my 4C. I've solved it by moving to padavan, as it uses property wifi drivers. You may want either to experiment with https://x-wrt.com/ which is a chinese fork of openwrt or go straight to padavan. If you go ahead with x-wrt, please let me know if this solved you problem, as I preffer openwrt rather than padavan. However I was sooo anoyed that I went straight to the padavan option as I knew it will work.
Regards
Krassi

Same problem my wifi disappeared when there are many users maybe in heavy traffic. X-WRT here, maybe I'll switch here because its drivers support is better than openwrt. Bro, please let me update you if you have a problem? today 2022/12/15

No problem with padavan since almost 1 year.

1 Like

Sir you mean padavan firmware is X-WRT?
Am I right?

no padavan is separate project. Look here: https://4pda.to/forum/index.php?showtopic=979276 and here: https://4pda.to/forum/index.php?showtopic=979276&st=600#entry103774412

1 Like

Is Padavan Firmware also Open Source? Or not?

Yes it is, https://bitbucket.org/padavan/rt-n56u/wiki/EN/HowToMakeFirmware, but probably the best is to ask for it in 4pda forum, as here it is an openwrt forum. Good luck.

1 Like

Hmm okay, but I try X-WRT first because it is a fork of Openwrt

Next week I will try Mi router 4c On X-WRT
I only need to do is sysupgrade
Den I hope it will work.

Finally I Have fix that randomly disconnect wifi on Mi Router 4C. I just did is i blocked TCP,UDP,ICMP GuestWifi to Devices. and I select all users mac address on that wifi guest. just like when you want parental control time on users. and then they can Suft the Internet BUT. All that users i blocked TCP,UDP,ICMP cannot used any of thosed. example they cannot exploit UDP 53 DNS,Denial Of Services.

In 4 Days i did that the Mi Router 4C the wifi no longer disapeared. i used WP2, WPA3,

For Preventing the ARP Spoofing Denial of serives NETCUT ETC. You can Blocked ICMP For wall Interface. this is not affecting the performances of wifi. the Users who used netcut to limit users or blocked from the internet cannot scan all the users in the wifi if ICMP have been blocked.

I Hope I Helped you guys mi router 4c Users

Bro can you explain in detail or make a video? thank you

1 Like

Can u make a sort of guide on how to fix it? I have the same problem here. Also right now are you on the regular openwrt or x-wrt? TIA!

1 Like

It sounds a bit strange, that additional firewall rules seem to correlate to or fix WiFi issues. Could it be that this is just coincidence?

the „random disconnect“ on a MT76 device was triggering me here:
I would try tweaking a few common WiFi parameters, that can often improves things on MT76 WiFis. The default parameters are not really wrong or the real cause of problems and there is no righter parameter, but it can help to test a few variations.

Check out the following post plus its follow up post for 5 sometimes helpful WiFi parameters against random disconnects on MT76:

i cant make a video.
just add it on trafic rules below.
protocol: any
sourcezone:(Your Wifi SSID)
destination zone: device
action: reject
SourceMac: (all my wifi users I put the mac address here)
note: if you do the config above the parental control will not work. but the benifits is any hacker in your wifi can scan open ports but it cannot send any commands on it, the dnsmasq openport 53,80,443 is afe now

and if you want to blocked arp-spoofing, denial of service attack or any attack that used ICMP just add this in trafic rules below.
protocol: ICMP
sourceZone:(Your wifi name or any interface name)
DestinationZone:Devices
Action:Reject
you can blocked icmp, tcp, udp in WAN just copy the config above and replace protocol to ANY
and its work fine.(Only for WAN)
Note: you can blocked all icmp by default in all of your interface example: WAN, GUESTWIFI,Openwrt Wifi etc

Please read my comment in Rexpeto Above

is this issue fixed on 23.05.2...can anyone confirm??