Device online issue during wifi provisioning

Hello,
I was trying a simple example code of wifi provisioning for my project where I am using esp32 and blynk. During provisioning " waiting for device online" is loading for a very long time. Does this mean the device is unable to connect with the Wifi ?

I am using 1.0.1 version of blynk

This is the code



#define BLYNK_TEMPLATE_ID "TMPLtsNNluKN"
#define BLYNK_DEVICE_NAME "insubud"
// Fill-in information from your Blynk Template here
//#define BLYNK_TEMPLATE_ID           "TMPLxxxxxx"
//#define BLYNK_DEVICE_NAME           "Device"

#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();
}

This is the output in Serial Monitor

>[221] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v1.0.1 on ESP32

[231] --------------------------
[231] Product:  insubud
[232] Firmware: 0.1.0 (build Jul 14 2022 01:18:32)
[242] Device:   ESP32 @ 240MHz
[242] MAC:      78:21:84:88:51:58
[242] Flash:    4096K
[242] ESP sdk:  v4.4.1-1-gb8050b365e
[253] Chip rev: 3
[253] Free mem: 251320
[253] --------------------------
[253] INIT => WAIT_CONFIG
[2870] AP SSID: Blynk insubud-89219
[2870] AP IP:   192.168.4.1
[2871] AP URL:  blynk.setup
[26467] WAIT_CONFIG => CONFIGURING
[39036] Sending board info...
[39098] Scanning networks...
[44420] Found networks: 7
[61812] Applying configuration...
[61812] WiFi SSID: LGRR Home Pass: Koly01554339320
[61812] Blynk cloud: ZAPIOO_I_iN_3mbzJpdR2owVQtNgYEYY @ blynk.cloud:443
[61826] CONFIGURING => SWITCH_TO_STA
[61828] Switching to STA...
[62984] SWITCH_TO_STA => CONNECTING_NET
[62984] Connecting to WiFi: LGRR Home
[92989] Last error code: 701
[92990] Configuration stored to flash
[92990] CONNECTING_NET => ERROR
[102990] Restarting after error.
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13516
load:0x40080400,len:3604
entry 0x400805f0

>[221] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v1.0.1 on ESP32

[231] --------------------------
[231] Product:  insubud
[232] Firmware: 0.1.0 (build Jul 14 2022 01:18:32)
[242] Device:   ESP32 @ 240MHz
[242] MAC:      78:21:84:88:51:58
[242] Flash:    4096K
[243] ESP sdk:  v4.4.1-1-gb8050b365e
[253] Chip rev: 3
[253] Free mem: 251320
[253] --------------------------
[253] INIT => WAIT_CONFIG
[2870] AP SSID: Blynk insubud-89219
[2870] AP IP:   192.168.4.1
[2871] AP URL:  blynk.setup

please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly. Triple backticks look like this: ```

These error codes are documented in ConfigStore.h…

#define BLYNK_PROV_ERR_NONE     0      // All good
#define BLYNK_PROV_ERR_CONFIG   700    // Invalid config from app (malformed token,etc)
#define BLYNK_PROV_ERR_NETWORK  701    // Could not connect to the router
#define BLYNK_PROV_ERR_CLOUD    702    // Could not connect to the cloud
#define BLYNK_PROV_ERR_TOKEN    703    // Invalid token error (after connection)
#define BLYNK_PROV_ERR_INTERNAL 704    // Other issues (i.e. hardware failure)

Bad SSID or WiFi password maybe, or trying to connect to a 5GHz network?

Pete.

1 Like

Thank you but now it shows “no devices found”
here is the serial monitor output

>[225] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v1.0.1 on ESP32

[235] --------------------------
[235] Product:  insubud
[236] Firmware: 0.1.0 (build Jul 14 2022 10:50:38)
[246] Token:    ...kvWu
[246] Device:   ESP32 @ 240MHz
[246] MAC:      78:21:84:88:51:58
[246] Flash:    4096K
[247] ESP sdk:  v4.4.1-1-gb8050b365e
[257] Chip rev: 3
[257] Free mem: 251460
[257] --------------------------
[257] INIT => CONNECTING_NET
[268] Connecting to WiFi: LGRR Home
[2155] Using Dynamic IP: 192.168.68.118
[2155] CONNECTING_NET => CONNECTING_CLOUD
[2165] Connecting to blynk.cloud:443
[2964] Certificate OK
[3066] Ready (ping: 100ms).
[3134] CONNECTING_CLOUD => RUNNING

What shows “no devices found?

Pete.

In the ios app, it shows “no devices found”

Is this on the front screen, or when you perform some action?

Pete.

In the app i clicked Add new device>Connect to wifi>No devices find to connect

That’s the behaviour I’d expect, as your device is now connected to Blynk.

Pete.

In the iOS, my ESP32 board was supposed to work as an AP and a device something named “Blynk-Device-1234” was supposed to appear for the connection. But I cant find anything like this.
not to mention my smartphone and ESP32 was very close to the router and i also cleared the EEPROM of ESP32 before uploading the Edgent code.

How did you do this?

As you can see from your latest serial output, the device is fully provisioned with Wifi name, password and Auth token, and is connected to the Blynk server, so either you didn’t clear these settings or you re-provisioned the device since the upload.

I don’t really understand why you need to re-provision the device again.

Pete.