Blynk edgent connection problem

I have been using Blynk for about five months now,
By (Static Token).
But now I decided to use (Blynk edgent), and just used the example provided, but the app didn’t recognize it.
Is there a problem with the example?
Knowing that (esp32) works great
And i have exactly followed the steps mentioned in the description
thank you

Hey there, check this out
https://docs.blynk.io/en/getting-started/activating-devices/blynk-edgent-wifi-provisioning

1 Like

I tried following the steps
But when adding a new device is placed, it searches and then a message arrives saying that there is no device even though esp32 is connected

When you say…

what exactly do you mean?

What do you see in your serial monitor?

Pete.

Currently, I am back to using a Static Token.
And esp32 is working normally
But it doesn’t work when I use Blynk edgent.

It’s much better if you copy and paste the contents of the serial monitor rather than posting a screenshot.

Pete.

20:24:43.723 → [242]
20:24:43.723 → ___ __ __
20:24:43.723 → / _ )/ /_ _____ / /__
20:24:43.723 → / _ / / // / _ / '/
20:24:43.723 → /
//_, /////_
20:24:43.770 → /
__/ v1.0.1 on ESP32
20:24:43.770 →
20:24:43.770 → [244] --------------------------
20:24:43.770 → [247] Product: AB
20:24:43.770 → [249] Firmware: 0.1.0 (build Nov 19 2021 15:48:17)
20:24:43.770 → [253] Token: …j5Et
20:24:43.770 → [255] Device: ESP32 @ 240MHz
20:24:43.770 → [258] MAC: F0:07:D5:C1:67:B8
20:24:43.770 → [261] Flash: 4096K
20:24:43.770 → [263] ESP sdk: v3.3.5-1-g85c04342c
20:24:43.770 → [266] Chip rev: 1
20:24:43.770 → [268] Free mem: 273104
20:24:43.770 → [270] --------------------------
20:24:43.770 → [273] INIT => CONNECTING_NET
20:24:43.770 → [276] Connecting to WiFi: m.haj
20:24:44.746 →
20:24:44.746 → >[50280] CONNECTING_NET => ERROR
20:25:43.754 → [60280] Restarting after error.
20:25:43.802 → ets Jun 8 2016 00:22:57
20:25:43.802 →
20:25:43.802 → rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
20:25:43.802 → configsip: 0, SPIWP:0xee
20:25:43.802 → clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
20:25:43.802 → mode:DIO, clock div:1
20:25:43.802 → load:0x3fff0018,len:4
20:25:43.802 → load:0x3fff001c,len:1216
20:25:43.802 → ho 0 tail 12 room 4
20:25:43.802 → load:0x40078000,len:10944
20:25:43.802 → load:0x40080400,len:6388
20:25:43.802 → entry 0x400806b4
20:25:44.362 → [241]

Okay, so after one minute of attempting to connect to your WiFi it is restarting g the device because the WiFi connection failed.

Question 1 - are you 100% certain that the WiFi credentials you are providing are correct?

Question 2 - are you connecting to a regular router, or to a wireless hotspot created on a phone?

Pete.

A 1 - The code does not require any credentials

// Fill-in information from your Blynk Template here
#define BLYNK_TEMPLATE_ID   "XXXXXXXXX"
#define BLYNK_DEVICE_NAME  "XXXXXXXXX"

#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
//#define USE_ESP32C3_DEV_MODULE
//#define USE_ESP32S2_DEV_KIT

#include "BlynkEdgent.h"

void setup()
{
  Serial.begin(115200);
  delay(100);
  BlynkEdgent.begin();
}

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

A 2 - Regular router

1 Like

I wasn’t talking about the code, I was talking about the credentials you entered via the app.

Have you tried pressing and holding the flash button on the board (or whatever button is defined for your chosen board type in the Settings.h file) for 10 seconds, then re-entering your credentials?

Pete

When I try to add a new device, a message appears
(No devices found. Make sure devices are turned on and available to connect)

But the thing that puzzles me is
Why does my internet name appear on the serial monitor, yet the application cannot add the device?

the problem is that i cant add credentials Because the app cant find the devices

I’m not really following the sequence of actions that you’re describing.
I think that you’ve probably failed to provision the device correctly the first time around, so it’s trying to connect with incorrect credentials and resetting after 1 minute.
You need to clear the stored credentials, by pressing the provisioning button for 10 seconds. It should then appear in the app next time you power it up and attempt to add the device.

Pete.

I think the problem is with esp32 itself, as I changed the network name and turned it off, yet it is still trying to connect to it, knowing that I did not define it through the application
It seems that he still keeps it because of his identification by Static Token.
Have you had such a problem?

It’s not a problem as such, it’s a feature of ESP devices.
As I said, you need to clear the saved data and force re-provisioning.

Pete.

1 Like

I would suggest you to re flash your device.
Select only sketch + wifi settings in the ide. This way we are making sure the credentials stored are erased. And also we get know if the esp itself is the culprit.

@Madhukesh this is an ESP32. You don’t get the ESP8266 “Erase Flash…” menu option with an ESP32.

You need to use ESPtool instead, but attempting to clear the stored credentials via the provisioning reset button is a better first step.

Pete.

2 Likes

Ho my bad… I forgot the esptool thing :man_facepalming:t2:

But he seems to be confused on what’s going on with the connection thing. So I suggested him to start from scratch, to eliminate the basic doubts/problems.

The problem can be solved by following the video