Blynk WiFiManager for ESP8266/ESP32 (including ESP32-S2, ESP32-C3) with Multi-WiFi and Multi-Blynk. Fix SSL issue for Blynk Cloud Server now

Notes from ESP8266 SSL connections down using Blynk_WiFiManager


This so-called "insecured mode"

  1. permits you to actually connect to a TLS server (port 443,9443, etc., especially with expired CA Certs such as Blynk Cloud). It won’t let you connect to plain non-SSL server because full encryption is still required.
  2. You never have to worry about CA Certs’ update and to include every trusted CA root certificate of every TLS server
  3. Still requires encryption. It just does not validate the certificate or fingerprint. Insecure because we could be subject to a MITM (Man-In-The-Middle) attack.
  4. It’s still much better than plain non-SSL mode which just communicates using no encryption at all.

So this is the much better choice.

1 Like

Thank you again @khoih .

The updated Blynk_WiFiManager works well for me with ‘standard’ ESP8266, SONOFF, and ESP32s (I like Adafruit’s). I did not like running all these devices unencrypted. I look forward to Blynk’s SSL implementation as they progress their beta into an official release.

With great appreciation.

1 Like

Updated April 25th 2021

Now you can enable scan of WiFi networks for selection in Configuration Portal and don’t have to input SSIDs manually

Major Releases v1.4.0

  1. Enable scan of WiFi networks for selection in Configuration Portal. Check PR for v1.3.0 - Enable scan of WiFi networks #10. Now you can select optional SCAN_WIFI_NETWORKS, MANUAL_SSID_INPUT_ALLOWED to be able to manually input SSID, not only from a scanned SSID lists and MAX_SSID_IN_LIST (from 2-15)
  2. Fix invalid “blank” Config Data treated as Valid.
  3. Permit optionally inputting one set of WiFi SSID/PWD by using REQUIRE_ONE_SET_SSID_PW == true
  4. Enforce WiFi PWD minimum length of 8 chars
  5. Minor enhancement to not display garbage when data is invalid

Releases v1.3.1

  1. Fix issue of custom Blynk port (different from 8080 or 9443) not working on ESP32. Check Custom Blynk port not working for BlynkSimpleEsp32_Async_WM.h #4
1 Like

Updated May 19th 2021

Major Releases v1.6.0

  1. Fix AP connect issue caused by breaking ESP8266 core v3.0.0. Caused by multiple core changes, but the new solution results a better and faster connection to AP.
  2. Fix SSL issue caused by breaking ESP8266 core v3.0.0. Now the better BearSSL is used in both ESP32 and ESP8266 to replace the ESP8266 deprecated axTLS. Check Remove axTLS from code and documentation #7437
  3. Fix the BLYNK_INFO_DEVICEdisplaying the generic ESP8266 board with Blynk logo. Caused by new ESP8266 core changes of build.board. For example from ESP8266_NODEMCU in core v2.7.4 to ESP8266_NODEMCU_ESP12E in core v3.0.0
  4. Fix many warnings only displayed in new core ESP8266 v3.0.0
  5. Make code compatible for either new ESP8266 core v3.0.0+ or ealier cores v2.7.4-

Releases v1.5.0

  1. Fix bug.
  2. Optimize and sync with Blynk_Async_WM library v1.5.0

ESP8266WM_MRD_Config using LITTLEFS with SSL on ESP8266_NODEMCU_ESP12E using new ESP8266 core v3.0.0

The following is the sample terminal output when running example ESP8266WM_MRD_Config on ESP8266_NODEMCU_ESP12E using new ESP8266 core v3.0.0

