How do I check my WiFi link status before sending a network request? The only way I can see to check my WiFi status is by using the WiFi.begin() (http://arduino.cc/en/Reference/WiFiBegin
What I'm seeing is that if my Arduino boots up and connects to the network, then has no activity for a long period of time, it loses the connection to the network. If this happens, the next action I take seems to reconnect it, but that request fails.
The symptoms I see on the board are as follows:
- Link light is green
- Push button to trigger network traffic
- Link light goes red
- Request fails
- Link light goes green
- Push button to generate network traffic
- Request succeeds
I'd like to check the link status on each button press to ensure that I have a valid link _before_ sending the request, and then attempt to re-establish the link if it's not valid.