Edgent_ESP32 example not connecting to Blynk with error

Hi all,

First, I tried solution here (Blynk.cloud:443 secure connection failed error 702) but still does not work for me

I had been working with old blynk version without any issue. My blynk project with ESP8266 works (both old and new Blynk) without any issue, but I have issue with Edgent_ESP32 example. I have error as below after provided Wifi SSID and password:

21:46:11.331 → [136733] Connecting to blynk.cloud:443
21:46:11.613 → [136989] Secure connection failed
21:46:16.354 → [141739] Connecting to blynk.cloud:443
21:46:16.585 → [141960] Secure connection failed

I have tried many ways including upgraded to newest Blynk, reinstall Arduino to latest release then install fresh libraries including Blynk library, but no luck :).

Project info.:
• Hardware model + communication type: ESP32
• Smartphone OS (iOS or Android) + version: iOS 15.2.1
• Blynk server or local server
• Blynk Library version: 1.0.1

My code is very simple as the example (no changed except BLYNK_TEMPLATE_ID and BLYNK_DEVICE_NAME). This template ID and device name has been used and worked before but I did some update so I started the project again then shit happened :).

Hope to get help from everyone :slight_smile:



// Fill-in information from your Blynk Template here
#define BLYNK_TEMPLATE_ID "TMPLK4-xxxxx"
#define BLYNK_DEVICE_NAME "xxxxxxxxxx"

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

You have no board type defined, so does the custom board configuration in Settings.h match your board as far as LED and button settings are concerned?

What does your serial monitor show when you try to clear the saved configuration with a 10 second button press, and during the subsequent re-provisioning?

Pete.

Did you use the blynk library from Arduino manager or github.

Yes, I installed from Arduino lib. manager :slight_smile:

I have uncomment my board (in Adgent_ESP32.ino) as below:

// Uncomment your board, or configure a custom board in Settings.h
#define USE_WROVER_BOARD
//#define USE_TTGO_T7

Then this is serial console output:

[273419] Sending board info…
[277987] Scanning networks…
[283309] Found networks: 12
[325440] Applying configuration…
[325440] WiFi SSID: VNNO Pass: MyWifiPass
[325440] Blynk cloud: pP1BLLzfWaiaa7y8-l8SF6ZwtPN7Z039 @ blynk.cloud:443
[325454] CONFIGURING => SWITCH_TO_STA
[325456] Switching to STA…
[326612] SWITCH_TO_STA => CONNECTING_NET
[326612] Connecting to WiFi: VNNO
[331210] Using Dynamic IP: 192.168.1.128
[331210] CONNECTING_NET => CONNECTING_CLOUD
[331220] Connecting to blynk.cloud:443
[331467] Secure connection failed
[336227] Connecting to blynk.cloud:443
[336493] Secure connection failed
[341233] Connecting to blynk.cloud:443
[341473] Secure connection failed
[346235] Connecting to blynk.cloud:443
[346469] Secure connection failed
[351239] Connecting to blynk.cloud:443
[351541] Secure connection failed
[356241] Connecting to blynk.cloud:443
[356558] Secure connection failed
[361218] Timeout
[361218] Last error code: 702
[361219] Configuration stored to flash
[361220] CONNECTING_CLOUD => ERROR
[371220] Restarting after error.

Answering that question would be useful.

Pete.

Yes, my serial monitor show result as my previous post.

How “subsequent re-provisioning” messages look like :)?

Just delete that library and use the one on github. The library was tweaked a bit recently yet the arduino library manager still installs an older one.

If you have the serial monitor open when you press the button for 10 seconds you should see a message about the credentials being cleared.
There is no message, so either you haven’t answered my question fully, or the button pin is wrong in the Settings.h file.

Pete.

I don’t understand your question.
The example is in the Blynk examples folder of the IDE, and you need to add-in your BLYNK_TEMPLATE_ID and BLYNK_DEVICE_NAME then configure the correct settings for your board.

This is done by un-commenting one of the pre-defined board types, or leaving them commented-out and editing custom board type in the Settings.h file.
Whichever approach you take, the Settings.h file needs to reflect the correct settings for the LED and push button switch connected to your board. Most boards have built-in LEDs that can be controlled via a GPIO and an onboard Flash button (not the RST button). If your board doesn’t then you need to add your own, and configure the Settings.h file to match the connections you’ve used.

Pete.

Actually I have pushed the BOOT button on my ESP32 dev board to clear all password from my Blynk previous project (I developed my previous Blynk project with Blynk lib rev. 1.0.0).

I saw that the message showing that the credentials has been cleared. Since it has been cleared so I cannot see the same message again but only like this for now (nothing happened if I press BOOT button now)

load:0x40078000,len:13508
load:0x40080400,len:3604
entry 0x400805f0

*>[213] *

  • ___ __ __*
  • / _ )/ /_ _____ / /__*
  • / _ / / // / _ / '_/*
  • ///_, /////_*
  •    /___/ v1.0.1 on ESP32*
    