Starting ESP8266WM_MRD_Config using LittleFS with SSL on ESP8266_NODEMCU_ESP12E
ESP8266 core v3.0.0
Blynk_WM SSL for ESP8266 v1.6.0
ESP_MultiResetDetector v1.1.1
[274] Set CustomsStyle to : <style>div,input{padding:5px;font-size:1em;}input{width:95%;}body{text-align: center;}button{background-color:blue;color:white;line-height:2.4rem;font-size:1.2rem;width:100%;}fieldset{border-radius:0.3rem;margin:0px;}</style>
[296] Set CustomsHeadElement to : <style>html{filter: invert(10%);}</style>
[303] Set CORS Header to : Your Access-Control-Allow-Origin
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
No multiResetDetected, number of times = 1
LittleFS Flag read = 0xFFFE0001
Saving config file...
Saving config file OK
[337] Hostname=8266-Master-Controller
[349] LoadCfgFile 
[349] OK
[349] ======= Start Stored Config Data =======
[349] Hdr=SSL_ESP8266,BrdName=ESP32
[350] SSID=HueNet1,PW=password
[351] SSID1=HueNet2,PW1=password
[354] Server=account.duckdns.org,Token=token
[360] Server1=account.duckdns.org,Token1=token1
[366] Port=9443
[368] ======= End Config Data =======
[371] CCSum=0x3473,RCSum=0x3473
[376] LoadCredFile 
[376] CrR:pdata=default-mqtt-server,len=34
[380] CrR:pdata=1883,len=6
[382] CrR:pdata=default-mqtt-username,len=34
[386] CrR:pdata=default-mqtt-password,len=34
[390] CrR:pdata=default-mqtt-SubTopic,len=34
[394] CrR:pdata=default-mqtt-PubTopic,len=34
[398] OK
[399] CrCCsum=0x29a6,CrRCsum=0x29a6
[402] Valid Stored Dynamic Data
[405] Hdr=SSL_ESP8266,BrdName=ESP32
[408] SSID=HueNet1,PW=password
[411] SSID1=HueNet2,PW1=password
[414] Server=account.duckdns.org,Token=token
[420] Server1=account.duckdns.org,Token1=token1
[426] Port=9443
[428] ======= End Config Data =======
[431] Check if isForcedCP
[436] LoadCPFile 
[436] OK
[436] bg: noConfigPortal = true
[439] Connecting MultiWifi...
[5576] WiFi connected after time: 1
[5577] SSID: HueNet1, RSSI = -43
[5577] Channel: 2, IP address: 192.168.2.135
[5577] bg: WiFi OK. Try Blynk
[5578] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.6.1 on ESP8266_NODEMCU_ESP12E

[6592] NTP time: Thu May 20 02:13:51 2021
[6624] BlynkArduinoClient.connect: Connecting to account.duckdns.org:9443
[7360] Certificate OK
[7387] Ready (ping: 20ms).
[7457] Connected to Blynk Server = account.duckdns.org, Token = token
[7458] bg: WiFi+Blynk OK

Blynk ESP8288 using LittleFS connected.
Board Name : ESP8266
B
Your stored Credentials :
MQTT Server = default-mqtt-server
Port = 1883
MQTT UserName = default-mqtt-username
MQTT PWD = default-mqtt-password
Subs Topics = default-mqtt-SubTopic
Pubs Topics = default-mqtt-PubTopic
Stop multiResetDetecting
Saving config file...
Saving config file OK
BBBBBRBBBB BBRBBBBBBRBB BBBBRBBBBBB
2 Likes

Good day.

I am using BlynkSimpleEsp32_WM.h v1.6.1 and is not very strong in all C ++ syntax yet, can anyone tell me. How can I track the enable status of ConfigPortal after executing Blynk.begin() ? I tried to make the noConfigPortal variable global, but it is overridden in the BlynkSimpleEsp32_WM.h code as local … Even if we remove the bool :frowning:

Add BlynkSimpleEsp32_WM.h:

...
class BlynkWifi
  : public BlynkProtocol<BlynkArduinoClient>
{
    typedef BlynkProtocol<BlynkArduinoClient> Base;
  public:
     BlynkWifi(BlynkArduinoClient& transp)
      : Base(transp)
    {}

  public:
     bool noConfigPortal;
... 

Error:

...error: 'noConfigPortal' was not declared in this scope Serial.printf("\n\n flag CP = %d\n", noConfigPortal);

Working with the example ESP32WM_Config.ino

P.S. I need it to display the status on the LCD display.

Hi! I have been used your lib Blynk_wm. But i got a debug. After few minutes my Serial in Arduino display: lost connect blynk. Connecting to blynk sever:8080 … and then blynk not connected. Solve that for me! Thanks.