Hi all,
I’m a beginner and want to connect ESP32 via Wi-Fi to bylnk cloud with very generic code. Blynk Libary is v1.2.0.
After 5 to 10 Minutes device goes offline. There seams to be a connection loss.
In the serial monitor looks like this:
[2632] Connected to WiFi
[2632] IP: 192.168.1.139
[2632]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ v1.2.0 on ESP32
#StandWithUkraine https://bit.ly/swua
[2642] Connecting to blynk.cloud:80
[2701] Ready (ping: 14ms).
[177806] Heartbeat timeout
[182788] Connecting to blynk.cloud:80
[201294] Connecting to blynk.cloud:8080
[219800] Connecting to blynk.cloud:80
[238307] Connecting to blynk.cloud:8080
[256813] Connecting to blynk.cloud:80
[275319] Connecting to blynk.cloud:8080
...
Sketch looks like this
/* Fill-in information from Blynk Device Info here */
#define BLYNK_TEMPLATE_ID "TMPLxxxxxxxxxxxxj"
#define BLYNK_TEMPLATE_NAME "Quickstart xxxxxxxxxxx"
#define BLYNK_AUTH_TOKEN "vV6LYUGcMH00BjJg0FJoS-xxxxxxxxxxx"
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#define BLYNK_HEARTBEAT 20 // defaults to 10s
#define BLYNK_TIMEOUT_MS 5000UL // defaults to 2000UL
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "xxxxxxxxxxxxxxxxx";
char pass[] = "xxxxxxxxxxxxxxxx";
void setup()
{
// Debug console
Serial.begin(115200);
Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
// You can also specify server:
//Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, "blynk.cloud", 80);
//Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass, IPAddress(192,168,1,100), 8080);
}
void loop()
{
Blynk.run();
// You can inject your own code or combine it with other sketches.
// Check other examples on how to communicate with Blynk. Remember
// to avoid delay() function!
}
Hardware: AZ-Delivery ESP32 DevKitC V2 , Model: ESP32-WROOM-32
Some tipps for me to solve this?
BR Parte