Blynk_Release_v0.6.1 : esp_wroom_02 and NodeMCU watchdog


#include <BlynkSimpleEsp8266.h>

char auth[] = "...";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "...";
char pass[] = "...";


BlynkTimer timer;
int timer_1s = 0;

BLYNK_CONNECTED()
{
    Serial.println("Connected");
}

void sendSensor()
{
    Serial.println(timer_1s++);

    Blynk.virtualWrite(V1, timer_1s);
}

void setup()
{
    Serial.begin(115200);

    Serial.println("");
    Serial.println("Begin");

    //ESP.wdtDisable();
    //ESP.wdtEnable(WDTO_8S);
    
    Blynk.begin(auth, ssid, pass);

    Serial.println("");
    Serial.println("Started");

    timer.setInterval(1000L, sendSensor);
}

void loop() 
{
    //ESP.wdtFeed();
    Blynk.run();
    timer.run();
}

I formatted your code as per requirements… Please check and see how to do so in the future…

Blynk%20-%20FTFC

Meanwhile, your code works for me…

NodeMCU
IDE 1.8.9
ESP Core 2.5.0
Blynk 0.6.1
Local Server 0.41.4

image image

My server is : Blynk Cloud

Could it be an issue root cause?

I can’t possibly see how… but I can test that as well…

Thank you.

Counting up to around 150… and still going… So Cloud Server is not the issue.

1 Like

Hello Gunner,

Thank you.

I will figure out deeper…

No idea for now…

Regards,
Alexander A.

1 Like

maybe nodemcu firmware not updated?
or buggy?
or nodemcu version not stable?
if I were you, I would try to order a nodemcu lolin V3 for less than 4$.

I can confirm !
I have 2 NodeMCU

same code , same all…
the first run well, the second … rst !! and lost blynk connexion

the bad MCU

10:41:30.858 -> 107
10:41:31.019 -> 108
10:41:31.139 -> 109
10:41:31.298 -> 111
10:41:31.418 -> 113
10:41:31.539 -> 127
10:41:31.708 -> 128
10:41:31.823 -> 962803041
10:41:31.939 -> 1647863094
10:41:33.658 -> 
10:41:33.658 -> Soft WDT reset
10:41:33.658 -> 
10:41:33.658 -> >>>stack>>>
10:41:33.658 -> 
10:41:33.658 -> ctx: cont
10:41:33.658 -> sp: 3ffffd00 end: 3fffffc0 offset: 01b0
10:41:33.658 -> 3ffffeb0:  401003fc 3ffef780 00000000 40100425  
10:41:33.658 -> 3ffffec0:  40100698 00000000 3ffef780 4021184b  
10:41:33.658 -> 3ffffed0:  3ffe1f01 00000003 3ffef780 402118c2  
10:41:33.658 -> 3ffffee0:  004ded35 00000009 00000000 40211931  
10:41:33.658 -> 3ffffef0:  00824ee4 3ffef792 00000017 00000000  
10:41:33.698 -> 3fffff00:  3ffefeec 3ffeff34 3ffefeec 00000000  
10:41:33.698 -> 3fffff10:  3ffefeec 00000003 3ffeff58 40202cd4  
10:41:33.698 -> 3fffff20:  3ffffb20 00000002 3ffeff34 4020b574  
10:41:33.698 -> 3fffff30:  00003052 00000190 00003e95 00000000  
10:41:33.698 -> 3fffff40:  00000001 00000002 3fff04b8 00000022  
10:41:33.698 -> 3fffff50:  3ffe85f4 3ffef730 3fff0174 3fff05c4  
10:41:33.698 -> 3fffff60:  3fffdad0 00000000 3ffefeec 40208d25  
10:41:33.698 -> 3fffff70:  40214050 6400a8c0 feefeffe feefeffe  
10:41:33.738 -> 3fffff80:  00001f98 feefeffe feefeffe feefeffe  
10:41:33.738 -> 3fffff90:  feefeffe feefeffe feefeffe 3fff05c4  
10:41:33.738 -> 3fffffa0:  3fffdad0 00000000 3fff0594 40213454  
10:41:33.738 -> 3fffffb0:  feefeffe feefeffe 3ffe8684 40100f49  
10:41:33.738 -> <<<stack<<<
10:41:33.738 -> 
10:41:33.738 ->  ets Jan  8 2013,rst cause:2, boot mode:(3,6)
10:41:33.738 -> 
10:41:33.789 -> load 0x4010f000, len 1384, room 16 
10:41:33.789 -> tail 8
10:41:33.789 -> chksum 0x2d
10:41:33.789 -> csum 0x2d
10:41:33.789 -> v21db8fc9
10:41:33.789 -> ~ld

