I am loosing from time to time WiFi connection to my WeMos D1 pro.
Now I know that the WiFi signal is weak, the reason I use a pro version with an appropriate antenna.
However, I am loosing the connection with the WeMos and only a reset solves this problem.
I am currently using a DHCP configuration, but I had the same problem using a fix IP address.
I am quite sure the WeMos is still running, because it has a second wireless interface (RFM69 transceiver) which stills respond.
I don't know how the disconnection is handled by the ESP8266, but I suppose there is an internal recovery procedure while the AP signal is lost but,... how often, how long?
As work around I can test one of the follow:
!WL_CONNECTED or
WL_CONNECTION_LOSTAnd then:
1. Restart the connection through a
WiFi.begin(ssid,pass)or
2. using the function
WiFi.setAutoReconnect (true)or
3. Simply restart the WeMos with something like
ESP.reset()What should be the best solution (I don't like the last one of course) or is it a better one?.
NB: I wonder that the WiFi.setAutoReconnect is run automatically, if yes why is it not in some circumstances giving it up?
Thanks in advance
Robert