Exception on Wifi disconnection (Wemos D1) [SOLVED]

Hi,
I have this simple sketch on Wemos D1 (ESP8266):

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
char auth[] = "myAuthToken";
char ssid[] = "myNetworkName";
char pass[] = "myPassword";

void setup()
{
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);
}

void loop()
{
  Blynk.run();
}

Everything works perfectly, but when I disconnect my wifi router I have an exception on Wemos:

Exception (28):
epc1=0x40203ad5 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00bb01b6 depc=0x00000000

ctx: cont 
sp: 3fff01c0 end: 3fff0440 offset: 01a0

>>>stack>>>
3fff0360:  3ffef0f0 00000000 3fff142c 40203ace  
3fff0370:  85ce3b8b 3fffc6fc 3ffef420 3ffef0dc  
3fff0380:  0000e78c 3ffef418 40204620 3ffef0dc  
3fff0390:  0000e78c 000020fa 3ffef0f0 40203698  
3fff03a0:  3ffe9078 85ce3b8b 3ffe9078 85ce3b8b  
3fff03b0:  3ffe88f7 00000000 3ffef0b8 40204838  
3fff03c0:  3fffdad0 00000000 3ffef0b8 40202bda  
3fff03d0:  00000000 00ffffff 3ffe9078 fe00a8c0  
3fff03e0:  3ffe9078 0300a8c0 3ffe9078 08080808  
3fff03f0:  3ffe9078 00ffffff 3ffe9078 fe00a8c0  
3fff0400:  3ffe9078 0300a8c0 feefeffe 3ffef418  
3fff0410:  3fffdad0 00000000 3ffef410 40203027  
3fff0420:  3fffdad0 00000000 3ffef410 4020466c  
3fff0430:  feefeffe feefeffe 3ffef420 40100710  
<<<stack<<<

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

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v4ceabea9
~ld

Now, the big problem is that in this situation my ESP8266 restart and so the relays and other settings will be reset. I know that I can store the relays status using EEPROM, but I need that the esp8266 doesn’t have this exception.

Do you have some suggestion?

Thanks

This is NOT a Blynk issue… Google the error, and use EspExceptionDecoder.

I fixed the problem.

Just change IwIP Variant to: v1.4 Prebuid

2 Likes