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

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
### Major Releases v1.1.0

1. Restore support to Teensy boards, using only Teensy core v1.51 if Config Portal is needed.
2. Add STM32 emulated-EEPROM feature so that saving to EEPROM is usable and much faster.
3. Add functions to control Config Portal from software or Virtual Switches. Check [How to trigger a Config Portal from code #25](khoih-prog/Blynk_WM#25)
4. Renew all examples to demo the new Virtual ConfigPortal SW feature
5. Optimize code and fix many bugs.
  • Loading branch information
khoih-prog authored Jan 24, 2021
1 parent 39949ba commit f16a064
Show file tree
Hide file tree
Showing 42 changed files with 9,478 additions and 2,581 deletions.
22 changes: 11 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
## Contributing to Blynk_WiFiManager
## Contributing to Blynk_Esp8266AT_WM

### Reporting Bugs

Please report bugs in Blynk_WiFiManager if you find them.
Please report bugs in Blynk_Esp8266AT_WM if you find them.

However, before reporting a bug please check through the following:

* [Existing Open Issues](https://github.com/khoih-prog/Blynk_WM/issues) - someone might have already encountered this.
* [Existing Open Issues](https://github.com/khoih-prog/Blynk_Esp8266AT_WM/issues) - someone might have already encountered this.

If you don't find anything, please [open a new issue](https://github.com/khoih-prog/Blynk_WM/issues/new).
If you don't find anything, please [open a new issue](https://github.com/khoih-prog/Blynk_Esp8266AT_WM/issues/new).

### How to submit a bug report

Please ensure to specify the following:

* Arduino IDE version (e.g. 1.8.10) or Platform.io version
* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v2.6.3 or ESP32 v1.0.4)
* Arduino IDE version (e.g. 1.8.13) or Platform.io version
* `SAMD` Core Version (e.g. Arduino SAMD core v1.8.11, Adafruit SAMD core v1.6.4, Seeed Studio SAMD v1.8.1)
* Contextual information (e.g. what you were trying to achieve)
* Simplest possible steps to reproduce
* Anything that might be relevant in your opinion, such as:
Expand All @@ -26,10 +26,10 @@ Please ensure to specify the following:
### Example

```
Arduino IDE version: 1.8.10
ESP8266 Core Version 2.6.3
OS: Ubuntu 16.04 LTS
Linux Inspiron 4.4.0-170-generic #199-Ubuntu SMP Thu Nov 14 01:45:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Arduino IDE version: 1.8.13
Arduino SAMD Core Version 1.8.11
OS: Ubuntu 20.04 LTS
Linux xy-Inspiron-3593 5.4.0-51-generic #56-Ubuntu SMP Mon Oct 5 14:28:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Context:
The board couldn't autoreconnect to Local Blynk Server after router power recycling.
Expand All @@ -44,7 +44,7 @@ Steps to reproduce:
Feel free to post feature requests. It's helpful if you can explain exactly why the feature would be useful.
There are usually some outstanding feature requests in the [existing issues list](https://github.com/khoih-prog/Blynk_WM/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), feel free to add comments to them.
There are usually some outstanding feature requests in the [existing issues list](https://github.com/khoih-prog/Blynk_Esp8266AT_WM/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement), feel free to add comments to them.
### Sending Pull Requests
Expand Down
2,141 changes: 1,532 additions & 609 deletions README.md

Large diffs are not rendered by default.

104 changes: 69 additions & 35 deletions examples/Mega_ESP8266Shield/Mega_ESP8266Shield.ino
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
/****************************************************************************************************************************
Mega_ESP8266Shield.ino
For AVR Mega using ESP8266 WiFi Shield
Blynk_Esp8266AT_WM is a library for the Mega, Teensy, SAM DUE and SAMD boards (https://github.com/khoih-prog/Blynk_Esp8266AT_WM)
to enable easy configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
Version: 1.0.7
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 16/02/2020 Initial coding
1.0.1 K Hoang 17/02/2020 Add checksum, fix bug
1.0.2 K Hoang 22/02/2020 Add support to SAMD boards
1.0.3 K Hoang 03/03/2020 Add support to STM32 boards, except STM32F0
1.0.4 K Hoang 13/03/2020 Add SAM DUE support. Enhance GUI.
1.0.5 K Hoang 23/06/2020 Add Adafruit SAMD21/SAMD51 and nRF52 support, DRD, MultiWiFi features.
WPA2 SSID PW to 63 chars. Permit special chars such as !,@,#,$,%,^,&,* into data fields.
1.0.6 K Hoang 27/06/2020 Add ESP32-AT support and use ESP_AT_Lib. Enhance MultiWiFi connection logic.
1.0.7 K Hoang 27/07/2020 Add support to all STM32F/L/H/G/WB/MP1 and Seeeduino SAMD21/SAMD51 boards.
Mega_ESP8266Shield.ino
For AVR Mega using ESP8266 WiFi Shield
Blynk_Esp8266AT_WM is a library for the Mega, Teensy, SAM DUE and SAMD boards (https://github.com/khoih-prog/Blynk_Esp8266AT_WM)
to enable easy configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk
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_Esp8266AT_WM
Licensed under MIT license
Version: 1.1.0
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 16/02/2020 Initial coding
1.0.1 K Hoang 17/02/2020 Add checksum, fix bug
1.0.2 K Hoang 22/02/2020 Add support to SAMD boards
1.0.3 K Hoang 03/03/2020 Add support to STM32 boards, except STM32F0
1.0.4 K Hoang 13/03/2020 Add SAM DUE support. Enhance GUI.
1.0.5 K Hoang 23/06/2020 Add Adafruit SAMD21/SAMD51 and nRF52 support, DRD, MultiWiFi features.
WPA2 SSID PW to 63 chars. Permit special chars such as !,@,#,$,%,^,&,* into data fields.
1.0.6 K Hoang 27/06/2020 Add ESP32-AT support and use ESP_AT_Lib. Enhance MultiWiFi connection logic.
1.0.7 K Hoang 27/07/2020 Add support to all STM32F/L/H/G/WB/MP1 and Seeeduino SAMD21/SAMD51 boards.
1.1.0 K Hoang 15/01/2021 Restore support to Teensy to be used only with Teensy core v1.51.
*****************************************************************************************************************************/
/****************************************************************************************************************************
Important notes:
Expand All @@ -43,7 +44,7 @@
#define BLYNK_PRINT Serial

// Debug level, 0-3
#define BLYNK_WM_DEBUG 3
#define BLYNK_WM_DEBUG 1

#define USE_NEW_WEBSERVER_VERSION true //false
#define _ESP_AT_LOGLEVEL_ 0
Expand All @@ -56,6 +57,9 @@
#define ESP_AT_DEBUG true
#define ESP_AT_LIB_DEBUG true

/* Comment this out to disable prints and save space */
#define DRD_GENERIC_DEBUG true

// Uncomment to use ESP32-AT commands
//#define USE_ESP32_AT true

Expand Down Expand Up @@ -101,11 +105,11 @@

#if USE_LOCAL_SERVER
char auth[] = "****";
String BlynkServer = "account.duckdns.org";
//String BlynkServer = "192.168.2.112";
char BlynkServer[] = "account.duckdns.org";
//char BlynkServer[] = "192.168.2.112";
#else
char auth[] = "****";
String BlynkServer = "blynk-cloud.com";
char BlynkServer[] = "blynk-cloud.com";
#endif

#define BLYNK_SERVER_HARDWARE_PORT 8080
Expand All @@ -117,25 +121,52 @@
#endif

// SSID and PW for Config Portal
String portal_ssid = "CfgPrtl-SSID";
String portal_password = "CfgPrtl-PW";
char portal_ssid[] = "CfgPrtl-SSID";
char portal_password[] = "CfgPrtl-PW";

// Your Mega <-> ESP8266 baud rate:
#define ESP8266_BAUD 115200

ESP8266 wifi(&EspSerial);

void heartBeatPrint(void)
#define BLYNK_PIN_FORCED_CONFIG V10
#define BLYNK_PIN_FORCED_PERS_CONFIG V20

// Use button V10 (BLYNK_PIN_FORCED_CONFIG) to forced Config Portal
BLYNK_WRITE(BLYNK_PIN_FORCED_CONFIG)
{
if (param.asInt())
{
Serial.println( F("\nCP Button Hit. Rebooting") );

// This will keep CP once, clear after reset, even you didn't enter CP at all.
Blynk.resetAndEnterConfigPortal();
}
}

// Use button V20 (BLYNK_PIN_FORCED_PERS_CONFIG) to forced Persistent Config Portal
BLYNK_WRITE(BLYNK_PIN_FORCED_PERS_CONFIG)
{
if (param.asInt())
{
Serial.println( F("\nPersistent CP Button Hit. Rebooting") );

// This will keep CP forever, until you successfully enter CP, and Save data to clear the flag.
Blynk.resetAndEnterConfigPortalPersistent();
}
}

void heartBeatPrint()
{
static int num = 1;

if (Blynk.connected())
{
Serial.print("B");
Serial.print(F("B"));
}
else
{
Serial.print("F");
Serial.print(F("F"));
}

if (num == 80)
Expand All @@ -145,7 +176,7 @@ void heartBeatPrint(void)
}
else if (num++ % 10 == 0)
{
Serial.print(" ");
Serial.print(F(" "));
}
}

Expand All @@ -171,7 +202,10 @@ void setup()
Serial.begin(115200);
while (!Serial);

Serial.println("\nStart Mega_ESP8266Shield on " + String(BOARD_NAME));
delay(500);

Serial.print(F("\nStart Mega_ESP8266Shield on ")); Serial.println(BOARD_NAME);
Serial.println(BLYNK_ESP8266AT_WM_VERSION);

// initialize serial for ESP module
EspSerial.begin(ESP8266_BAUD);
Expand All @@ -180,11 +214,11 @@ void setup()
Serial.println(F("Start Blynk_ESP8266AT_WM"));

// Optional to change default AP IP(192.168.4.1) and channel(10)
Blynk.setConfigPortalIP(IPAddress(192, 168, 120, 1));
//Blynk.setConfigPortalIP(IPAddress(192, 168, 120, 1));
// Personalized portal_ssid and password
Blynk.setConfigPortal(portal_ssid, portal_password);
//Blynk.setConfigPortal("Mega_WM", "MyMega_PW");
Blynk.setConfigPortalChannel(2);
Blynk.setConfigPortalChannel(0);

Blynk.begin(wifi);
#else
Expand Down
65 changes: 29 additions & 36 deletions examples/SAMD_ESP8266Shield/Credentials.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
/****************************************************************************************************************************
Credentials.h for SAMD_ESP8266Shield.ino
Blynk_Esp8266AT_WM is a library for the Mega, Teensy, SAM DUE and SAMD boards (https://github.com/khoih-prog/Blynk_Esp8266AT_WM)
to enable easy configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk
Forked from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_WM
Licensed under MIT license
Version: 1.0.7
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 16/02/2020 Initial coding
1.0.1 K Hoang 17/02/2020 Add checksum, fix bug
1.0.2 K Hoang 22/02/2020 Add support to SAMD boards
1.0.3 K Hoang 03/03/2020 Add support to STM32 boards, except STM32F0
1.0.4 K Hoang 13/03/2020 Add SAM DUE support. Enhance GUI.
1.0.5 K Hoang 23/06/2020 Add Adafruit SAMD21/SAMD51 and nRF52 support, DRD, MultiWiFi features.
WPA2 SSID PW to 63 chars. Permit special chars such as !,@,#,$,%,^,&,* into data fields.
1.0.6 K Hoang 27/06/2020 Add ESP32-AT support and use ESP_AT_Lib. Enhance MultiWiFi connection logic.
1.0.7 K Hoang 27/07/2020 Add support to all STM32F/L/H/G/WB/MP1 and Seeeduino SAMD21/SAMD51 boards.
Credentials.h for SAMD_ESP8266Shield.ino
Blynk_Esp8266AT_WM is a library for the Mega, Teensy, SAM DUE and SAMD boards (https://github.com/khoih-prog/Blynk_Esp8266AT_WM)
to enable easy configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk
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_Esp8266AT_WM
Licensed under MIT license
Version: 1.1.0
Version Modified By Date Comments
------- ----------- ---------- -----------
1.0.0 K Hoang 16/02/2020 Initial coding
1.0.1 K Hoang 17/02/2020 Add checksum, fix bug
1.0.2 K Hoang 22/02/2020 Add support to SAMD boards
1.0.3 K Hoang 03/03/2020 Add support to STM32 boards, except STM32F0
1.0.4 K Hoang 13/03/2020 Add SAM DUE support. Enhance GUI.
1.0.5 K Hoang 23/06/2020 Add Adafruit SAMD21/SAMD51 and nRF52 support, DRD, MultiWiFi features.
WPA2 SSID PW to 63 chars. Permit special chars such as !,@,#,$,%,^,&,* into data fields.
1.0.6 K Hoang 27/06/2020 Add ESP32-AT support and use ESP_AT_Lib. Enhance MultiWiFi connection logic.
1.0.7 K Hoang 27/07/2020 Add support to all STM32F/L/H/G/WB/MP1 and Seeeduino SAMD21/SAMD51 boards.
1.1.0 K Hoang 15/01/2021 Restore support to Teensy to be used only with Teensy core v1.51.
*****************************************************************************************************************************/

#ifndef Credentials_h
Expand Down Expand Up @@ -51,14 +52,12 @@ typedef struct Configuration
char header [16];
WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS];
char blynk_server [32];
int blynk_port;
char blynk_token [36];
char board_name [24];
int checkSum;
} Blynk_WF_Configuration;
*/

#define TO_LOAD_DEFAULT_CONFIG_DATA true
#define TO_LOAD_DEFAULT_CONFIG_DATA false //true

#if TO_LOAD_DEFAULT_CONFIG_DATA

Expand All @@ -72,27 +71,21 @@ Blynk_WF_Configuration defaultConfig =
{
//char header[16], dummy, not used
"SAMD_ESP_AT",

// WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS];
// WiFi_Credentials.wifi_ssid and WiFi_Credentials.wifi_pw
#if 1
"HueNet1", "jenniqqs",
"HueNet2", "jenniqqs",
"khoih.duckdns.org", "Tpn7l-k9_-Civ3cmKoQPJhBOEABeh5Sy",

//"realSSID", "realPass",
//"realSSID1", "realPass1",
#if 1
"realSSID", "realPass",
"realSSID1", "realPass1",
// Blynk_Creds : blynk_server and blynk_token
//"realServer.duckdns.org", "realToken",
"realServer.duckdns.org", "realToken",
#else
"SSID1", "password1",
"SSID2", "password2",
// Blynk_Creds : blynk_server and blynk_token
"account.ddns.net", "token",
#endif
//int blynk_port;
8080,
//char board_name [24];
"SAMD-ESP_AT",
#endif
// terminate the list
//int checkSum, dummy, not used
0
Expand Down
Loading

0 comments on commit f16a064

Please sign in to comment.