Wifi connected devices lose connection intermittently

I am using dnsmasq-full but since moving to 3.8.5 (and now 3.8.6), wifi connected devices intermittently lose their connection but I’m struggling to work out why.

For example, I’ll be on my phone browsing via wifi and everything works fine until it suddenly stops working. When it happens, this is what happens on the logs:

2017-12-01 15:02:01 info /usr/sbin/cron[9824]: (root) CMD (/usr/bin/rainbow_button_sync.sh)
2017-12-01 15:02:01 info /usr/sbin/cron[9825]: (root) CMD (nethist_stats.lua)
2017-12-01 15:02:51 info dnsmasq-dhcp[15122]: DHCPDISCOVER(br-lan) MAC-ADDRESS-GOES-HERE! 
2017-12-01 15:02:51 info dnsmasq-dhcp[15122]: DHCPOFFER(br-lan) 192.168.1.102 MAC-ADDRESS-GOES-HERE! 
2017-12-01 15:02:51 info dnsmasq-dhcp[15122]: DHCPREQUEST(br-lan) 192.168.1.102 MAC-ADDRESS-GOES-HERE! 
2017-12-01 15:02:51 info dnsmasq-dhcp[15122]: DHCPACK(br-lan) 192.168.1.102 MAC-ADDRESS-GOES-HERE! MotoG
2017-12-01 15:02:53 info ucollect[2937]: Updating filter addresses from version 50404643 to version 50404684 (epoch 4)
2017-12-01 15:02:54 info ucollect[2937]: Updating ipset turris_100FA4E0_lb_a_4_X from version 50404643 to version 50404684 (epoch 4)
2017-12-01 15:02:59 warning ucollect[2937]: epoll_wait on 4 interrupted, retry
2017-12-01 15:03:01 info /usr/sbin/cron[9881]: (root) CMD (/usr/bin/rainbow_button_sync.sh)
2017-12-01 15:03:19 info dnsmasq-dhcp[15122]: DHCPDISCOVER(br-lan) MAC-ADDRESS-GOES-HERE! 
2017-12-01 15:03:19 info dnsmasq-dhcp[15122]: DHCPOFFER(br-lan) 192.168.1.102 MAC-ADDRESS-GOES-HERE! 
2017-12-01 15:03:19 info dnsmasq-dhcp[15122]: DHCPREQUEST(br-lan) 192.168.1.102 MAC-ADDRESS-GOES-HERE! 
2017-12-01 15:03:19 info dnsmasq-dhcp[15122]: DHCPACK(br-lan) 192.168.1.102 MAC-ADDRESS-GOES-HERE! MotoG
2017-12-01 15:04:01 info /usr/sbin/cron[10000]: (root) CMD (/usr/bin/rainbow_button_sync.sh)
2017-12-01 15:04:01 info /usr/sbin/cron[10002]: (root) CMD (nethist_stats.lua)

I can’t work out why but for some reason, the DHCP lease given to my phone expires but then takes a noticeable while to re-acquire.

I’ve been using my Turris since late August but this has never happened before. I know DHCP leases are time limited (for example, 12 hour leases) but I’ve used OpenWRT before and the DHCP expiry-renewal process has been seamless. The internet wouldn’t suddenly stop working.

3 Likes

UPDATE: I’m starting to think this is actually an issue with wifi rather than a dnsmasq/DHCP issue.

2017-12-06 22:13:55 info hostapd[]: wlan1: STA <MAC-ADDRESS!> IEEE 802.11: authenticated
2017-12-06 22:13:55 info hostapd[]: wlan1: STA <MAC-ADDRESS!> IEEE 802.11: associated (aid 10)
2017-12-06 22:13:55 info hostapd[]: wlan1: STA <MAC-ADDRESS!> RADIUS: starting accounting session 7A89C57E06994A7B
2017-12-06 22:13:55 info hostapd[]: wlan1: STA <MAC-ADDRESS!> WPA: pairwise key handshake completed (RSN)
2017-12-06 22:13:55 info dnsmasq-dhcp[10662]: DHCPREQUEST(br-lan) 192.168.1.102 <MAC-ADDRESS!> 
2017-12-06 22:13:55 info dnsmasq-dhcp[10662]: DHCPACK(br-lan) 192.168.1.102 <MAC-ADDRESS!> MotoG

As you can see, clearly my phone loses its wifi connection and has to then reconnect (and this is why it has to get a new DHCP lease!)

Why is this happening? Why is the wifi so flaky? It wasn’t like this before and I’m struggling to make sense of it. There’s no order to it. It happens randomly at random times during the day so I can’t find a pattern either.

I’ve also run iwinfo for wlan1 (2.4GHz) and this is what the output is like:

wlan1     ESSID: "xxx"
          Access Point: <SNIP>
          Mode: Master  Channel: 13 (2.472 GHz)
          Tx-Power: 19 dBm  Link Quality: 43/70
          Signal: -67 dBm  Noise: -95 dBm
          Bit Rate: 45.0 MBit/s
          Encryption: WPA2 PSK (CCMP)
          Type: nl80211  HW Mode(s): 802.11bgn
          Hardware: 168C:002E 168C:30A4 [Generic MAC80211]
          TX power offset: unknown
          Frequency offset: unknown
          Supports VAPs: yes  PHY name: phy1

2 Likes

hey im having the same problem, were you ever able to figure out what the problem was or how to fix it?

Unfortunately not, sorry!

1 Like

Same problem here with WD-9980 using 19.07. Wi-Fi drops on Macbook. I’ve tried most of the basic things including setting DTIM to 3 and option disassoc_low_ack ‘0’ doesn’t seem to do anything. Any solutions so far?

Not sure if this helps ....

ad_leasetime: i was having “12h” , after some issues with wireless i’ve changed that to 82800 (23h). Somehow using ‘h=hours’ ‘d=days’ notation did not work (in my case).–>still some clients can’t refresh lease instantly (i have to wait a bit until dhcp_host_domain_ng.py finish its work in lease files). for some hosts i am using static lease with ‘infinite’ lease time, rest is on dynamic.
ad_wireless: there is option wpa_group_rekey in uci config, where i have value 86400 (24h).
Also i had to add option ieee80211w '0' and option type 'mac80211'after some TOS update, together with some performance stuff option bursting '1', option ff '1',option turbo '1' .