Sequence of events for WPA and DHCP when a station connects to an AP

0

I'm having issues with an embedded Wi-Fi device that is set up to act as a Wi-Fi access point. I've found with the AP at elevated temperatures a device (station) attempting to connect can have some issues. I do not believe it is the station failing but rather some sort of corruption/failure with the AP. While testing by cycling connecting and disconnecting, what happens is that suddenly station device (my iPhone) will ask for the WPA password again. Then once connected and having its previous IP, about 10 seconds later it goes back to attempting to get an IP address. I see DHCP discover and offer, but no request and ack. After about 2min of this, it does use its previous IP address but name resolution through mDNS doesn't work and you can't ping the station until the station pings the gateway first. Obviously the network is a little messed up at this point in some way.

If you power cycle the AP, the station will successfully connect the first time but subsequent connection attempts always end up attempting to get an IP address as previously described. DHCP renew does not help. Rebooting the station will allow a successful first connection but again subsequent connections fail. If I disable WPA on the AP, everything works great. If I go back and re-enable WPA, even with a new, different, password, it still exhibits the same behavior. Letting the AP device cool back down to room temp does not solve the issue, but it seems like letting it sit overnight powered off clears things up.

Another interesting tidbit is after the failure occurs, I can connect a new device to AP and it works just fine for every connect disconnect, while the iPhone that was involved in the failure continues to have issues.

My hypothesis is that something is getting corrupted with the WPA authentication. I guess what I'm looking for is how the WPA authentication and DHCP work together so I can try to figure out what is going on. Hopefully there is someone on here with very intimate knowledge of how this entire process works. For example is DHCP done before WPA authentication? How do new WPA keys get generated and how are they stored on each device. Does a power cycle clear these generated keys?

A P

Posted 2018-08-04T13:55:19.453

Reputation: 1

Reconfigure your AP to only do pure WPA2-PSK (AES-CCMP only, no WPA/TKIP). Does the problem go away? Original WPA was crap that was only useful to a tiny handful of people for a brief window c. 2003 before WPA2 came out. Ever since then it’s just caused problems. Everyone should use pure WPA2 and disable any vestiges of original WPA/TKIP. – Spiff – 2018-08-04T18:08:52.450

Answers

1

Very briefly: WPA authentication and DHCP are completely independent. WLAN association and WPA authentication have to be completed before any data is transferred, and data here includes DHCP packetes.

Failure at elevated temperatures points to a hardware problem, so it will be near impossible to debug and fix.

"Can't ping the station until the station pings the gateway first." sounds like an ARP problem.

If the AP randomly drops important packets (ARP, DHCP) because of temperature then both the AP and the station's network stack will have inconsistent state in various parts, which could be the reason for the symptoms you see.

dirkt

Posted 2018-08-04T13:55:19.453

Reputation: 11 627

Agreed and thank you for the reply. I guess I don't understand why the station and AP both can be power cycled and the issue still persists. It seems like something is being stored in flash memory in one device or the other that is causing this problem. – A P – 2018-08-04T17:18:42.750