0:45:15.870 -> MyIp : 192.168.0.18
10:45:16.220 -> Blynk is connected
10:45:35.621 -> Starting reconnection timer in 30 seconds...
10:46:05.612 -> Attempting reconnection #5
10:46:14.603 -> Starting reconnection timer in 30 seconds...
10:46:44.604 -> Attempting reconnection #6
10:46:53.615 -> Starting reconnection timer in 30 seconds...

The good MCU

10:47:57.898 -> 127
10:47:57.938 -> Vsync all
10:47:57.938 -> Vsync OK
10:47:58.178 -> init timers in 10 sec ....
10:47:58.178 -> init timers
10:47:58.178 -> init timers done
10:47:58.258 -> 128
10:47:58.378 -> 962803041
10:47:58.538 -> 1647863094

10:48:09.148 -> connectionstatus
10:48:09.148 -> 
10:48:09.148 -> Wifi Connected
10:48:09.148 -> Signal -75
10:48:09.228 -> ------------------
10:48:09.228 -> MyIp : 192.168.0.48
10:48:09.539 -> Blynk is connected

10:48:19.139 -> ----------------
10:48:19.139 -> connectionstatus
10:48:19.139 -> 
10:48:19.139 -> Wifi Connected
10:48:19.139 -> Signal -75
10:48:19.219 -> ------------------
10:48:19.219 -> MyIp : 192.168.0.48
10:48:19.539 -> Blynk is connected

10:48:29.129 -> ----------------
10:48:29.129 -> connectionstatus
10:48:29.129 -> 
10:48:29.129 -> Wifi Connected
10:48:29.129 -> Signal -77
10:48:29.219 -> ------------------
10:48:29.219 -> MyIp : 192.168.0.48
10:48:29.569 -> Blynk is connected
10:48:30.939 -> ----------------
10:48:30.939 -> clockDisplay
10:48:30.939 -> 48465
10:48:30.939 -> 10:48

Hah, I forgot I had left mine running on the Cloud server.

i just checked the Serial output and it is still going… : and going…

image

1 Like

It is slightly different though. You’re getting a “soft WDT reset” as opposed to a “WDT reset” and you’re getting a stack dump, which @aafanasj isn’t getting.

The ESP Exception Decoder points to your issue being related to the ESP core:

Decoding 12 results
0x401003fc: uart_rx_fifo_available at C:\Users\Pete Knight\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266/uart.c line 115
:  (inlined by) uart_rx_copy_fifo_to_buffer_unsafe at C:\Users\Pete Knight\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266/uart.c line 146
:  (inlined by) uart_isr at C:\Users\Pete Knight\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266/uart.c line 374
0x40100425: uart_isr at C:\Users\Pete Knight\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266/uart.c line 382
0x40100698: _umm_free at C:\Users\Pete Knight\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\cores\esp8266\umm_malloc/umm_malloc.c line 1313
0x4021184b: udp_remove at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/udp.c line 1196
0x402118c2: udp_netif_ip_addr_changed at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/udp.c line 1285
0x40211931: tcp_create_segment at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/tcp_out.c line 193
0x40202cd4: BlynkProtocol   >::processInput() at C:\Users\Pete Knight\Documents\Arduino\libraries\Blynk\src/Blynk/BlynkProtocol.h line 300
0x4020b574: _svfprintf_r at /home/earle/src/esp-quick-toolchain/arena/newlib-install/xtensa-lx106-elf/newlib/libc/stdio/../../../../../../dl/newlib-xtensa/newlib/libc/stdio/nano-vfprintf.c line 479
0x40208d25: memccpy_P at /home/earle/src/esp-quick-toolchain/arena/newlib-install/xtensa-lx106-elf/newlib/libc/sys/xtensa/../../../../../../../dl/newlib-xtensa/newlib/libc/sys/xtensa/string_pgmspace.c line 167
0x40214050: dhcp_renew at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/dhcp.c line 1151
0x40213454: dhcp_option_trailer at /home/gauchard/dev/esp8266/esp8266/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/dhcp.c line 1970 (discriminator 3)
0x40100f49: pp_soft_wdt_feed_local at ?? line ?

This is when the sketch is compiled using 2.5.0-Beta 3. I think if you went down to 2.4.2 you might get a different result.

Pete.

Pete,

I’ve two nodemcu,
the two have been upload with same sketch , same clock speed, same core 2.5.0-Beta 3.
all same… lolin V3 both
but you give me an idea, I’ll try the bad MCU with 2.4.2 :wink:

1 Like

I do not know why, but after a hard reset, everything works fine with 2.5 beta 3 :thinking:

1 Like

ok guys. Thank you.

Anyway… the issue is still there…

I have two boards I mentioned and two of them have the same behavior (WDR). And one more custom board with WROOM-02 module - the same.

Regards,
Alexander A.

1 Like

I think the value of all the other testers is that whatever the issue is, it is probably espressif related, and not so much a Blynk issue.

EDIT -

Well, it lasted this long before I had to reload it with a more relevant (to me) sketch :stuck_out_tongue:

image

1 Like