Hi Forum!
I run OpenWrt 22.03.3 r20028-43d71ad93e at Xiaomi Mi Router 4A (100M International Edition) with the following configuration:
- MediaTek MT76x2E 802.11acn 5 GHz as Client to another WiFi AP for WAN,
- MediaTek MT76x8 802.11bgn 2.4 GHz as Master (AP) with DHCP for LAN.
The problem is that Master (AP) hangs randomly during different periods with no any of TCP/IP and even ARP connectivity while WiFi AP connection itself is being kept established, although ethernet LAN and WAN via Client WiFi keep working.
Changing different parameters of Master (AP) didn't help.
I've ended up with the following script running from boot:
#!/bin/sh
while : ; do
hosts=`ip neigh show dev br-lan | awk '{ print $1; }'`
count_hosts=`echo $hosts | wc -w`
count_error=0
for host in $hosts ; do
if arping -c 3 $host | grep -m 1 reply &> /dev/null ; then
break
fi
count_error=`expr $count_error + 1`
done
if [ $count_error == $count_hosts ] ; then
ifconfig wlan0 down
ip link set arp off dev br-lan
ifconfig wlan0 up
ip link set arp on dev br-lan
date >> /tmp/interface_restart.log
sleep 10
fi
sleep 2
done
What it does: checks all of connected clients to its br-lan (there are no any connected via ethernet regularly) and if there are no ARP answers it brings interface up and down with ARP table flushing.
It hangs clients' WiFi connections for 1-2 seconds but doesn't even lead to reconnections, however I'd like to fix it if it's possible.
Please let me know if any faced same issue.
P.S.: here is part of my interface_restart.log:
root@ximi:~# tail /tmp/interface_restart.log
Wed Mar 29 11:09:13 CEST 2023
Wed Mar 29 11:09:28 CEST 2023
Wed Mar 29 11:09:43 CEST 2023
Wed Mar 29 11:09:59 CEST 2023
Wed Mar 29 11:10:14 CEST 2023
Wed Mar 29 11:10:49 CEST 2023
Wed Mar 29 11:11:24 CEST 2023
Wed Mar 29 12:04:22 CEST 2023
Wed Mar 29 12:43:20 CEST 2023
Wed Mar 29 12:51:42 CEST 2023
root@ximi:~# date
Wed Mar 29 15:52:33 CEST 2023