Unable to use Blynk.edgent + BlynkSimpleEsp32.h in esp32

Hi, i’m having a bit of trouble with Blynk.edgent + esp32( i’ve already read every post related but couldn´t make progress). Starting from the thing that worked well:
i could upload Edgent_ESP32 example and worked well.
I could add a new device from the Blynk app.
i have Settings.h with correct led and button pin assigments

The problem starts when i want to mix Blynk.edgent with my original code. The original code works perfect with BlynkSimpleEsp32.h. At the moment i wanted to add edgent, it does not compile if i dont use BlynkSimpleEsp32_SSL.h. when compile, i see in the serial monitor the error:

*wm:[2] [EVENT] WIFI_REASON: 200
[72060] Connecting to blynk.cloud:443
[72060] Secure connection failed
*wm:[2] [EVENT] WIFI_REASON: 201

I’ve worked with edgent + esp8266 and i didnt have any problem, but working with esp32 i cant make it.
I’ll apreaciate any help. Thanks in advance

So are you saying that you’re replacing #include <BlynkSimpleEsp32_SSL.h> in the BlynkEdgent.h tab with BlynkSimpleEsp32.h ?

If so, why?


Hi Pete.
If i use #include <BlynkSimpleEsp32_SSL.h>, i get this error:

**[72060] Connecting to blynk.cloud:443**
**[72060] Secure connection failed**

if i use BlynkSimpleEsp32.h i get this error:

 Connecting to blynk.cloud:443
[44693] Timeout
Current time: 10:1:48 2022 3 17
[54703] Restarting after error.

So, how i can solve this problem? .Also i would like to ask if i add Blynk.edgent to my original code, do i have to delete Blynk.run() and Blynk.begin(auth, ssid, pass)?

I really apreciate your repply Pete. Thanks

You haven’t answered this simple question…

Yes - but in reality you will be adding your original code to the Blynk Edgent example, not the other way around.

I’d suggest that you answer my question, then post the .ino file from your sketch (correctly formatted with triple backticks at the beginning and end. Triple backticks look like this…

Also, if you’ve changed any of the Blynk Edgent example code in the .h tabs (which is a very bad idea - other than the Settings.h tab) then post details of the changes you’ve made.


In response to your question, yes i tried to change those libraries in the .h tab.
The problem seems to be using BlynkSimpleEsp32_SSL.h with Esp32, it seems incompatible according to some reading.
So Pete to make things clear, my problem is how to use #include <BlynkSimpleEsp32_SSL.h> with Esp32 to avoid this error:
[72060] Connecting to blynk.cloud:443
[72060] Secure connection failed

after solving that issue, i think adding Blynk.edgent would be easier.

The standard Blynk Edgent ESP32 example, which uses the BlynkSimpleEsp32_SSL.h library works perfectly with all of the ESP32 boards that I’ve tried it with, and there are many other members of the community that are using it without any problems.

Would you like to share links to this source?

I’d suggest you start by using the Edgent example without any modifications, other than adding-in your Template ID and Device Name info from the template configuration page of the web portal, and un-commenting a an appropriate board type or modifying the default configuration in Settings.h to match your board.

If that doesn’t work then check that you are using the latest ESP32 core then share details of your .ino and Settings.h file, along with details of your actual board type and what you see in the serial monitor from boot-up.
When you share serial monitor output please use triple backticks at the beginning and end, just the same as when you post your sketch.


Hi Pete, thanks for your advice, i made a lot of progress and found out what causes the issue.
My conclusion is that if i use BlynkSimpleEsp32_SSL.h and BluetoothSerial.h there is a conflict.
Reading those .h files (from https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/src/BluetoothSerial.h, and https://github.com/blynkkk/blynk-library/blob/master/src/BlynkSimpleEsp32_SSL.h) , i found out that both have the sentence o function bool connect(), so i suspect that there is the problem but i do not know how to solve it.

My conclusion is that using those .h in the same code makes conflict, but i understand that i cannot modify those files, so i need hel with that.

Thanks in advance

Okay, as this is the first time that you’ve mentioned Bluetooth it now starts to make sense.

I’m not sure what you’re hoping to achieve with this combination of WiFi and Bluetooth running at the same time on the same device, but I doubt that you’ll be successful without quite a bit of work.
You may need to have the two processes running on different cores of the device, but I think you’re on your own with that degree of customisation.


Thanks for the reply. I am using a Bluetooth thermal printer connected to Blynk, that is the reason to use both Wifi and Bluetooth. If i use BlynkSimpleEsp32.h and BluetoothSerial.h , everything works perfectly, but i want to add Blynk.edgent() that uses BlynkSimpleEsp32_SSL, so that is the issue.
So, any idea how to do it? You say that:

How can i do that?
If you have any other idea to implement i´ll listen.

Thanks Pete

I will post a new topic because its title is not related to my problem. Thanks