Device disconnects from the internet (RE500 V1)

After leaving my phone inactive for sometime, it disconnects itself from the internet (still connected to the wifi). I cannot access my main router during this time (192.168.1.1) but can access the extender I am connected to (192.168.1.2). I fix this temporarily by toggling the wifi setting off and then back on in my phone. I immediately gain access to the internet as well as the main router. This seems to happen only on WLAN. Ethernet seems to be fine as of now. I can't seem to find the reason in system logs, but when I turn off wifi on my phone it shows AP-STA-Disconnected. The system log when doing the reconnection:

Tue Mar  7 10:06:55 2023 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED xx:xx:xx:xx:xx:xx
Tue Mar  7 10:06:55 2023 daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: disassociated
Tue Mar  7 10:06:56 2023 daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: authenticated
Tue Mar  7 10:06:56 2023 daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx IEEE 802.11: associated (aid 1)
Tue Mar  7 10:06:56 2023 daemon.notice hostapd: wlan0: AP-STA-CONNECTED xx:xx:xx:xx:xx:xx
Tue Mar  7 10:06:56 2023 daemon.info hostapd: wlan0: STA xx:xx:xx:xx:xx:xx WPA: pairwise key handshake completed (RSN)
Tue Mar  7 10:06:56 2023 daemon.notice hostapd: wlan0: EAPOL-4WAY-HS-COMPLETED xx:xx:xx:xx:xx:xx
Tue Mar  7 10:06:56 2023 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(br-lan) 192.168.1.1xx xx:xx:xx:xx:xx:xx
Tue Mar  7 10:06:56 2023 daemon.info dnsmasq-dhcp[1]: DHCPACK(br-lan) 192.168.1.1xx xx:xx:xx:xx:xx:xx

Edit: This also happens on my other phone, both of them are iPhones (is this an iOS issue?)

We need a lot more info... let's start with the configuration:

Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

Config (Network):

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option packet_steering '1'
        option ula_prefix 'fd52:0772:360d::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan'
        option stp '1'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.1.2'
        option gateway '192.168.1.1'

config interface 'Network_5GHz'
        option proto 'dhcp'
        option device 'wlan1'

config interface 'Network_2GHz'
        option proto 'dhcp'
        option device 'wlan0'

Config (Wireless):


config wifi-device 'radio0'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
        option channel '1'
        option band '2g'
        option htmode 'HT20'
        option country 'AE'
        option cell_density '0'

config wifi-device 'radio1'
        option type 'mac80211'
        option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0'
        option band '5g'
        option htmode 'VHT80'
        option country 'AE'
        option cell_density '0'
        option channel '36'

config wifi-iface 'wifinet0'
        option device 'radio1'
        option mode 'sta'
        option ssid 'Network_5GHz'
        option encryption 'psk2'
        option key 'password'
        option wds '1'
        option network 'Network_5GHz lan'

config wifi-iface 'wifinet2'
        option device 'radio0'
        option mode 'ap'
        option ssid 'Network_Ext'
        option encryption 'psk2'
        option wds '1'
        option key 'password'
        option network 'lan Network_2GHz'

Config (DHCP):

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option localservice '1'
        option ednspacket_max '1232'
        list server '192.168.1.1'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

Config (Firewall):

config defaults
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option synflood_protect '1'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'lan'
        list network 'Network_5GHz'
        list network 'Network_2GHz'

I'm not an expert on the wds configuration elements, but I have noticed this:

the devices should not be specified here... the association between a network interface and the SSID must only be made in the wireless config file (with the option network in the wifi-iface definition). The wlan hardware should never be referenced in the network config file.

I myself have no clue on what I've done (new to OpenWRT). I wanted Network_5GHz through ethernet only (to my laptop) and the 2.4GHz through WLAN (for other devices like my phone). The configuration I have done was a trial and error till I got everything I wanted. Sadly it is the disconnection from the internet that I am facing when leaving my phone switched off for a while. I have made a backup so I am ready to modify whatever is needed. If I have to remove a device from a config, can I have a guide on modifying the configuration?

Edit: Here is what’s happening on my phone: https://streamable.com/s91tfj

I did a reset and restored the config from the backup made. Currently I haven't experienced any disconnections (hopefully not). I will update on this in a few days if the issue does not yet happen or if it does. Thank you!

Sadly the issue still persists. But just by toggling WiFi settings on my phone, I immediately gain access to the internet. I can't seem to find the root cause for this as logs aren't showing the part when the phone loses internet access. But toggling the WiFi off in the phone results in AP-STA-DISCONNECTED as expected, and does the opposite when toggling it back on.

I might have solved the issue by following the guide here. I guess I may have done the configuring wrong and basically this guide has a similar end result as my expectation (extending WiFi on areas with less coverage) but I did connect the extender to the router wirelessly. Regardless I will update if anything goes wrong. Thank you!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.