BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Disconnection from Blynk Cloud Frequently

Hello!

I am using an ESP32 to control 2 relay switches.
I was using a basic router to which the ESP was connected it. Everything worked perfectly fine until i decided to upgrade my router(Netgear). Ever since that, the ESP keeps frequently disconnecting from Blynk Cloud. Bought another brand new router of a different make(TP Link), and still the same. It keeps getting disconnected from the server. When i hook it back up to the old router, everything works back as charm.

Is there some router settings i am missing out on? Please help me with this

Here is my arduino code for reference,

#define BLYNK_PRINT Serial

int pin        = 21;
int pin1       = 19;
int pin2       = 2;
#include <WiFi.h>
#include <WiFiClient.h>
#include "BlynkSimpleEsp32.h"

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "rxKJcDMy3_V1EN7glx2xV5oYBZe4hdJR";

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

void setup() {  
  pinMode(pin, OUTPUT); 
  pinMode(pin, HIGH);
 
  pinMode(pin1, OUTPUT); 
  pinMode(pin1, HIGH);
  
  pinMode(pin2, OUTPUT); 

  Serial.begin(115200);

  delay(10);
  Serial.print("Connecting to ");
 
  
  Serial.println(ssid);

  WiFi.begin(ssid, pass);
  int wifi_ctr = 0;
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("WiFi connected");  

  Blynk.begin(auth, ssid, pass);

}

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

did you try with an ESP32 static IP outside the dhcp range?
give it a try.