Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

Commit

Permalink
v1.6.0 to use ESP8266 core v3.0.0
Browse files Browse the repository at this point in the history
### 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](esp8266/Arduino#7437)
3. Fix the `BLYNK_INFO_DEVICE`displaying 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-
  • Loading branch information
khoih-prog authored May 20, 2021
1 parent bbb0183 commit 089b453
Show file tree
Hide file tree
Showing 24 changed files with 164 additions and 34 deletions.
3 changes: 2 additions & 1 deletion examples/Async_AM2315_ESP32_SSL/Async_AM2315_ESP32_SSL.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases)
Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM)
Licensed under MIT license
Version: 1.5.0
Version: 1.6.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -24,6 +24,7 @@
Fix SSL issue with Blynk Cloud Server
1.4.1 K Hoang 24/04/2021 Fix issue of custom Blynk port (different from 8080 or 9443) not working on ESP32
1.5.0 K Hoang 25/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
1.6.0 K Hoang 19/05/2021 Fix AP connect and SSL issues caused by breaking ESP8266 core v3.0.0
********************************************************************************************************************************/

#include "defines.h"
Expand Down
18 changes: 16 additions & 2 deletions examples/Async_AM2315_ESP8266/Async_AM2315_ESP8266.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases)
Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM)
Licensed under MIT license
Version: 1.5.0
Version: 1.6.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -24,11 +24,24 @@
Fix SSL issue with Blynk Cloud Server
1.4.1 K Hoang 24/04/2021 Fix issue of custom Blynk port (different from 8080 or 9443) not working on ESP32
1.5.0 K Hoang 25/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
1.6.0 K Hoang 19/05/2021 Fix AP connect and SSL issues caused by breaking ESP8266 core v3.0.0
********************************************************************************************************************************/

#include "defines.h"

#include <Ticker.h>
///////////////////////////////////////////////////////////////////
#if ( USING_ESP8266_CORE_VERSION >= 30000 )
// Only to deal with ESP8266 core v3.0.0 warning in Ticker library
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"

#include <Ticker.h>
#pragma GCC diagnostic pop
#else
#include <Ticker.h>
#endif
///////////////////////////////////////////////////////////////////

#include <Wire.h>
#include <Adafruit_AM2315.h> // To install Adafruit AM2315 library

Expand Down Expand Up @@ -143,6 +156,7 @@ void setup()
#endif

#if USE_BLYNK_WM
Serial.println(ESP8266_CORE_VERSION);
Serial.println(BLYNK_ASYNC_WM_VERSION);
Serial.println(ESP_DOUBLE_RESET_DETECTOR_VERSION);
#endif
Expand Down
7 changes: 6 additions & 1 deletion examples/Async_Blynk_WM_Template/Async_Blynk_WM_Template.ino
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases)
Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM)
Licensed under MIT license
Version: 1.5.0
Version: 1.6.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
Fix SSL issue with Blynk Cloud Server
1.4.1 K Hoang 24/04/2021 Fix issue of custom Blynk port (different from 8080 or 9443) not working on ESP32
1.5.0 K Hoang 25/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
1.6.0 K Hoang 19/05/2021 Fix AP connect and SSL issues caused by breaking ESP8266 core v3.0.0
********************************************************************************************************************************/

// Sketch uses Arduino IDE-selected ESP32 and ESP8266 to select compile choices
Expand Down Expand Up @@ -524,6 +525,10 @@ bool heartbeatLEDon = false; // this lets me use the same routine for the turn-o
Serial.println();

#if USE_WM
#if ESP8266
Serial.println(ESP8266_CORE_VERSION);
#endif

Serial.println(BLYNK_ASYNC_WM_VERSION);
Serial.println(ESP_DOUBLE_RESET_DETECTOR_VERSION);
#endif
Expand Down
3 changes: 2 additions & 1 deletion examples/Async_DHT11ESP32/Async_DHT11ESP32.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases)
Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM)
Licensed under MIT license
Version: 1.5.0
Version: 1.6.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -24,6 +24,7 @@
Fix SSL issue with Blynk Cloud Server
1.4.1 K Hoang 24/04/2021 Fix issue of custom Blynk port (different from 8080 or 9443) not working on ESP32
1.5.0 K Hoang 25/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
1.6.0 K Hoang 19/05/2021 Fix AP connect and SSL issues caused by breaking ESP8266 core v3.0.0
********************************************************************************************************************************/

#include "defines.h"
Expand Down
3 changes: 2 additions & 1 deletion examples/Async_DHT11ESP32_SSL/Async_DHT11ESP32_SSL.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases)
Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM)
Licensed under MIT license
Version: 1.5.0
Version: 1.6.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -24,6 +24,7 @@
Fix SSL issue with Blynk Cloud Server
1.4.1 K Hoang 24/04/2021 Fix issue of custom Blynk port (different from 8080 or 9443) not working on ESP32
1.5.0 K Hoang 25/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
1.6.0 K Hoang 19/05/2021 Fix AP connect and SSL issues caused by breaking ESP8266 core v3.0.0
********************************************************************************************************************************/

