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

Commit

Permalink
v1.7.6 to autodetect ESP32 core version
Browse files Browse the repository at this point in the history
### Releases v1.7.6

1. Auto detect ESP32 core and use either built-in LittleFS or [LITTLEFS](https://github.com/lorol/LITTLEFS) library
2. Update `library.json` to use new `headers` for PIO
  • Loading branch information
khoih-prog authored Nov 27, 2021
1 parent d97b5f1 commit 3c72285
Show file tree
Hide file tree
Showing 32 changed files with 394 additions and 158 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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.16) or Platform.io version
* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v3.0.2 or ESP32 v2.0.0)
* `ESP8266` or `ESP32` Core Version (e.g. ESP8266 core v3.0.2 or ESP32 v2.0.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 @@ -29,7 +29,7 @@ Please ensure to specify the following:
Arduino IDE version: 1.8.16
ESP8266 Core Version 3.0.2
OS: Ubuntu 20.04 LTS
Linux Inspiron 5.4.0-86-generic #97-Ubuntu SMP Fri Sep 17 19:19:40 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Linux Inspiron 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 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
107 changes: 66 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ It's using a web ConfigPortal, served from the `ESP32 / ESP8266`, and operating

1. [`Arduino IDE 1.8.16+` 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/). To use ESP8266 core 2.7.1+ for LittleFS.
3. [`ESP32 Core 2.0.0+`](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. [`ESP_DoubleResetDetector v1.1.2+`](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 ESP32.
5. [`ESP_MultiResetDetector v1.1.2+`](https://github.com/khoih-prog/ESP_MultiResetDetector) if using MRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_MultiResetDetector.svg?)](https://www.ardu-badge.com/ESP_MultiResetDetector).
6. [`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).
3. [`ESP32 Core 2.0.1+`](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. [`ESP_DoubleResetDetector v1.2.0+`](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 ESP32.
5. [`ESP_MultiResetDetector v1.2.0+`](https://github.com/khoih-prog/ESP_MultiResetDetector) if using MRD feature. To install, check [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP_MultiResetDetector.svg?)](https://www.ardu-badge.com/ESP_MultiResetDetector).
6. [`LittleFS_esp32 v1.0.6+`](https://github.com/lorol/LITTLEFS) for ESP32-based boards using LittleFS with ESP32 core v1.0.4-. 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) and you don't need to install it if using ESP32 core v1.0.6+

---

Expand Down Expand Up @@ -388,13 +388,25 @@ then connect WebBrowser to configurable ConfigPortal IP address, default is 192.
// Use LittleFS
#include "FS.h"

// The library will be depreciated after being merged to future major Arduino esp32 core release 2.x
// At that time, just remove this library inclusion
#include <LITTLEFS.h> // https://github.com/lorol/LITTLEFS
// Check cores/esp32/esp_arduino_version.h
#if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2)
#warning Using ESP32 Core 1.0.6 or 2.0.0+
// The library has been merged into esp32 core from release 1.0.6
#include <LittleFS.h>
FS* filesystem = &LittleFS;
#define FileFS LittleFS
#define FS_Name "LittleFS"
#else
#warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library
// The library has been merged into esp32 core from release 1.0.6
#include <LITTLEFS.h> // https://github.com/lorol/LITTLEFS
FS* filesystem = &LITTLEFS;
#define FileFS LITTLEFS
#define FS_Name "LittleFS"
#endif

FS* filesystem = &LITTLEFS;
#define FileFS LITTLEFS
#define FS_Name "LittleFS"
#elif USE_SPIFFS
#include <SPIFFS.h>
FS* filesystem = &SPIFFS;
Expand Down Expand Up @@ -2097,7 +2109,7 @@ ESP_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_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.5"
#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6"

// Use from 0 to 4. Higher number, more debugging messages and memory usage.
#define _WIFIMGR_LOGLEVEL_ 3
Expand Down Expand Up @@ -2135,12 +2147,25 @@ ESP_wifiManager.setRemoveDuplicateAPs(false);
// Use LittleFS
#include "FS.h"

// The library has been merged into esp32 core release 1.0.6
#include <LITTLEFS.h> // https://github.com/lorol/LITTLEFS
// Check cores/esp32/esp_arduino_version.h
#if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2)
#warning Using ESP32 Core 1.0.6 or 2.0.0+
// The library has been merged into esp32 core from release 1.0.6
#include <LittleFS.h>
FS* filesystem = &LittleFS;
#define FileFS LittleFS
#define FS_Name "LittleFS"
#else
#warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library
// The library has been merged into esp32 core from release 1.0.6
#include <LITTLEFS.h> // https://github.com/lorol/LITTLEFS
FS* filesystem = &LITTLEFS;
#define FileFS LITTLEFS
#define FS_Name "LittleFS"
#endif

FS* filesystem = &LITTLEFS;
#define FileFS LITTLEFS
#define FS_Name "LittleFS"
#elif USE_SPIFFS
#include <SPIFFS.h>
FS* filesystem = &SPIFFS;
Expand Down Expand Up @@ -3442,7 +3467,7 @@ This is terminal debug output when running [ConfigOnSwitchFS_MQTT_Ptr](examples/
```
Starting ConfigOnSwichFS_MQTT_Ptr using LittleFS on ESP8266_NODEMCU_ESP12E
ESP_WiFiManager v1.7.5
ESP_WiFiManager v1.7.6
Configuration file not found
Failed to read configuration file, using default values
[WM] RFC925 Hostname = ConfigOnSwichFS-MQTT
Expand Down Expand Up @@ -3554,8 +3579,8 @@ This is terminal debug output when running [ESP32_FSWebServer_DRD](examples/ESP3
```cpp
Starting ESP32_FSWebServer_DRD with DoubleResetDetect using SPIFFS on ESP32_DEV
ESP_WiFiManager v1.7.5
ESP_DoubleResetDetector v1.1.2
ESP_WiFiManager v1.7.6
ESP_DoubleResetDetector v1.2.0
FS File: /ConfigSW.json, size: 150B
FS File: /CanadaFlag_1.png, size: 40.25KB
FS File: /CanadaFlag_2.png, size: 8.12KB
Expand Down Expand Up @@ -3619,8 +3644,8 @@ This is terminal debug output when running [ESP32_FSWebServer_DRD](examples/ESP3

```
Starting ESP32_FSWebServer_DRD with DoubleResetDetect using LittleFS on ESP32_DEV
ESP_WiFiManager v1.7.5
ESP_DoubleResetDetector v1.1.2
ESP_WiFiManager v1.7.6
ESP_DoubleResetDetector v1.2.0
FS File: /CanadaFlag_1.png, size: 40.25KB
FS File: /CanadaFlag_2.png, size: 8.12KB
FS File: /CanadaFlag_3.jpg, size: 10.89KB
Expand Down Expand Up @@ -3678,8 +3703,8 @@ This is terminal debug output when running [ConfigOnDRD_FS_MQTT_Ptr_Complex](exa

```
Starting ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP32_DEV
ESP_WiFiManager v1.7.5
ESP_DoubleResetDetector v1.1.2
ESP_WiFiManager v1.7.6
ESP_DoubleResetDetector v1.2.0
{"AIO_KEY_Label":"aio_key","AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name"}
Config File successfully parsed
LittleFS Flag read = 0xd0d04321
Expand Down Expand Up @@ -3721,8 +3746,8 @@ WWWW WTWWWW WWTWWW WWWTWW WWWWTW WWWWW

```
Starting ConfigOnDRD_FS_MQTT_Ptr_Complex using LittleFS on ESP32_DEV
ESP_WiFiManager v1.7.5
ESP_DoubleResetDetector v1.1.2
ESP_WiFiManager v1.7.6
ESP_DoubleResetDetector v1.2.0
{"AIO_KEY_Label":"aio_key","AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name"}
Config File successfully parsed
LittleFS Flag read = 0xd0d01234
Expand Down Expand Up @@ -3806,8 +3831,8 @@ This is terminal debug output when running [ConfigOnDRD_FS_MQTT_Ptr_Complex](exa

```
Starting ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP8266_NODEMCU_ESP12E
ESP_WiFiManager v1.7.5
ESP_DoubleResetDetector v1.1.2
ESP_WiFiManager v1.7.6
ESP_DoubleResetDetector v1.2.0
{"AIO_KEY_Label":"aio_key","AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name"}
Config File successfully parsed
LittleFS Flag read = 0xd0d04321
Expand Down Expand Up @@ -3846,8 +3871,8 @@ TWWWW WTWWWW WWTWWW WWWTWW WWWWTW WWWWW

```
Starting ConfigOnDRD_FS_MQTT_Ptr_Medium using LittleFS on ESP8266_NODEMCU_ESP12E
ESP_WiFiManager v1.7.5
ESP_DoubleResetDetector v1.1.2
ESP_WiFiManager v1.7.6
ESP_DoubleResetDetector v1.2.0
{"AIO_KEY_Label":"aio_key","AIO_SERVER_Label":"io.adafruit.com","AIO_SERVERPORT_Label":"1883","AIO_USERNAME_Label":"user_name"}
Config File successfully parsed
LittleFS Flag read = 0xd0d01234
Expand Down Expand Up @@ -3923,8 +3948,8 @@ This is terminal debug output when running [ConfigOnDoubleReset](examples/Config

```
Starting ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP32S2_DEV
ESP_WiFiManager v1.7.5
ESP_DoubleResetDetector v1.1.2
ESP_WiFiManager v1.7.6
ESP_DoubleResetDetector v1.2.0
[WM] RFC925 Hostname = ConfigOnDoubleReset
[WM] setAPStaticIPConfig
[WM] Set CORS Header to : Your Access-Control-Allow-Origin
Expand Down Expand Up @@ -3973,8 +3998,8 @@ This is terminal debug output when running [ConfigOnDoubleReset](examples/Config

```
Starting ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP32_DEV
ESP_WiFiManager v1.7.5
ESP_DoubleResetDetector v1.1.2
ESP_WiFiManager v1.7.6
ESP_DoubleResetDetector v1.2.0
[WM] RFC925 Hostname = ConfigOnDoubleReset
[WM] Set CORS Header to : Your Access-Control-Allow-Origin
ESP Self-Stored: SSID = HueNet1, Pass = password
Expand Down Expand Up @@ -4083,8 +4108,8 @@ Local Date/Time: Thu May 6 21:29:18 2021

```
Starting ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP32_DEV
ESP_WiFiManager v1.7.5
ESP_DoubleResetDetector v1.1.2
ESP_WiFiManager v1.7.6
ESP_DoubleResetDetector v1.2.0
[WM] RFC925 Hostname = ConfigOnDoubleReset
[WM] Set CORS Header to : Your Access-Control-Allow-Origin
ESP Self-Stored: SSID = HueNet1, Pass = password
Expand Down Expand Up @@ -4134,8 +4159,8 @@ This is terminal debug output when running [ConfigOnDoubleReset](examples/Config

```
Starting ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP32S2_DEV
ESP_WiFiManager v1.7.5
ESP_DoubleResetDetector v1.1.2
ESP_WiFiManager v1.7.6
ESP_DoubleResetDetector v1.2.0
[WM] RFC925 Hostname = ConfigOnDoubleReset
[WM] Set CORS Header to : Your Access-Control-Allow-Origin
ESP Self-Stored: SSID = HueNet1, Pass = password
Expand Down Expand Up @@ -4280,8 +4305,8 @@ Local Date/Time: Thu May 6 21:29:18 2021

```
Starting ConfigOnDoubleReset with DoubleResetDetect using LittleFS on ESP32S2_DEV
ESP_WiFiManager v1.7.5
ESP_DoubleResetDetector v1.1.2
ESP_WiFiManager v1.7.6
ESP_DoubleResetDetector v1.2.0
[WM] RFC925 Hostname = ConfigOnDoubleReset
[WM] Set CORS Header to : Your Access-Control-Allow-Origin
ESP Self-Stored: SSID = HueNet1, Pass = password
Expand Down Expand Up @@ -4333,8 +4358,8 @@ This is terminal debug output when running [ESP32_FSWebServer_DRD](examples/ESP3

```
Starting ESP32_FSWebServer_DRD with DoubleResetDetect using SPIFFS on ESP32C3_DEV
ESP_WiFiManager v1.7.5
ESP_DoubleResetDetector v1.1.2
ESP_WiFiManager v1.7.6
ESP_DoubleResetDetector v1.2.0
FS File: wm_cp.dat, size: 4B
FS File: wm_cp.bak, size: 4B
FS File: wmssl_conf.dat, size: 376B
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
## Table of Contents

* [Changelog](#changelog)
* [Releases v1.7.6](#releases-v176)
* [Releases v1.7.5](#releases-v175)
* [Releases v1.7.4](#releases-v174)
* [Releases v1.7.3](#releases-v173)
Expand Down Expand Up @@ -46,6 +47,11 @@

## Changelog

### Releases v1.7.6

1. Auto detect ESP32 core and use either built-in LittleFS or [LITTLEFS](https://github.com/lorol/LITTLEFS) library
2. Update `library.json` to use new `headers` for PIO

### Releases v1.7.5

1. Update `platform.ini` and `library.json` to use original `khoih-prog` instead of `khoih.prog` after PIO fix
Expand Down
25 changes: 19 additions & 6 deletions examples/AutoConnect/AutoConnect.ino
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
#endif

#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3"
#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6"

// Use from 0 to 4. Higher number, more debugging messages and memory usage.
#define _WIFIMGR_LOGLEVEL_ 3
Expand Down Expand Up @@ -44,12 +44,25 @@
// Use LittleFS
#include "FS.h"

// The library has been merged into esp32 core release 1.0.6
#include <LITTLEFS.h> // https://github.com/lorol/LITTLEFS
// Check cores/esp32/esp_arduino_version.h
#if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2)
#warning Using ESP32 Core 1.0.6 or 2.0.0+
// The library has been merged into esp32 core from release 1.0.6
#include <LittleFS.h>

FS* filesystem = &LittleFS;
#define FileFS LittleFS
#define FS_Name "LittleFS"
#else
#warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library
// The library has been merged into esp32 core from release 1.0.6
#include <LITTLEFS.h> // https://github.com/lorol/LITTLEFS

FS* filesystem = &LITTLEFS;
#define FileFS LITTLEFS
#define FS_Name "LittleFS"
#endif

FS* filesystem = &LITTLEFS;
#define FileFS LITTLEFS
#define FS_Name "LittleFS"
#elif USE_SPIFFS
#include <SPIFFS.h>
FS* filesystem = &SPIFFS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
#endif

#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3"
#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6"

// Use from 0 to 4. Higher number, more debugging messages and memory usage.
#define _WIFIMGR_LOGLEVEL_ 3
Expand Down Expand Up @@ -46,12 +46,25 @@
// Use LittleFS
#include "FS.h"

// The library has been merged into esp32 core release 1.0.6
#include <LITTLEFS.h> // https://github.com/lorol/LITTLEFS
// Check cores/esp32/esp_arduino_version.h
#if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2)
#warning Using ESP32 Core 1.0.6 or 2.0.0+
// The library has been merged into esp32 core from release 1.0.6
#include <LittleFS.h>

FS* filesystem = &LittleFS;
#define FileFS LittleFS
#define FS_Name "LittleFS"
#else
#warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library
// The library has been merged into esp32 core from release 1.0.6
#include <LITTLEFS.h> // https://github.com/lorol/LITTLEFS

FS* filesystem = &LITTLEFS;
#define FileFS LITTLEFS
#define FS_Name "LittleFS"
#endif

FS* filesystem = &LITTLEFS;
#define FileFS LITTLEFS
#define FS_Name "LittleFS"
#elif USE_SPIFFS
#include <SPIFFS.h>
FS* filesystem = &SPIFFS;
Expand Down
25 changes: 19 additions & 6 deletions examples/AutoConnectWithFeedback/AutoConnectWithFeedback.ino
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#error This code is intended to run on the ESP8266 or ESP32 platform! Please check your Tools->Board setting.
#endif

#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.3"
#define ESP_WIFIMANAGER_VERSION_MIN_TARGET "ESP_WiFiManager v1.7.6"

// Use from 0 to 4. Higher number, more debugging messages and memory usage.
#define _WIFIMGR_LOGLEVEL_ 3
Expand Down Expand Up @@ -44,12 +44,25 @@
// Use LittleFS
#include "FS.h"

// The library has been merged into esp32 core release 1.0.6
#include <LITTLEFS.h> // https://github.com/lorol/LITTLEFS
// Check cores/esp32/esp_arduino_version.h
#if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2)
#warning Using ESP32 Core 1.0.6 or 2.0.0+
// The library has been merged into esp32 core from release 1.0.6
#include <LittleFS.h>

FS* filesystem = &LittleFS;
#define FileFS LittleFS
#define FS_Name "LittleFS"
#else
#warning Using ESP32 Core 1.0.4-. You must install LITTLEFS library
// The library has been merged into esp32 core from release 1.0.6
#include <LITTLEFS.h> // https://github.com/lorol/LITTLEFS

FS* filesystem = &LITTLEFS;
#define FileFS LITTLEFS
#define FS_Name "LittleFS"
#endif

FS* filesystem = &LITTLEFS;
#define FileFS LITTLEFS
#define FS_Name "LittleFS"
#elif USE_SPIFFS
#include <SPIFFS.h>
FS* filesystem = &SPIFFS;
Expand Down
Loading

0 comments on commit 3c72285

Please sign in to comment.