-->
Page 1 of 1

Web server goes offline for extended period, but comes back

PostPosted: Sun Sep 13, 2015 7:26 pm
by GregryCM
I have a simple ESP8266-01 application that serves up a web page which shows the status of a switch and the amount of time that the ESP8266 has been running.

The ESP has a fixed IP address on my local LAN.

It has been running for over 260 hours, but has dropped offline for days at a time. I am surprised when it does come back online that the run time has not been restarted, which is what I would expect if a WDT reset occurred.

My loop() does not have a check of the WiFi.Status(), and server.begin() is only called in setup().

My next update to the firmware will include a test of WiFi.Status() and restart as needed, but I am curious what can seeming cause the WiFi connection to be restored without going through reset.

Thanks,
Greg

Re: Web server goes offline for extended period, but comes b

PostPosted: Sun Sep 20, 2015 10:49 pm
by mrburnette
It is a perplexing problem. My thought would be a cold solder joint on the '8266 chip itself or a break in a foil trace such that small thermal changes open/close the connection.

Ray

Re: Web server goes offline for extended period, but comes b

PostPosted: Thu Apr 07, 2016 9:23 pm
by GregryCM
In loop(), I have the following check for connected:

Code: Select all  if( WiFi.status() != WL_CONNECTED )
  {
    delay(10);
    StartWiFiSTA();
    UtilityWiFiReconnectInc();
    return;
  }


I know the above works 'most of the time' because a counter is incremented on each reconnect.

I currently have 1 module that, via serial debug command, reports that WiFi.status() == WL_CONNECTED. The module is running fine, as the Heart Beat LED is blinking and it responds to all of the serial debug commands. If I query the network status on Win7 with arp -a command, this modules IP address does not show.

I am confident that the module will rejoin the network if I reset the module, or if I reset the LAN router.

I know that on some days, modules may reconnected 1 or 2 times, for what ever reason. I am wondering if the router can lose connection with an ESP8266 quicker than the module can detect?

Is there something that I can do at the ESP8266 module to periodically 'ping' the router to ensure that a connection is indeed valid?

Thanks,
Greg