SSL Certificate Problem on ESP8266

Hello!

I have a strange behaviour with blink server and my internet connection.
The problem is the famous:

[171042] Connecting to blynk.cloud:443
[186139] Connection failed

I made a lot of test with multiple connection, device and secure.
I dont have any code to post because after reading a lot of topic I find the problem and it’s not my code (with Blynk.Edgent), the problem is SSL certificate or 443 port (i’m not really expert on secure web protocol).
For the test I use only examples of the Libraries in order to test only SSL connection and different device:

#include <BlynkSimpleEsp8266_SSL.h> //ESP8266_Standalone_SSL
//or:
#include <BlynkSimpleEsp8266.h> //ESP8266_Standalone
#include <BlynkSimpleEsp32_SSL.h> //ESP32_WiFi_SSL
//or:
#include <BlynkSimpleEsp32.h> //ESP32_WiFi

The result is display on this table:

image

I know… the problem seems to be the connection (ISP blocking etc etc)…
My question is:
Why don’t I have problems with ESP32? What is different between the two SSL functions?

P.S. I already try to reinstall blynk library (v1.3.0)

What versions of the ESP8266 core and ESP32 core do you have installed (Tools > Board > Boards Manager)

Why do you believe that this is a certificate issue?
Have you seen any serial monitor messages that mention certificates?

Can you explain more about the hardware you’re using - what type of phone and OS and what is the 4G dongle connected to?

Pete.

Hi Pete,

For ESP32: ESP32 Dev Module
For ESP8266: LOLIN (Wemos) D1 R1

Smartphone: Samsung Galaxy S23 on Hotspot mode.
WiFi dongle: Tenda 4G185 V3.0 Hotspot Mobile Router

image

To be onest I never see nothing related certificates… it is my deduction given by the fact that by changing the connection the problem disapper. I’m running out of ideas… if you have another idea to follow please route me.

Next step is to move the sim card from the dongle to the smartphone in order to understand if it’s an hardware prioblem or ISP problem (SIM card provider are not the same)… but the main question remain: Why on ESP32 everything go well with every connection?

That wasn’t the question I asked.
What ESP core versions do you see in BOARDS MANAGER…

Pete.

I’m sorry… made a mistake with translated version of arduino…

ESP32: 2.0.9
ESP8266: 3.1.2

I’m uploading the ESP32 in this moment… but the problem wasn’t on ESP32

You’ve mentioned Edgent, and posted 4 lines of code that you’ve tried.
Presumably these aren’t changes that you’ve made to the Edgent sketch, as changing ports in Edgent is more complex than that. Can you elaborate on your test setup?

Pete.

I try to explain… sorry for my english

The orginal code was with blink edgent. The test was in order:

  • edgent dont work → lets try with normal blynk (work)
  • the problem is inside edgent → search on web and community
  • find someting related a certificate → retry with normal blynk and SSL (not work)
  • Try with my hotspot smartphone (I’m sure it’s working because I already use) → edgent and normal blynk SSL is working
  • Edgent work in SSL → edgent and normal blynk SSL not work → the dongle connection not support SSL for blynk

This was sad but make sense… then I try with ESP32 and all my idea was destroyed.

ESP32 work well on all case.

Your explanation is extremely ambiguous.

I’d suggest testing without using Edgent at all, and using a static provisioning sketch that you change to have the correct #includes for the board type you’re using.

What LwIP and SSL Support options are choosing in the IDE when you compile the ESP8266 sketch?

Pete.

1 Like

I know… it was ambiguous also for me… :slight_smile: it’s very complicated to explain hours of test in a text and not in my native language.

Forget about edgent, I try this 2 simply code with no special parameter…


#define BLYNK_PRINT Serial
#define BLYNK_TEMPLATE_ID "xxxxxxxxx"
#define BLYNK_TEMPLATE_NAME "xxxxxxxxx"
#define BLYNK_AUTH_TOKEN "xxxxxxxxx"

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266_SSL.h>

char ssid[] = "xxxxxxxxx";
char pass[] = "xxxxxxxxx";

void setup()
{
  Serial.begin(9600);
  Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
}
void loop()
{
  Blynk.run();
}

#define BLYNK_PRINT Serial
#define BLYNK_TEMPLATE_ID "xxxxxxxxx"
#define BLYNK_TEMPLATE_NAME "xxxxxxxxx"
#define BLYNK_AUTH_TOKEN "xxxxxxxxx"

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char ssid[] = "xxxxxxxxx";
char pass[] = "xxxxxxxxx";

void setup()
{
  Serial.begin(9600);
  Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
}
void loop()
{
  Blynk.run();
}

Only the second code is working with the dongle.
If I change ssis and pass with my samrtphone hotspot everthing is working.

Did you try swapping SIM cards?

Pete.

Finally get new serious router and solve the problem… it was not a ISP problem.
Thanks for all

1 Like