Esp32 resets every 30 seconds

Dear Sir,

With Blynk2.0
When my Esp32 is not connected to the Wi-Fi router board, my esp32 resets every 30 seconds, which turns the output devices OFF and ON on every reset. Please resolve this issue of wifi connection timeout.

Thanks

You have to open your own topic and post your code
Don’t forget triple backticks :stuck_out_tongue_winking_eye:

Moved into new topic… awaiting actual details from OP

1 Like

Dear Sir,

With Blynk2.0
When my Esp32 is not connected to the Wi-Fi router board, my esp32 resets every 30 seconds, which turns the output devices OFF and ON on every reset. Please resolve this issue of wifi connection timeout.

My Program code and results are given below for dimmer.



#define BLYNK_TEMPLATE_ID "xxxxxxxx"
#define BLYNK_DEVICE_NAME "xxxxxxxx"
#define BLYNK_FIRMWARE_VERSION        "0.1.0"


#define BLYNK_PRINT Serial
#include <RBDdimmer.h>          

#define outputPin  27  // PWM pin for dimmer
#define zerocross  26 // for boards with CHANGEBLE input pins

dimmerLamp dimmer(outputPin, zerocross); //initialase port for dimmer for ESP8266, ESP32, Arduino due boards

int outVal = 0; // Intialisation value for dimmer
int dim_val; // dimmer value to dim the appliance

#define APP_DEBUG
#include "BlynkEdgent.h"


void setup()
{
   Serial.begin(115200);
   delay(100);
  dimmer.begin(NORMAL_MODE, ON); //dimmer initialisation: name.begin(MODE, STATE)
  
  BlynkEdgent.begin();
}

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

BLYNK_WRITE(V0)  {  // Set to your virtual pin  
  outVal = param.asInt(); // Get State of Virtual Button
  dim_val = map(outVal, 0, 100, 0, 100); // mapped the value for dimmer
  dimmer.setPower(dim_val);               // Set dimmer power
  Blynk.virtualWrite(V1, dim_val); //sending to Blynk
}

Results Without wifi connection

22:01:24.627 -> ets Jul 29 2019 12:21:46
22:01:24.627 -> 
22:01:24.627 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
22:01:24.627 -> configsip: 0, SPIWP:0xee
22:01:24.627 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
22:01:24.627 -> mode:DIO, clock div:1
22:01:24.627 -> load:0x3fff0018,len:4
22:01:24.627 -> load:0x3fff001c,len:1216
22:01:24.627 -> ho 0 tail 12 room 4
22:01:24.627 -> load:0x40078000,len:10944
22:01:24.627 -> load:0x40080400,len:6388
22:01:24.627 -> entry 0x400806b4
22:01:25.189 -> [246] 
22:01:25.189 ->     ___  __          __
22:01:25.189 ->    / _ )/ /_ _____  / /__
22:01:25.189 ->   / _  / / // / _ \/  '_/
22:01:25.189 ->  /____/_/\_, /_//_/_/\_\
22:01:25.189 ->         /___/ v1.0.0 on ESP32
22:01:25.189 -> 
22:01:25.189 -> [248] --------------------------
22:01:25.236 -> [251] Product:  xxxxxxxxxxxxxxxxxxx
22:01:25.236 -> [253] Hardware: 1.0.0
22:01:25.236 -> [255] Firmware: 0.1.0 (build Jun 25 2021 21:36:58)
22:01:25.236 -> [259] Token:    .xxxxxxxxxxxxxxxxx
22:01:25.236 -> [262] Device:   ESP32 @ 240MHz
22:01:25.236 -> [264] MAC:     xxxxxxxxxxxxxxxxxx
22:01:25.236 -> [267] Flash:    4096K
22:01:25.236 -> [269] ESP sdk:  v3.3.4-432-g7a85334d8
22:01:25.236 -> [273] Chip rev: 3
22:01:25.236 -> [274] Free mem: 274736
22:01:25.236 -> [277] --------------------------
22:01:25.236 -> [279] INIT => CONNECTING_NET
22:01:25.236 -> [282] Connecting to WiFi: MY WIFI
22:01:55.234 -> [30287] CONNECTING_NET => ERROR
22:02:05.235 -> [40287] Restarting after error.
22:02:05.275 -> ets Jul 29 2019 12:21:46
22:02:05.275 -> 
22:02:05.275 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
22:02:05.275 -> configsip: 0, SPIWP:0xee
22:02:05.275 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
22:02:05.275 -> mode:DIO, clock div:1
22:02:05.275 -> load:0x3fff0018,len:4
22:02:05.275 -> load:0x3fff001c,len:1216
22:02:05.275 -> ho 0 tail 12 room 4
22:02:05.275 -> load:0x40078000,len:10944
22:02:05.275 -> load:0x40080400,len:6388
22:02:05.275 -> entry 0x400806b4
22:02:05.858 -> [247] 
22:02:05.858 ->     ___  __          __
22:02:05.858 ->    / _ )/ /_ _____  / /__
22:02:05.858 ->   / _  / / // / _ \/  '_/
22:02:05.858 ->  /____/_/\_, /_//_/_/\_\
22:02:05.858 ->         /___/ v1.0.0 on ESP32
22:02:05.858 -> 
22:02:05.858 -> [249] --------------------------
22:02:05.858 -> [252] Product:  xxxxxxxxxxxxxx
22:02:05.858 -> [254] Hardware: 1.0.0
22:02:05.858 -> [256] Firmware: 0.1.0 (build Jun 25 2021 21:36:58)
22:02:05.858 -> [261] Token:  xxxxxxxxxxxxxxxx
22:02:05.858 -> [263] Device:   ESP32 @ 240MHz
22:02:05.858 -> [266] MAC:   xxxxxxxxxxxxxxxx
22:02:05.858 -> [269] Flash:    4096K
22:02:05.858 -> [271] ESP sdk:  v3.3.4-432-g7a85334d8
22:02:05.906 -> [274] Chip rev: 3
22:02:05.906 -> [276] Free mem: 274736
22:02:05.906 -> [278] --------------------------
22:02:05.906 -> [281] INIT => CONNECTING_NET
22:02:05.906 -> [283] Connecting to WiFi: MY WIFI
22:02:35.903 -> [30288] CONNECTING_NET => ERROR
22:02:45.886 -> [40288] Restarting after error.
22:02:45.886 -> ets Jul 29 2019 12:21:46
22:02:45.886 -> 
22:02:45.933 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
22:02:45.933 -> configsip: 0, SPIWP:0xee
22:02:45.933 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
22:02:45.933 -> mode:DIO, clock div:1
22:02:45.933 -> load:0x3fff0018,len:4
22:02:45.933 -> load:0x3fff001c,len:1216
22:02:45.933 -> ho 0 tail 12 room 4
22:02:45.933 -> load:0x40078000,len:10944
22:02:45.933 -> load:0x40080400,len:6388
22:02:45.933 -> entry 0x400806b4
22:02:46.491 -> [245] 
22:02:46.491 ->     ___  __          __
22:02:46.491 ->    / _ )/ /_ _____  / /__
22:02:46.491 ->   / _  / / // / _ \/  '_/
22:02:46.491 ->  /____/_/\_, /_//_/_/\_\
22:02:46.491 ->         /___/ v1.0.0 on ESP32
22:02:46.4

Anyone reply from blynk community the above issue?

The board reset is a part of our example sketch. In this example, if device cannot connect to the network, it enters an ERROR state, indicates it and resets. Feel free to adjust it to your needs.