Posted: Mon Apr 06, 2020 19:15 Post subject: [wpa_supplicant]Wifi drops every day after 8h24 (with fixes)
Content below is for Linux users who met this kind of issue. Not the best solution but I am fine with it. If you used wpa_supplicant directly then it should be more easy for you
I am the owner of a Linksys WRT3200 router.
I have two laptops and both and
Both are
* connected using WPA2-Enterprise + CCMP(AES) to a FreeRadius Server with OpenLDAP at home (EAP-TTLS/PAP)
* are based on Xubuntu 19.10
* managed through Network Manager
Sadly everyday after 8 hours and 24 minutes connection hang with this error
Code:
Rekeying PTK for STA ??:??:??:??:??:?? but driver can't safely do that
I was wondering why???
Since Network Manager is a level over wpa_supplicant, after having a look in his documentation, i found that
Code:
# Maximum lifetime for PMKSA in seconds; default 43200
#dot11RSNAConfigPMKLifetime=43200
# Threshold for reauthentication (percentage of PMK lifetime); default 70
#dot11RSNAConfigPMKReauthThreshold=70
Doing some maths you got 43200*0.7 => 8h24.
I didn't want to replace Network Manager by wpa_supplicant but I was ready to rebuild wpa_supplicant from sources.
To do so,
* I've downloaded its sources
* I used a simple loop to replace 43200 by a higher value
Code:
for file in $(grep -lr 43200 .);do sed -i "s:43200:129600:g" $file;done
* I wrote a simple .config file.Then I replaced my current wpa_supplicant by the new one
I spent 15 days on this issue. To be sure that everything is ok I added some parameters to dd-wrt too for hostapd through the Web Interface (Wireless/Wireless Security)
To be honest I let it as-it-is. I am not a hostapd expert.
Notice: If you want more details then you can have a look on a ticket I wrote on my blog
Hoe it helps.
Regards
If you are on Ubuntu and you don't want to build it yourself then you can download this binary based on hostapd repository built today
Download it here
No dependancy required. Tested only on Xubuntu 19.10.
Built using musl-cross-make
I set the value so connection should be up for 1 month (dot11RSNAConfigPMKLifetime = 3826286)