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

Commit

Permalink
v1.9.2 to fix MultiWiFi and TLS
Browse files Browse the repository at this point in the history
### Releases v1.9.2

1. Fix MultiWiFi connection issue with ESP32 core v2.0.0-rc1+
2. Fix AsyncWebServer library compile error with ESP32 core v2.0.0-rc1+. Check [Fix compiler error for ESP32-C3 and mbed TLS v2.7.0+ #970](me-no-dev/ESPAsyncWebServer#970)
3. Verify compatibility with new ESP32 core v2.0.0-rc1+
4. Verify compatibility with new ESP8266 core v3.0.2
  • Loading branch information
khoih-prog authored Aug 2, 2021
1 parent fa245fc commit 96f9423
Show file tree
Hide file tree
Showing 35 changed files with 566 additions and 118 deletions.
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p

Please ensure to specify the following:

* Arduino IDE version (e.g. 1.8.13) or Platform.io version
* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v3.0.0 or ESP32 v1.0.6)
* Arduino IDE version (e.g. 1.8.15) or Platform.io version
* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v3.0.2 or ESP32 v1.0.6)
* 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.13
ESP8266 Core Version 3.0.0
Arduino IDE version: 1.8.15
ESP8266 Core Version 3.0.2
OS: Ubuntu 20.04 LTS
Linux xy-Inspiron-3593 5.4.0-73-generic #82-Ubuntu SMP Wed Apr 14 17:39:42 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Linux xy-Inspiron-3593 5.4.0-80-generic #90-Ubuntu SMP Fri Jul 9 22:49:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Context:
I encountered an endless loop while trying to connect to Local WiFi.
Expand Down
125 changes: 102 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* [Why Async is better](#why-async-is-better)
* [Currently supported Boards](#currently-supported-boards)
* [Changelog](#changelog)
* [Releases v1.9.2](#releases-v192)
* [Releases v1.9.1](#releases-v191)
* [Releases v1.9.0](#releases-v190)
* [Releases v1.8.1](#releases-v181)
Expand All @@ -41,6 +42,8 @@
* [Use Arduino Library Manager](#use-arduino-library-manager)
* [Manual Install](#manual-install)
* [VS Code & PlatformIO](#vs-code--platformio)
* [Libraries' Patches](#libraries-patches)
* [1. For ESPAsyncWebServer library](#1-for-espasyncwebserver-library)
* [HOWTO Install esp32 core for ESP32-S2 (Saola, AI-Thinker ESP-12K) and ESP32-C3 boards into Arduino IDE](#howto-install-esp32-core-for-esp32-s2-saola-ai-thinker-esp-12k-and-esp32-c3-boards-into-arduino-ide)
* [1. Save the original esp32 core](#1-save-the-original-esp32-core)
* [2. Install esp32 core v1.0.6](#2-install-esp32-core-v106)
Expand Down Expand Up @@ -166,6 +169,7 @@
* [9.1 DRD => Config Portal](#91-drd--config-portal)
* [9.2 Data Saved => Connect to WiFi with correct local time, TZ set and using NTP](#92-data-saved--connect-to-wifi-with-correct-local-time-tz-set-and-using-ntp)
* [9.3 Normal running with correct local time, TZ set and using NTP](#93-normal-running-with-correct-local-time-tz-set-and-using-ntp)
* [10. Async_ConfigOnDoubleReset_TZ on ESP32C3_DEV using SPIFFS](#10-async_configondoublereset_tz-on-esp32c3_dev-using-spiffs)
* [Debug](#debug)
* [Troubleshooting](#troubleshooting)
* [Issues](#issues)
Expand Down Expand Up @@ -227,6 +231,13 @@ This [**ESPAsync_WiFiManager** library](https://github.com/khoih-prog/ESPAsync_W

## Changelog

### Releases v1.9.2

1. Fix MultiWiFi connection issue with ESP32 core v2.0.0-rc1+
2. Fix AsyncWebServer library compile error with ESP32 core v2.0.0-rc1+. Check [Fix compiler error for ESP32-C3 and mbed TLS v2.7.0+ #970](https://github.com/me-no-dev/ESPAsyncWebServer/pull/970)
3. Verify compatibility with new ESP32 core v2.0.0-rc1+
4. Verify compatibility with new ESP8266 core v3.0.2

### Releases v1.9.1

1. Fix warnings and verify compatibility with new ESP8266 core v3.0.0
Expand Down Expand Up @@ -349,15 +360,16 @@ This [**ESPAsync_WiFiManager** library](https://github.com/khoih-prog/ESPAsync_W

## Prerequisites

1. [`Arduino IDE 1.8.13+` for Arduino](https://www.arduino.cc/en/Main/Software)
2. [`ESP8266 Core 3.0.0+`](https://github.com/esp8266/Arduino) for ESP8266-based boards. [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/)
1. [`Arduino IDE 1.8.15+` for Arduino](https://www.arduino.cc/en/Main/Software)
2. [`ESP8266 Core 3.0.2+`](https://github.com/esp8266/Arduino) for ESP8266-based boards. [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/)
3. [`ESP32 Core 1.0.6+`](https://github.com/espressif/arduino-esp32) for ESP32-based boards. [![Latest release](https://img.shields.io/github/release/espressif/arduino-esp32.svg)](https://github.com/espressif/arduino-esp32/releases/latest/)
4. [`ESP32-S2/C3 Core 1.0.6+`](https://github.com/espressif/arduino-esp32) for ESP32-S2/C3-based boards. Must follow [HOWTO Install esp32 core for ESP32-S2 (Saola, AI-Thinker ESP-12K) and ESP32-C3 boards into Arduino IDE](#howto-install-esp32-core-for-esp32-s2-saola-ai-thinker-esp-12k-and-esp32-c3-boards-into-arduino-ide).
5. [`ESPAsyncWebServer v1.2.3+`](https://github.com/me-no-dev/ESPAsyncWebServer) for all ESP32/ESP8266-based boards.
6. [`ESPAsyncTCP v1.2.2+`](https://github.com/me-no-dev/ESPAsyncTCP) for ESP8266-based boards.
7. [`AsyncTCP v1.1.1+`](https://github.com/me-no-dev/AsyncTCP) for ESP32-based boards
8. [`ESP_DoubleResetDetector v1.1.1+`](https://github.com/khoih-prog/ESP_DoubleResetDetector) if using DRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_DoubleResetDetector.svg?)](https://www.ardu-badge.com/ESP_DoubleResetDetector). Use v1.1.0+ if using LittleFS for EP32.
9. [`LittleFS_esp32 v1.0.6+`](https://github.com/lorol/LITTLEFS) for ESP32-based boards using LittleFS. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/LittleFS_esp32.svg?)](https://www.ardu-badge.com/LittleFS_esp32). **Notice**: This [`LittleFS_esp32 library`](https://github.com/lorol/LITTLEFS) has been integrated to Arduino [esp32 core v1.0.6](https://github.com/espressif/arduino-esp32/tree/master/libraries/LITTLEFS).
5. [`ESP32-S2/C3 Core 2.0.0-rc1+`](https://github.com/espressif/arduino-esp32) for ESP32-S2/C3-based boards to use experimental ESP32 core v2.0.0-rc1.
6. [`ESPAsyncWebServer v1.2.3+`](https://github.com/me-no-dev/ESPAsyncWebServer) for all ESP32/ESP8266-based boards. You'd better use the [forked ESPAsyncWebServer](https://github.com/khoih-prog/ESPAsyncWebServer) if the PR [Fix compiler error for ESP32-C3 and mbed TLS v2.7.0+ #970](https://github.com/me-no-dev/ESPAsyncWebServer/pull/970) hasn't been merged.
7. [`ESPAsyncTCP v1.2.2+`](https://github.com/me-no-dev/ESPAsyncTCP) for ESP8266-based boards.
8. [`AsyncTCP v1.1.1+`](https://github.com/me-no-dev/AsyncTCP) for ESP32-based boards
9. [`ESP_DoubleResetDetector v1.1.1+`](https://github.com/khoih-prog/ESP_DoubleResetDetector) if using DRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_DoubleResetDetector.svg?)](https://www.ardu-badge.com/ESP_DoubleResetDetector). Use v1.1.0+ if using LittleFS for EP32.
10. [`LittleFS_esp32 v1.0.6+`](https://github.com/lorol/LITTLEFS) for ESP32-based boards using LittleFS. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/LittleFS_esp32.svg?)](https://www.ardu-badge.com/LittleFS_esp32). **Notice**: This [`LittleFS_esp32 library`](https://github.com/lorol/LITTLEFS) has been integrated to Arduino [esp32 core v1.0.6](https://github.com/espressif/arduino-esp32/tree/master/libraries/LITTLEFS).

---

Expand All @@ -383,6 +395,22 @@ The best and easiest way is to use `Arduino Library Manager`. Search for `ESPAsy
---
---

---

### Libraries' Patches

#### 1. For ESPAsyncWebServer library

If you don't use the [forked ESPAsyncWebServer](https://github.com/khoih-prog/ESPAsyncWebServer), to fix [`ESPAsyncWebServer library`](https://github.com/me-no-dev/ESPAsyncWebServer) compile errors, just copy these following files into the [`ESPAsyncWebServer library`](https://github.com/me-no-dev/ESPAsyncWebServer) directory to overwrite the old files:
- [AsyncWebSocket.cpp](esp32c3_ESPAsyncWebServer_Patch/AsyncWebSocket.cpp)
- [WebAuthentication.cpp](esp32c3_ESPAsyncWebServer_Patch/WebAuthentication.cpp)


Check the PR [Fix compiler error for ESP32-C3 and mbed TLS v2.7.0+ #970](https://github.com/me-no-dev/ESPAsyncWebServer/pull/970)

---
---

## HOWTO Install esp32 core for ESP32-S2 (Saola, AI-Thinker ESP-12K) and ESP32-C3 boards into Arduino IDE


Expand Down Expand Up @@ -2383,7 +2411,7 @@ ESPAsync_wifiManager.setRemoveDuplicateAPs(false);
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
#endif

#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.1"
#define ESP_ASYNC_WIFIMANAGER_VERSION_MIN_TARGET "ESPAsync_WiFiManager v1.9.2"

// Use from 0 to 4. Higher number, more debugging messages and memory usage.
#define _ESPASYNC_WIFIMGR_LOGLEVEL_ 3
Expand Down Expand Up @@ -2799,7 +2827,7 @@ uint8_t connectMultiWiFi()

uint8_t status;

WiFi.mode(WIFI_STA);
//WiFi.mode(WIFI_STA);

LOGERROR(F("ConnectMultiWiFi with :"));

Expand Down Expand Up @@ -2835,7 +2863,7 @@ uint8_t connectMultiWiFi()

while ( ( i++ < 20 ) && ( status != WL_CONNECTED ) )
{
status = wifiMulti.run();
status = WiFi.status();

if ( status == WL_CONNECTED )
break;
Expand Down Expand Up @@ -3735,7 +3763,7 @@ This is terminal debug output when running [Async_ConfigOnDRD_FS_MQTT_Ptr_Medium
```
Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP32_DEV
ESPAsync_WiFiManager v1.9.1
ESPAsync_WiFiManager v1.9.2
ESP_DoubleResetDetector v1.1.1
Config File not found
Can't read Config File, using default values
Expand All @@ -3754,7 +3782,7 @@ Opening Configuration Portal. No timeout : DRD or No stored Credentials..
```
Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP32_DEV
ESPAsync_WiFiManager v1.9.1
ESPAsync_WiFiManager v1.9.2
ESP_DoubleResetDetector v1.1.1
Config File not found
Can't read Config File, using default values
Expand Down Expand Up @@ -3842,7 +3870,7 @@ This is terminal debug output when running [Async_ConfigOnDRD_FS_MQTT_Ptr_Comple
```
Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP8266_NODEMCU_ESP12E
ESPAsync_WiFiManager v1.9.1
ESPAsync_WiFiManager v1.9.2
ESP_DoubleResetDetector Version v1.1.1
{"AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name","AIO_KEY_Label":"aio_key"}
Config File successfully parsed
Expand Down Expand Up @@ -3882,7 +3910,7 @@ TWWWW WTWWW
```
Starting Async_ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP8266_NODEMCU_ESP12E
ESPAsync_WiFiManager v1.9.1
ESPAsync_WiFiManager v1.9.2
ESP_DoubleResetDetector Version v1.1.1
{"AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name","AIO_KEY_Label":"aio_key"}
Config File successfully parsed
Expand Down Expand Up @@ -3972,7 +4000,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/
```cpp
Starting Async_ConfigOnDoubleReset with DoubleResetDetect using SPIFFS on ESP32_DEV
ESPAsync_WiFiManager v1.9.1
ESPAsync_WiFiManager v1.9.2
ESP_DoubleResetDetector v1.1.1
[WM] RFC925 Hostname = ConfigOnDoubleReset
[WM] setSTAStaticIPConfig for USE_CONFIGURABLE_DNS
Expand Down Expand Up @@ -4031,7 +4059,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/

```cpp
Starting Async_ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP8266_NODEMCU_ESP12E
ESPAsync_WiFiManager v1.9.1
ESPAsync_WiFiManager v1.9.2
ESP_DoubleResetDetector v1.1.1
[WM] RFC925 Hostname = ConfigOnDoubleReset
[WM] setSTAStaticIPConfig for USE_CONFIGURABLE_DNS
Expand Down Expand Up @@ -4091,7 +4119,7 @@ This is terminal debug output when running [Async_ESP_FSWebServer_DRD](examples/
```cpp
Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU_ESP12E
ESPAsync_WiFiManager v1.9.1
ESPAsync_WiFiManager v1.9.2
ESP_DoubleResetDetector v1.1.1
Opening / directory
FS File: CanadaFlag_1.png, size: 40.25KB
Expand Down Expand Up @@ -4169,7 +4197,7 @@ This is terminal debug output when running [Async_ESP32_FSWebServer_DRD](example

```
Starting Async_ESP32_FSWebServer_DRD using LittleFS on ESP32_DEV
ESPAsync_WiFiManager v1.9.1
ESPAsync_WiFiManager v1.9.2
ESP_DoubleResetDetector v1.1.1
FS File: /CanadaFlag_1.png, size: 40.25KB
FS File: /CanadaFlag_2.png, size: 8.12KB
Expand Down Expand Up @@ -4280,7 +4308,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset](examples/

```
Starting Async_ConfigOnDoubleReset using LittleFS on ESP32S2_DEV
ESPAsync_WiFiManager v1.9.1
ESPAsync_WiFiManager v1.9.2
ESP_DoubleResetDetector v1.1.1
ESP Self-Stored: SSID = HueNet1, Pass = 12345678
[WM] * Add SSID = HueNet1 , PW = 12345678
Expand Down Expand Up @@ -4317,7 +4345,7 @@ This is terminal debug output when running [Async_ConfigOnDoubleReset_TZ](exampl

```
Starting Async_ConfigOnDoubleReset_TZ using LittleFS on ESP32_DEV
ESPAsync_WiFiManager v1.9.1
ESPAsync_WiFiManager v1.9.2
ESP_DoubleResetDetector v1.1.1
ESP Self-Stored: SSID = HueNet1, Pass = password
[WM] * Add SSID = HueNet1 , PW = password
Expand Down Expand Up @@ -4361,7 +4389,7 @@ Local Date/Time: Sat May 1 00:17:30 2021

```
Starting Async_ConfigOnDoubleReset_TZ using LittleFS on ESP32_DEV
ESPAsync_WiFiManager v1.9.1
ESPAsync_WiFiManager v1.9.2
ESP_DoubleResetDetector v1.1.1
ESP Self-Stored: SSID = HueNet1, Pass = password
[WM] * Add SSID = HueNet1 , PW = password
Expand Down Expand Up @@ -4408,7 +4436,7 @@ This is terminal debug output when running [Async_ESP_FSWebServer_DRD](examples/

```
Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU_ESP12E
ESPAsync_WiFiManager v1.9.1
ESPAsync_WiFiManager v1.9.2
ESP_DoubleResetDetector v1.1.1
Opening / directory
FS File: drd.dat, size: 4B
Expand Down Expand Up @@ -4481,7 +4509,7 @@ Local Date/Time: Sat May 1 03:12:54 2021

```
Starting Async_ESP_FSWebServer_DRD using LittleFS on ESP8266_NODEMCU_ESP12E
ESPAsync_WiFiManager v1.9.1
ESPAsync_WiFiManager v1.9.2
ESP_DoubleResetDetector v1.1.1
Opening / directory
FS File: drd.dat, size: 4B
Expand Down Expand Up @@ -4532,6 +4560,50 @@ Local Date/Time: Sat May 1 03:16:54 2021
Local Date/Time: Sat May 1 03:12754 2021
```

---

#### 10. [Async_ConfigOnDoubleReset_TZ](examples/Async_ConfigOnDoubleReset_TZ) on ESP32C3_DEV using SPIFFS

This is terminal debug output when running [Async_ConfigOnDoubleReset_TZ](examples/Async_ConfigOnDoubleReset_TZ) on **ESP32C3_DEV using SPIFFS and ESP32 core v2.0.0-rc1.**.

```
Starting Async_ConfigOnDoubleReset_TZ using SPIFFS on ESP32C3_DEV
ESPAsync_WiFiManager v1.9.2
ESP_DoubleResetDetector v1.1.1
ESP Self-Stored: SSID = HueNet1, Pass = 12345678
[WM] * Add SSID = HueNet1 , PW = 12345678
Got ESP Self-Stored Credentials. Timeout 120s for Config Portal
[WM] LoadWiFiCfgFile
[WM] OK
[WM] stationIP = 0.0.0.0 , gatewayIP = 192.168.2.1
[WM] netMask = 255.255.255.0
[WM] dns1IP = 192.168.2.1 , dns2IP = 8.8.8.8
Got stored Credentials. Timeout 120s for Config Portal
[WM] Current TZ_Name = America/New_York , TZ = EST5EDT,M3.2.0,M11.1.0
SPIFFS Flag read = 0xD0D04321
No doubleResetDetected
Saving config file...
Saving config file OK
[WM] * Add SSID = HueNet1 , PW = 12345678
[WM] * Add SSID = HueNet , PW = 12345678
ConnectMultiWiFi in setup
[WM] ConnectMultiWiFi with :
[WM] * Flash-stored Router_SSID = HueNet1 , Router_Pass = 12345678
[WM] * Add SSID = HueNet1 , PW = 12345678
[WM] * Additional SSID = HueNet1 , PW = 12345678
[WM] * Additional SSID = HueNet , PW = 12345678
[WM] Connecting MultiWifi...
[WM] WiFi connected after time: 3
[WM] SSID: HueNet ,RSSI= -27
[WM] Channel: 10 ,IP address: 192.168.2.99
After waiting 11.85 secs more in setup(), connection result is connected. Local IP: 192.168.2.99
Stop doubleResetDetecting
Saving config file...
Saving config file OK
Local Date/Time: Mon Aug 2 17:06:42 2021
Local Date/Time: Mon Aug 2 17:07:42 2021
Local Date/Time: Mon Aug 2 17:08:42 2021
```

---
---
Expand Down Expand Up @@ -4571,6 +4643,13 @@ Submit issues to: [ESPAsync_WiFiManager issues](https://github.com/khoih-prog/ES

## Releases

### Releases v1.9.2

1. Fix MultiWiFi connection issue with ESP32 core v2.0.0-rc1+
2. Fix AsyncWebServer library compile error with ESP32 core v2.0.0-rc1+. Check [Fix compiler error for ESP32-C3 and mbed TLS v2.7.0+ #970](https://github.com/me-no-dev/ESPAsyncWebServer/pull/970)
3. Verify compatibility with new ESP32 core v2.0.0-rc1+
4. Verify compatibility with new ESP8266 core v3.0.2

### Releases v1.9.1

1. Fix warnings and verify compatibility with new ESP8266 core v3.0.0
Expand Down
Loading

0 comments on commit 96f9423

Please sign in to comment.