-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Description
Basic Infos
Hardware
Hardware: ESP-12E
Core Version: 2.4.0
Description
Getting watchdog reset when trying to turn off WiFi (to save power).
ets Jan 8 2013,rst cause:4, boot mode:(1,7)
wdt reset
I think there is a loop that is in the WiFi library that watchdog doesn't like.
I've tried replacing the delay with a loop calling yheld(); with a smaller delay, I still get error.
Settings in IDE
Module: Generic ESP8266 Module
Flash Size: 4MB
CPU Frequency: 80Mhz
Flash Mode: idk?
Flash Frequency: also dont know?
Upload Using: USB Serial.
Reset Method: idk, MCU?
Sketch
void loop() {
beginWIFI(); // reconnects WiFi if disconnect.
beginMQTT(); // reconnects MQTT if it was disconnected.
printValues();
Serial.println("Turning off wifi");
delay(100);
client.disconnect(); //MQTT disconnect
WiFi.disconnect();
WiFi.forceSleepBegin(); // Error only occurs when using this.
delay(1);
delay(20 * 1000) //Delay 10 seconds -- Problem occurs while waiting.
WiFi.forceSleepWake();
}
Debug Messages
ets Jan 8 2013,rst cause:4, boot mode:(1,7)
wdt reset
Metadata
Metadata
Assignees
Labels
No labels