I have the board connected via WiFi to home WiFi AP. The WiFi connects find and operates fine.
Before Calling: status = WiFi.begin(ssid, pass);
21:59:05.251 -> WiFi Firmware OK!
21:59:05.283 -> Attempting to connect to WPA SSID: MyNetwork
21:59:05.346 -> status, WL_CONNECTED: 0:3
Status is 0 and WL_CONNECTED is 3.
After calling status = WiFi.begin(ssid, pass); and it has connected
22:00:07.315 -> status, WL_CONNECTED: 3:3
Randomly the the WiFi AP will power off. It is in fact shared internet through Microsoft Mobile Hot spot (some AP thing that comes with windows). Every time there is windows update it reboots and the AP does not come back on automatically.
I do a HTTPS POST to a web server of mine every hour from the Arduino.
Before calling the HTTPs Post funtion I do a check if:
if ( status == WL_CONNECTED )
The issue is that status or WL_CONNECTED never changes. Even if the AP is off they both always remain 3.
My HTTPs Post function will then continue and try to POST to an endpoint where it will fail gracefully through a handled error but thinking the Endpoint is unreachable not that the AP is down.
My question is how can I check this condition if status and WL_CONNECTED always remain 3.
Am i missing something fundamental here ?
Thank you in advance for your help.