details :
• I am using a Esp32 devkit v1 over wifi using the blynk edgend for esp32 example from the blynk library
• Blynk server isnt connecting
• Blynk Library version 1.0.1
// Fill-in information from your Blynk Template here
#define BLYNK_TEMPLATE_ID "TMPL-lBE42El"
#define BLYNK_DEVICE_NAME "Quickstart Template"
#define BLYNK_FIRMWARE_VERSION "0.1.0"
#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG
#define APP_DEBUG
// Uncomment your board, or configure a custom board in Settings.h
//#define USE_WROVER_BOARD
//#define USE_TTGO_T7
#include "BlynkEdgent.h"
void setup()
{
Serial.begin(115200);
delay(100);
BlynkEdgent.begin();
}
void loop() {
BlynkEdgent.run();
}
Are you connecting via a router?
Have you tried re-starting the router and any access points on your network?
You haven’t in-commented any board types, so the custom configuration in Settings.h is being used.
Do you have an LED and a switch connected to the pins that are defined in Settings.h ?
Yes i am connecting via wifi router and have tired restart it too.
The board type is not specified in the example so i just left it as is, I’m using the ESP32 wroom module.
/*************************************************************
This is a simple demo of sending and receiving some data.
Be sure to check out other examples!
*************************************************************/
// Template ID, Device Name and Auth Token are provided by the Blynk.Cloud
// See the Device Info tab, or Template settings
#define BLYNK_TEMPLATE_ID "TMPL-lBE42El"
#define BLYNK_DEVICE_NAME "Quickstart Template"
#define BLYNK_AUTH_TOKEN "iWWIQuPuytSSp1rXO7-8GhGeu_fNN277"
// Comment this out to disable prints and save space
#define BLYNK_PRINT Serial
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
char auth[] = BLYNK_AUTH_TOKEN;
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Mr X Mob";
char pass[] = "legendaryeaglemaster";
BlynkTimer timer;
// This function is called every time the Virtual Pin 0 state changes
BLYNK_WRITE(V0)
{
// Set incoming value from pin V0 to a variable
int value = param.asInt();
// Update state
Blynk.virtualWrite(V1, value);
if (value == 1){
Blynk.logEvent("button","Button is High");
}
}
// This function is called every time the device is connected to the Blynk.Cloud
BLYNK_CONNECTED()
{
// Change Web Link Button message to "Congratulations!"
Blynk.setProperty(V3, "offImageUrl", "https://static-image.nyc3.cdn.digitaloceanspaces.com/general/fte/congratulations.png");
Blynk.setProperty(V3, "onImageUrl", "https://static-image.nyc3.cdn.digitaloceanspaces.com/general/fte/congratulations_pressed.png");
Blynk.setProperty(V3, "url", "https://docs.blynk.io/en/getting-started/what-do-i-need-to-blynk/how-quickstart-device-was-made");
}
// This function sends Arduino's uptime every second to Virtual Pin 2.
void myTimerEvent()
{
// You can send any value at any time.
// Please don't send more that 10 values per second.
Blynk.virtualWrite(V2, millis() / 1000);
}
void setup()
{
// Debug console
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk.cloud", 80);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);
// Setup a function to be called every second
timer.setInterval(1000L, myTimerEvent);
}
void loop()
{
Blynk.run();
timer.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!
}
with this it connects to blynk.cloud:80
Can’t figure out what’s the issue with the edgent one.
[26] Connecting to Mr X Mob
[4641] Connected to WiFi
[4641] IP: 192.168.10.2
[4642]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ v1.0.1 on ESP32
[4652] Connecting to blynk.cloud:80
[5385] Ready (ping: 307ms).
Pinging blynk.cloud [128.199.144.129] with 32 bytes of data:
Reply from 128.199.144.129: bytes=32 time=233ms TTL=51
Reply from 128.199.144.129: bytes=32 time=251ms TTL=51
Reply from 128.199.144.129: bytes=32 time=236ms TTL=51
Reply from 128.199.144.129: bytes=32 time=236ms TTL=51
Ping statistics for 128.199.144.129:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 233ms, Maximum = 251ms, Average = 239ms