My devices loop and keep trying to connect to wifi without success

Hi,
I have latest openwrt fw on ASUS RT-AC58U , OpenWrt 21.02.1 r16325-88151b8303
This issue of my android devices 3-4 of them(with different make and ROMs stock/custom ROMs)
have started exhibiting this behaviour of trying to connect to wifi but then immediately disconnecting.

This issue used to happen seldomly before, but since 2-3 days it has been so annoying that the devices remain disconnected almost the whole day. My other computers work/home pcs do make a connection just fine, but although being connected, do show some network interrupts like websites not loading. But this is still manageable.

But the android devices are a real pain..
I have tried changing the channels after looking up through some wifi analyzer apps, which only helps to solve the issue very shortly before the same wifi connecting then disconnecting loop reappears.
Please check this video for the description how the wifi behaves.

Is there any way i can debug what exactly is going on with my wifi ?

Here is my wifi configuration:

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11g'
	option path 'platform/soc/a000000.wifi'
	option htmode 'HT20'
	option cell_density '0'
	option channel 'auto'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'ASUS58U'
	option encryption 'psk2'
	option key '<REDACTED>'
	option ieee80211r '1'
	option ft_over_ds '1'
	option ft_psk_generate_local '1'

config wifi-device 'radio1'
	option type 'mac80211'
	option hwmode '11a'
	option path 'platform/soc/a800000.wifi'
	option cell_density '0'
	option htmode 'VHT20'
	option channel 'auto'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'ASUS58U5G'
	option encryption 'psk2'
	option key '<REDACTED>'
	option ieee80211r '1'
	option ft_over_ds '1'
	option ft_psk_generate_local '1'

config wifi-iface 'wifinet2'
	option device 'radio1'
	option mode 'ap'
	option network 'lan'
	option encryption 'sae-mixed'
	option key '<REDACTED>'
	option ieee80211w '1'
	option ssid 'OpenWrt5G'

config wifi-iface 'wifinet3'
	option device 'radio0'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'sae-mixed'
	option key '<REDACTED>'
	option ieee80211w '1'
	option network 'lan'

Try using WPA2 instead of WPA3. See if that fixes the issue.
Also, 802.11r is not supported by all client devices.

1 Like

The wpa3 AP is just recently added for testing with different channel settings to see if it makes a difference.
This was added only because I was facing the issue with the default wpa2 APs which had been working just fine before this issue started appearing.

Have you checked system / kernel logs at the time when it happens?

What has changed?

1 Like

Nothing related i remember of. No router configuration changes nothing.
I only updated the router fw to latest 21.02.1 available(from 21.02).. just to be sure. But the update didnt change a thing for the issue i am facing.

logread dump during the issue:

Thu Jan 27 16:46:21 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: authenticated
Thu Jan 27 16:46:21 2022 daemon.notice hostapd: wlan1: STA-OPMODE-N_SS-CHANGED e6:80:5e:21:62:57 2
Thu Jan 27 16:46:21 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: associated (aid 4)
Thu Jan 27 16:46:21 2022 daemon.notice hostapd: wlan1: AP-STA-CONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:21 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 WPA: pairwise key handshake completed (RSN)
Thu Jan 27 16:46:21 2022 daemon.info dnsmasq-dhcp[2366]: DHCPREQUEST(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:21 2022 daemon.info dnsmasq-dhcp[2366]: DHCPACK(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:24 2022 daemon.notice hostapd: wlan1: AP-STA-DISCONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:25 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: authenticated
Thu Jan 27 16:46:25 2022 daemon.notice hostapd: wlan1: STA-OPMODE-N_SS-CHANGED e6:80:5e:21:62:57 2
Thu Jan 27 16:46:25 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: associated (aid 4)
Thu Jan 27 16:46:25 2022 daemon.notice hostapd: wlan1: AP-STA-CONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:25 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 WPA: pairwise key handshake completed (RSN)
Thu Jan 27 16:46:25 2022 daemon.info dnsmasq-dhcp[2366]: DHCPREQUEST(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:25 2022 daemon.info dnsmasq-dhcp[2366]: DHCPACK(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:28 2022 daemon.notice hostapd: wlan1: AP-STA-DISCONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:30 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: authenticated
Thu Jan 27 16:46:30 2022 daemon.notice hostapd: wlan1: STA-OPMODE-N_SS-CHANGED e6:80:5e:21:62:57 2
Thu Jan 27 16:46:30 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: associated (aid 4)
Thu Jan 27 16:46:30 2022 daemon.notice hostapd: wlan1: AP-STA-CONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:30 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 WPA: pairwise key handshake completed (RSN)
Thu Jan 27 16:46:30 2022 daemon.info dnsmasq-dhcp[2366]: DHCPREQUEST(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:30 2022 daemon.info dnsmasq-dhcp[2366]: DHCPACK(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:32 2022 daemon.notice hostapd: wlan1: AP-STA-DISCONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:34 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: authenticated
Thu Jan 27 16:46:34 2022 daemon.notice hostapd: wlan1: STA-OPMODE-N_SS-CHANGED e6:80:5e:21:62:57 2
Thu Jan 27 16:46:34 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: associated (aid 4)
Thu Jan 27 16:46:34 2022 daemon.notice hostapd: wlan1: AP-STA-CONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:34 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 WPA: pairwise key handshake completed (RSN)
Thu Jan 27 16:46:34 2022 daemon.info dnsmasq-dhcp[2366]: DHCPREQUEST(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:34 2022 daemon.info dnsmasq-dhcp[2366]: DHCPACK(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:37 2022 daemon.notice hostapd: wlan1: AP-STA-DISCONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:38 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: authenticated
Thu Jan 27 16:46:38 2022 daemon.notice hostapd: wlan1: STA-OPMODE-N_SS-CHANGED e6:80:5e:21:62:57 2
Thu Jan 27 16:46:38 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: associated (aid 4)
Thu Jan 27 16:46:38 2022 daemon.notice hostapd: wlan1: AP-STA-CONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:38 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 WPA: pairwise key handshake completed (RSN)
Thu Jan 27 16:46:39 2022 daemon.info dnsmasq-dhcp[2366]: DHCPREQUEST(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:39 2022 daemon.info dnsmasq-dhcp[2366]: DHCPACK(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:41 2022 daemon.notice hostapd: wlan1: AP-STA-DISCONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:43 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: authenticated
Thu Jan 27 16:46:43 2022 daemon.notice hostapd: wlan1: STA-OPMODE-N_SS-CHANGED e6:80:5e:21:62:57 2
Thu Jan 27 16:46:43 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: associated (aid 4)
Thu Jan 27 16:46:44 2022 daemon.notice hostapd: wlan1: AP-STA-CONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:44 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 WPA: pairwise key handshake completed (RSN)
Thu Jan 27 16:46:44 2022 daemon.info dnsmasq-dhcp[2366]: DHCPREQUEST(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:44 2022 daemon.info dnsmasq-dhcp[2366]: DHCPACK(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:47 2022 daemon.notice hostapd: wlan1: AP-STA-DISCONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:48 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: authenticated
Thu Jan 27 16:46:48 2022 daemon.notice hostapd: wlan1: STA-OPMODE-N_SS-CHANGED e6:80:5e:21:62:57 2
Thu Jan 27 16:46:48 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: associated (aid 4)
Thu Jan 27 16:46:48 2022 daemon.notice hostapd: wlan1: AP-STA-CONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:48 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 WPA: pairwise key handshake completed (RSN)
Thu Jan 27 16:46:48 2022 daemon.info dnsmasq-dhcp[2366]: DHCPREQUEST(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:48 2022 daemon.info dnsmasq-dhcp[2366]: DHCPACK(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:51 2022 daemon.notice hostapd: wlan1: AP-STA-DISCONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:53 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: authenticated
Thu Jan 27 16:46:53 2022 daemon.notice hostapd: wlan1: STA-OPMODE-N_SS-CHANGED e6:80:5e:21:62:57 2
Thu Jan 27 16:46:53 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: associated (aid 4)
Thu Jan 27 16:46:53 2022 daemon.notice hostapd: wlan1: AP-STA-CONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:53 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 WPA: pairwise key handshake completed (RSN)
Thu Jan 27 16:46:53 2022 daemon.info dnsmasq-dhcp[2366]: DHCPREQUEST(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:53 2022 daemon.info dnsmasq-dhcp[2366]: DHCPACK(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:56 2022 daemon.notice hostapd: wlan1: AP-STA-DISCONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:57 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: authenticated
Thu Jan 27 16:46:57 2022 daemon.notice hostapd: wlan1: STA-OPMODE-N_SS-CHANGED e6:80:5e:21:62:57 2
Thu Jan 27 16:46:57 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: associated (aid 4)
Thu Jan 27 16:46:58 2022 daemon.notice hostapd: wlan1: AP-STA-CONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:46:58 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 WPA: pairwise key handshake completed (RSN)
Thu Jan 27 16:46:58 2022 daemon.info dnsmasq-dhcp[2366]: DHCPREQUEST(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:46:58 2022 daemon.info dnsmasq-dhcp[2366]: DHCPACK(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:47:01 2022 daemon.notice hostapd: wlan1: AP-STA-DISCONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:47:03 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: authenticated
Thu Jan 27 16:47:03 2022 daemon.notice hostapd: wlan1: STA-OPMODE-N_SS-CHANGED e6:80:5e:21:62:57 2
Thu Jan 27 16:47:03 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 IEEE 802.11: associated (aid 4)
Thu Jan 27 16:47:03 2022 daemon.notice hostapd: wlan1: AP-STA-CONNECTED e6:80:5e:21:62:57
Thu Jan 27 16:47:03 2022 daemon.info hostapd: wlan1: STA e6:80:5e:21:62:57 WPA: pairwise key handshake completed (RSN)
Thu Jan 27 16:47:03 2022 daemon.info dnsmasq-dhcp[2366]: DHCPREQUEST(br-lan) 192.168.1.217 e6:80:5e:21:62:57
Thu Jan 27 16:47:03 2022 daemon.info dnsmasq-dhcp[2366]: DHCPACK(br-lan) 192.168.1.217 e6:80:5e:21:62:57

her is a new device wifi settings video during this log

Is this stock or custom Android? Are they truely acting the same? What custom / stock ROM versions involved ?

Something must have changed ;- ) Some opgk update, OTA update, forgotten configuration change.....

It appears all of my custom ROMs on 5 devices are behaving similarly! 1 more(on android nougat) added to my list which face same issue(this one never behaved like this before). and these android versions range from nougat 7.1.2 to android 11.

  • samsung galaxy s3 android 7.1.2 LOS

  • oneplus one android 11 LOS

  • poco x3 pro android 11 arrowos

  • Asus max m1 pro android 11 LOS
    All above 4 devices are showing same behaviour.

  • Nexus 4 android 10 carbon ROM (Only this device seems to be connecting just fine)

Two of below on STOCK ROM work just fine:

  • Asus max m1 pro Stock ROM
  • Mi Redmi 2A

This extremely strange. any clues from the logread dump i mentioned?
Any other way to debug please let me know.

Nothing sort of this happened actually.

Hmmm....IDK. If I were in your situation I would use my spare router with the last stable 19.07.8, start from scratch or dive into paket capturing with wireshark and / or enable developer options/activate verbose wireless protocol logging on smartphone to see if this gets me additional information.

Just need to add a bit more here..
My fiber internet link went down just now, los/pon led showing red, and immediately all those devices got connected to the WiFi just fine albeit without internet.
Does this mean anything?

Set your country code (on both radios) for best results.

Android checks the Internet by trying to load a site like connectivitycheck.android.com though that may be different on a custom ROM.

Of course if your fiber keeps dropping you will get pages that don't load, etc.

1 Like

I assume you probably will be the first to know ;- )