#include "defines.h"
Expand Down
18 changes: 16 additions & 2 deletions examples/Async_DHT11ESP8266/Async_DHT11ESP8266.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases)
Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM)
Licensed under MIT license
Version: 1.5.0
Version: 1.6.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -24,11 +24,24 @@
Fix SSL issue with Blynk Cloud Server
1.4.1 K Hoang 24/04/2021 Fix issue of custom Blynk port (different from 8080 or 9443) not working on ESP32
1.5.0 K Hoang 25/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
1.6.0 K Hoang 19/05/2021 Fix AP connect and SSL issues caused by breaking ESP8266 core v3.0.0
********************************************************************************************************************************/

#include "defines.h"

#include <Ticker.h>
///////////////////////////////////////////////////////////////////
#if ( USING_ESP8266_CORE_VERSION >= 30000 )
// Only to deal with ESP8266 core v3.0.0 warning in Ticker library
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"

#include <Ticker.h>
#pragma GCC diagnostic pop
#else
#include <Ticker.h>
#endif
///////////////////////////////////////////////////////////////////

#include <DHT.h> // https://github.com/adafruit/DHT-sensor-library

DHT dht(DHT_PIN, DHT_TYPE);
Expand Down Expand Up @@ -128,6 +141,7 @@ void setup()
#endif

#if USE_BLYNK_WM
Serial.println(ESP8266_CORE_VERSION);
Serial.println(BLYNK_ASYNC_WM_VERSION);
Serial.println(ESP_DOUBLE_RESET_DETECTOR_VERSION);
#endif
Expand Down
18 changes: 16 additions & 2 deletions examples/Async_DHT11ESP8266_Debug/Async_DHT11ESP8266_Debug.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases)
Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM)
Licensed under MIT license
Version: 1.5.0
Version: 1.6.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -24,10 +24,23 @@
Fix SSL issue with Blynk Cloud Server
1.4.1 K Hoang 24/04/2021 Fix issue of custom Blynk port (different from 8080 or 9443) not working on ESP32
1.5.0 K Hoang 25/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
1.6.0 K Hoang 19/05/2021 Fix AP connect and SSL issues caused by breaking ESP8266 core v3.0.0
********************************************************************************************************************************/
#include "defines.h"

#include <Ticker.h>
///////////////////////////////////////////////////////////////////
#if ( USING_ESP8266_CORE_VERSION >= 30000 )
// Only to deal with ESP8266 core v3.0.0 warning in Ticker library
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"

#include <Ticker.h>
#pragma GCC diagnostic pop
#else
#include <Ticker.h>
#endif
///////////////////////////////////////////////////////////////////

#include <DHT.h> // https://github.com/adafruit/DHT-sensor-library

DHT dht(DHT_PIN, DHT_TYPE);
Expand Down Expand Up @@ -128,6 +141,7 @@ void setup()
#endif

#if USE_BLYNK_WM
Serial.println(ESP8266_CORE_VERSION);
Serial.println(BLYNK_ASYNC_WM_VERSION);
Serial.println(ESP_DOUBLE_RESET_DETECTOR_VERSION);
#endif
Expand Down
18 changes: 16 additions & 2 deletions examples/Async_DHT11ESP8266_SSL/Async_DHT11ESP8266_SSL.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases)
Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM)
Licensed under MIT license
Version: 1.5.0
Version: 1.6.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -24,11 +24,24 @@
Fix SSL issue with Blynk Cloud Server
1.4.1 K Hoang 24/04/2021 Fix issue of custom Blynk port (different from 8080 or 9443) not working on ESP32
1.5.0 K Hoang 25/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
1.6.0 K Hoang 19/05/2021 Fix AP connect and SSL issues caused by breaking ESP8266 core v3.0.0
********************************************************************************************************************************/

#include "defines.h"

#include <Ticker.h>
///////////////////////////////////////////////////////////////////
#if ( USING_ESP8266_CORE_VERSION >= 30000 )
// Only to deal with ESP8266 core v3.0.0 warning in Ticker library
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"

#include <Ticker.h>
#pragma GCC diagnostic pop
#else
#include <Ticker.h>
#endif
///////////////////////////////////////////////////////////////////

#include <DHT.h> // https://github.com/adafruit/DHT-sensor-library

DHT dht(DHT_PIN, DHT_TYPE);
Expand Down Expand Up @@ -128,6 +141,7 @@ void setup()
#endif

