2 WiFi STAtions hang - 1 comes back after router pwr cycle
Posted: Thu Dec 17, 2015 10:43 pm
Hello,
I have 2 ESP01 modules with fixed IP addresses, 1.123 and 1.124
1.123 is on my bench. 1.124 is in the garage, and reports if the door is up or down.
Both modules have ran for hundreds of hours. 1.124 has been up for 534 hours, 1.123 had been up for over 100 hours.
This evening, I could not connect to either module. Both modules failed to connect, and the browser returned a "Connection has timed out message".
1.123 has a heart beat LED that is controlled via an I2C port expander. It was not blinking. I connected the serial interface to the board and attempted to execute some debug commands, but got no response. This module appears to be hung.
Since both modules appeared to hang at the same time, I thought that some unhandled WiFi event may have occurred. I repowered the WiFi router, and 1.124 module came back online. It's WiFi Reconnections counter advanced, and the uptime was maintained, indicating that the module did not reset.
1.123 did not come back online, and the heart beat LED is still not blinking, it still appears to be hung.
Both modules check the WiFi.status() in loop() and start restart WiFi if !WL_CONNECTED.
Both applications were built with 1.6.5-1084-ga39ce29.
It appears that the major difference between the modules is I2C. Could a WiFi event cause I2C to hang?
Suggestions?
Thanks,
Greg
I have 2 ESP01 modules with fixed IP addresses, 1.123 and 1.124
1.123 is on my bench. 1.124 is in the garage, and reports if the door is up or down.
Both modules have ran for hundreds of hours. 1.124 has been up for 534 hours, 1.123 had been up for over 100 hours.
This evening, I could not connect to either module. Both modules failed to connect, and the browser returned a "Connection has timed out message".
1.123 has a heart beat LED that is controlled via an I2C port expander. It was not blinking. I connected the serial interface to the board and attempted to execute some debug commands, but got no response. This module appears to be hung.
Since both modules appeared to hang at the same time, I thought that some unhandled WiFi event may have occurred. I repowered the WiFi router, and 1.124 module came back online. It's WiFi Reconnections counter advanced, and the uptime was maintained, indicating that the module did not reset.
1.123 did not come back online, and the heart beat LED is still not blinking, it still appears to be hung.
Both modules check the WiFi.status() in loop() and start restart WiFi if !WL_CONNECTED.
Code: Select all
void loop( void )
{
#if WIFI_MODE == WIFI_MODE_STA
// Reconnect wifi if not connected
if( WiFi.status() != WL_CONNECTED )
{
delay(10);
StartWiFiSTA();
UtilityWiFiReconnectInc();
return;
}
#endif
server.handleClient();
yield();
CommProcess();
yield();
// Do Periodic Events
if( Timer100mS )
{
Timer100mS = false;
OpStateService();
}
}
Both applications were built with 1.6.5-1084-ga39ce29.
It appears that the major difference between the modules is I2C. Could a WiFi event cause I2C to hang?
Suggestions?
Thanks,
Greg