[223] --------------------------
[224] Product: BasementESP32
[224] Firmware: 0.1.0 (build Feb 7 2022 20:43:18)
[234] Device: ESP32 @ 240MHz
[234] MAC: AC:67:B2:35:B4:18
[234] Flash: 4096K
[235] ESP sdk: v4.4-beta1-189-ga79dc75f0a
[245] Chip rev: 1
[245] Free mem: 261428
[245] --------------------------
[246] INIT => WAIT_CONFIG
[2854] AP SSID: Blynk BasementESP32-1BB09
[2854] AP IP: 192.168.4.1
[2855] AP URL: blynk.setup

I have reinstalled Arduino IDE with all new libraries including only newest Blynk (1.0.1) then open the example. So this example is from Newest Blynk 1.0.1 lib, not from previous Blynk lib.

Do you have any example working for you? I have ordered my ESP32 DEV board from here (30 pins): ESP 32S ESP WROOM 32 ESP32 ESP 32 Bluetooth and WIFI Dual Core CPU with Low Power Consumption MCU ESP32 CAM OV2640 Camera Module|Integrated Circuits| - AliExpress

Maybe I should use esptool to erase my ESP32 flash :)? I am going to do it anyway

The device is now awaiting provisioning.
Open the app and hit the three horizontal lines in the top right of the screen then + Add Device.
Follow the on-screen instructions and the device will connect and appear in your app and web console (provided you enter the correct WiFi credentials).

Pete.

Yes, of course I have follow your steps so that in the serial log, it shows all steps with info about my Wifi SSID and Password provided. I have done these steps successfully for my ESP8266 and previous Blynk rev. (1.0.0) without any issue.

I have erased my ESP32 Dev board with esptool and still received message as below after selecting my Wifi SSID (VNNO) and entering password (I changed the password in the text below for security reason). Any thing that I should do next? Thanks again for your help so far.

ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_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:1324
ho 0 tail 12 room 4
load:0x40078000,len:13508
load:0x40080400,len:3604
entry 0x400805f0
[210] Using default config.

*>[210] *

  • ___ __ __*
  • / _ )/ /_ _____ / /__*
  • / _ / / // / _ / '_/*
  • ///_, /////_*
  •    /___/ v1.0.1 on ESP32*
    

[220] --------------------------
[221] Product: BasementESP32
[221] Firmware: 0.1.0 (build Feb 7 2022 21:21:07)
[231] Device: ESP32 @ 240MHz
[231] MAC: AC:67:B2:35:B4:18
[231] Flash: 4096K
[242] ESP sdk: v4.4-beta1-189-ga79dc75f0a
[242] Chip rev: 1
[242] Free mem: 261452
[242] --------------------------
[253] INIT => WAIT_CONFIG
[2861] AP SSID: Blynk BasementESP32-1BB09
[2861] AP IP: 192.168.4.1
[2862] AP URL: blynk.setup
[16415] WAIT_CONFIG => CONFIGURING
[20246] Sending board info…
[20373] Scanning networks…
[25295] Found networks: 3
[40013] Applying configuration…
[40013] WiFi SSID: VNNO Pass: MyPassword
[40013] Blynk cloud: wvO2wJKbiZB853LrD1e1zAdDCYbE1pyy @ blynk.cloud:443
[40027] CONFIGURING => SWITCH_TO_STA
[40029] Switching to STA…
[41187] SWITCH_TO_STA => CONNECTING_NET
[41187] Connecting to WiFi: VNNO
[46151] Using Dynamic IP: 192.168.1.130
[46151] CONNECTING_NET => CONNECTING_CLOUD
[46161] Connecting to blynk.cloud:443
[46429] Secure connection failed
[51169] Connecting to blynk.cloud:443
[51396] Secure connection failed
[56176] Connecting to blynk.cloud:443
[56403] Secure connection failed
[61183] Connecting to blynk.cloud:443
[61412] Secure connection failed
[66192] Connecting to blynk.cloud:443
[66420] Secure connection failed
[71200] Connecting to blynk.cloud:443
[71428] Secure connection failed
[76158] Timeout
[76158] Last error code: 702
[76161] Configuration stored to flash
[76161] CONNECTING_CLOUD => ERROR

I am using Microsoft Teams, Teamviewer, Facebook messenger and available now. Is it possible for you to support via one of those :)?

I don’t provide support, other than via this forum.

It’s also very difficult to help you if you keep writing random responses that aren’t related to the things that I write.

My guess is that you are entering the wrong WiFi password.

Pete.

I believe that I tried and replied all your suggestions (except one asked for example that I supposed to ask [MrxMob](I replied his message).

I cannot provide wrong password because I created this and I have just re enter this password to this computer (after disconnecting it from the wifi) :slight_smile:

Show me where youve posted your serial monitor output which says that it has detected the button being pressed, and 10 seconds later clears the credentials andreboots the device and puts it into provisioning mode. I can’t see this.

Pete.

The board you say you’ve ordered is a WROOM and the board type you’ve un-commented is for a WROVER board, which has a button on GPIO15 and RGB LEDs on pins 0, 2 & 4 in the standard Settings.h file…

#if defined(USE_WROVER_BOARD)

  #define BOARD_BUTTON_PIN            15
  #define BOARD_BUTTON_ACTIVE_LOW     true

  #define BOARD_LED_PIN_R             0
  #define BOARD_LED_PIN_G             2
  #define BOARD_LED_PIN_B             4
  #define BOARD_LED_INVERSE           false
  #define BOARD_LED_BRIGHTNESS        128

I seriously doubt if your board has this configuration.

Pete.