#if USE_BLYNK_WM
Serial.println(ESP8266_CORE_VERSION);
Serial.println(BLYNK_ASYNC_WM_VERSION);
Serial.println(ESP_DOUBLE_RESET_DETECTOR_VERSION);
#endif
Expand Down
3 changes: 2 additions & 1 deletion examples/Async_ESP32WM_Config/Async_ESP32WM_Config.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases)
Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM)
Licensed under MIT license
Version: 1.5.0
Version: 1.6.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -24,6 +24,7 @@
Fix SSL issue with Blynk Cloud Server
1.4.1 K Hoang 24/04/2021 Fix issue of custom Blynk port (different from 8080 or 9443) not working on ESP32
1.5.0 K Hoang 25/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
1.6.0 K Hoang 19/05/2021 Fix AP connect and SSL issues caused by breaking ESP8266 core v3.0.0
********************************************************************************************************************************/

#include "defines.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases)
Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM)
Licensed under MIT license
Version: 1.5.0
Version: 1.6.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -24,6 +24,7 @@
Fix SSL issue with Blynk Cloud Server
1.4.1 K Hoang 24/04/2021 Fix issue of custom Blynk port (different from 8080 or 9443) not working on ESP32
1.5.0 K Hoang 25/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
1.6.0 K Hoang 19/05/2021 Fix AP connect and SSL issues caused by breaking ESP8266 core v3.0.0
********************************************************************************************************************************/

#include "defines.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases)
Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM)
Licensed under MIT license
Version: 1.5.0
Version: 1.6.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -24,6 +24,7 @@
Fix SSL issue with Blynk Cloud Server
1.4.1 K Hoang 24/04/2021 Fix issue of custom Blynk port (different from 8080 or 9443) not working on ESP32
1.5.0 K Hoang 25/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
1.6.0 K Hoang 19/05/2021 Fix AP connect and SSL issues caused by breaking ESP8266 core v3.0.0
********************************************************************************************************************************/

#include "defines.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases)
Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM)
Licensed under MIT license
Version: 1.5.0
Version: 1.6.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -24,6 +24,7 @@
Fix SSL issue with Blynk Cloud Server
1.4.1 K Hoang 24/04/2021 Fix issue of custom Blynk port (different from 8080 or 9443) not working on ESP32
1.5.0 K Hoang 25/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
1.6.0 K Hoang 19/05/2021 Fix AP connect and SSL issues caused by breaking ESP8266 core v3.0.0
********************************************************************************************************************************/

#include "defines.h"
Expand Down
18 changes: 16 additions & 2 deletions examples/Async_ESP8266WM_Config/Async_ESP8266WM_Config.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Based on and modified from Blynk library v0.6.1 (https://github.com/blynkkk/blynk-library/releases)
Built by Khoi Hoang (https://github.com/khoih-prog/Blynk_Async_WM)
Licensed under MIT license
Version: 1.5.0
Version: 1.6.0
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -24,13 +24,26 @@
Fix SSL issue with Blynk Cloud Server
1.4.1 K Hoang 24/04/2021 Fix issue of custom Blynk port (different from 8080 or 9443) not working on ESP32
1.5.0 K Hoang 25/04/2021 Enable scan of WiFi networks for selection in Configuration Portal
1.6.0 K Hoang 19/05/2021 Fix AP connect and SSL issues caused by breaking ESP8266 core v3.0.0
********************************************************************************************************************************/

#include "defines.h"
#include "Credentials.h"
#include "dynamicParams.h"

#include <Ticker.h>
///////////////////////////////////////////////////////////////////
#if ( USING_ESP8266_CORE_VERSION >= 30000 )
// Only to deal with ESP8266 core v3.0.0 warning in Ticker library
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"

#include <Ticker.h>
#pragma GCC diagnostic pop
#else
#include <Ticker.h>
#endif
///////////////////////////////////////////////////////////////////

#include <DHT.h> // https://github.com/adafruit/DHT-sensor-library

DHT dht(DHT_PIN, DHT_TYPE);
Expand Down Expand Up @@ -135,6 +148,7 @@ void setup()
Serial.print(F(" without SSL on ")); Serial.println(ARDUINO_BOARD);
#endif

Serial.println(ESP8266_CORE_VERSION);
Serial.println(BLYNK_ASYNC_WM_VERSION);
Serial.println(ESP_DOUBLE_RESET_DETECTOR_VERSION);

Expand Down
4 changes: 2 additions & 2 deletions examples/Async_ESP8266WM_Config/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@
//////////////////////////////////////////
// Those above #define's must be placed before #include <BlynkSimpleEsp8266_Async_WM.h>

//#define USE_SSL true
#define USE_SSL false
#define USE_SSL true
//#define USE_SSL false

#if USE_SSL
#include <BlynkSimpleEsp8266_SSL_Async_WM.h> //https://github.com/khoih-prog/Blynk_Async_WM
Expand Down
Loading

0 comments on commit 089b453

Please sign in to comment.