Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By farmerz24
#78282 Basic Infos
Platform

Hardware: ESP-12
Core Version: 2.4.2
Development Env: Arduino IDE
Operating System: Windows

Settings in IDE

Module: Generic ESP8266 Module
Flash Mode: DIO
Flash Size: 4MB/1mb
lwip Variant: v2 Lower Memory
Reset Method: ck
Flash Frequency: 40Mhz
CPU Frequency: 80Mhz
Upload Using: SERIAL
Upload Speed: 256000

Problem Description

I have been running the ESP-12 in a deployed environment where it will wake up and send a sensor reading once every 30 minutes. This had been going well until the modules stopped responding after anywhere between 15-30 days. They would constantly reboot once they connected to the wifi network.

I had read the fix was to set WiFi.persistent(false) at the top of the sketch before calling Wifi.begin(), however this does not work, module will still reboot once connected to wifi.
The code below still causes the corrupted module to reboot. Is there any fix to restore this module?
I have also tried static IP with no change..

Debug info attached below.

Is the wifi flash corrupt now?
does the WiFi.persistent(false) need to be set before flash becomes corrupt?
Will this only work on a new module?


Cannot get even this sample code to work, reboots when connects to Wifi:
Code: Select all#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>

ADC_MODE(ADC_VCC); //vcc read
#define LEDPINOUT 2 // GPIO2 of ESP8266
#define ESPDEEPSLEEPSECONDS 1000000

void setup()
{

  //setup serial outputs
  Serial.begin(115200);
  Serial.setDebugOutput(true);
  WiFi.printDiag(Serial);

  Serial.print("Connecting to ");

  WiFi.persistent(false);
  WiFi.mode(WIFI_STA);
  //WiFi.forceSleepBegin();

  //turn on wifi and connect
  // WiFi.forceSleepWake();
  //WiFi.config({192, 168, 0, 66}, {192, 168, 0, 1}, {255, 255, 255, 0}, {192, 168, 0, 1});
    if (WiFi.status() != WL_CONNECTED)
    {
      WiFi.begin("ssid", "pwd");  //connect to wifi   
      delay (500);
    }
}//end setup loop
 
void loop()
{
 Serial.print(".");
 delay(100);

}  //end main loop


debug:
Code: Select allMode: STA+AP
PHY mode: N
Channel: 1
AP id: 0
Status: 1
Auto connect: 1
SSID (5): XXXXX
Passphrase (8): XXXXXXXX
BSSID set: 0
Connecting to bcn 0
del if1
mode : sta(xx:xx:xx:xx:xx:xx)
scandone
........................scandone
state: 0 -> 2 (b0)

---------------------------------------
 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
vbb28d4a3
~ld
User avatar
By QuickFix
#78286 First thought (without seeing schematics or a picture of your set up): insufficient power supply.

The ESP uses about 150-250 mili-amps when still unconnected (ie. at boot), but this will increase to peaks of ~500mA when it tries to connect (and communicates) over WiFi. :idea:
When power drops below a certain point (brownout) the ESP will reset.
User avatar
By farmerz24
#78299 Hello, thanks for your reply.
I am running a single cell 2000mah lipo rc plane 3.7V battery and when fully charged provides 4.2v. I do not think it would be the battery. If this were true I could then power with a wall-wart and the problem would go away, but it does not.