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

Commit

Permalink
v1.8.1 to add LittleFS support to ESP32-C3
Browse files Browse the repository at this point in the history
### Release v1.8.1

1. Add LittleFS support to `ESP32-C3`.
2. Use `ESP32-core's LittleFS` library instead of `Lorol's LITTLEFS` library for ESP32 core v2.0.0+
  • Loading branch information
khoih-prog authored Feb 12, 2022
1 parent 2fbd185 commit 98490f4
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 63 deletions.
108 changes: 76 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
* [5.1 MRD/DRD => Open Config Portal](#51-mrddrd--open-config-portal)
* [5.2 Config Data Saved => Connection to Adafruit MQTT](#52-config-data-saved--connection-to-adafruit-mqtt)
* [6. ESP_WiFi on ESP32S3_DEV](#6-ESP_WiFi-on-ESP32S3_DEV) **New**
* [7. ESP_WiFi on ESP32C3_DEV using LittleFS](#7-ESP_WiFi-on-ESP32C3_DEV-using-LittleFS) **New**
* [Debug](#debug)
* [Troubleshooting](#troubleshooting)
* [Issues](#issues)
Expand Down Expand Up @@ -137,7 +138,7 @@ This [**ESP_WiFiManager_Lite** library](https://github.com/khoih-prog/ESP_WiFiMa

1. **ESP8266 and ESP32-based boards using EEPROM, SPIFFS or LittleFS**.
2. **ESP32-S2 (ESP32-S2 Saola, AI-Thinker ESP-12K, etc.) using EEPROM, SPIFFS or LittleFS**.
3. **ESP32-C3 (ARDUINO_ESP32C3_DEV) using EEPROM or SPIFFS**.
3. **ESP32-C3 (ARDUINO_ESP32C3_DEV) using EEPROM, SPIFFS or LittleFS**.
4. **ESP32-S3 (ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.) using EEPROM, SPIFFS or LittleFS**.

---
Expand Down Expand Up @@ -971,13 +972,13 @@ void loop()
/////////////////////////////////////////////

// LittleFS has higher priority than SPIFFS
#if ( ARDUINO_ESP32C3_DEV )
// Currently, ESP32-C3 only supporting SPIFFS and EEPROM. Will fix to support LittleFS
#define USE_LITTLEFS false
#define USE_SPIFFS true
#else
#if ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 2) )
#define USE_LITTLEFS true
#define USE_SPIFFS false
#elif defined(ARDUINO_ESP32C3_DEV)
// For core v1.0.6-, ESP32-C3 only supporting SPIFFS and EEPROM. To use v2.0.0+ for LittleFS
#define USE_LITTLEFS false
#define USE_SPIFFS true
#endif

/////////////////////////////////////////////
Expand Down Expand Up @@ -1232,8 +1233,8 @@ This is the terminal output when running [**ESP_WiFi**](examples/ESP_WiFi) examp

```
Starting ESP_WiFi using LittleFS on ESP32_DEV
ESP_WiFiManager_Lite v1.7.0
ESP_MultiResetDetector v1.2.1
ESP_WiFiManager_Lite v1.8.1
ESP_MultiResetDetector v1.3.0
LittleFS Flag read = 0xFFFC0003
multiResetDetectorFlag = 0xFFFC0003
lowerBytes = 0x0003, upperBytes = 0x0003
Expand Down Expand Up @@ -1303,8 +1304,8 @@ FFFFFFFFF

```
Starting ESP_WiFi using LittleFS on ESP32_DEV
ESP_WiFiManager_Lite v1.7.0
ESP_MultiResetDetector v1.2.1
ESP_WiFiManager_Lite v1.8.1
ESP_MultiResetDetector v1.3.0
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
Expand Down Expand Up @@ -1375,8 +1376,8 @@ This is the terminal output when running [**ESP_WiFi_MQTT**](examples/ESP_WiFi_M

```
Starting ESP_WiFi_MQTT using LittleFS on ESP8266_NODEMCU
ESP_WiFiManager_Lite v1.7.0
ESP_MultiResetDetector v1.2.1
ESP_WiFiManager_Lite v1.8.1
ESP_MultiResetDetector v1.3.0
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
Expand Down Expand Up @@ -1450,8 +1451,8 @@ NNN
Starting ESP_WiFi_MQTT using LittleFS on ESP8266_NODEMCU
ESP_WiFiManager_Lite v1.7.0
ESP_MultiResetDetector v1.2.1
ESP_WiFiManager_Lite v1.8.1
ESP_MultiResetDetector v1.3.0
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
Expand Down Expand Up @@ -1542,8 +1543,8 @@ This is the terminal output when running [**ESP_WiFi_MQTT**](examples/ESP_WiFi_M

```
Starting ESP_WiFi_MQTT using LittleFS on ESP32S2_DEV
ESP_WiFiManager_Lite v1.7.0
ESP_MultiResetDetector v1.2.1
ESP_WiFiManager_Lite v1.8.1
ESP_MultiResetDetector v1.3.0
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
Expand Down Expand Up @@ -1655,8 +1656,8 @@ entry 0x4004c190
Starting ESP_WiFi_MQTT using LittleFS on ESP32S2_DEV
ESP_WiFiManager_Lite v1.7.0
ESP_MultiResetDetector v1.2.1
ESP_WiFiManager_Lite v1.8.1
ESP_MultiResetDetector v1.3.0
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
Expand Down Expand Up @@ -1757,8 +1758,8 @@ This is the terminal output when running [**ESP_WiFi_MQTT**](examples/ESP_WiFi_M

```
Starting ESP_WiFi_MQTT using LittleFS on ESP32S2_DEV
ESP_WiFiManager_Lite v1.7.0
ESP_MultiResetDetector v1.2.1
ESP_WiFiManager_Lite v1.8.1
ESP_MultiResetDetector v1.3.0
LittleFS Flag read = 0xFFFC0003
multiResetDetectorFlag = 0xFFFC0003
lowerBytes = 0x0003, upperBytes = 0x0003
Expand All @@ -1785,8 +1786,8 @@ NNNN NNNNN NNNNN NNNNN NN[WML] h:UpdLittleFS

```
Starting ESP_WiFi_MQTT using LittleFS on ESP32S2_DEV
ESP_WiFiManager_Lite v1.7.0
ESP_MultiResetDetector v1.2.1
ESP_WiFiManager_Lite v1.8.1
ESP_MultiResetDetector v1.3.0
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
Expand Down Expand Up @@ -1841,8 +1842,8 @@ This is the terminal output when running [**ESP_WiFi**](examples/ESP_WiFi) examp

```
Starting ESP_WiFi_MQTT using LittleFS on ESP32_DEV
ESP_WiFiManager_Lite v1.7.0
ESP_MultiResetDetector v1.2.1
ESP_WiFiManager_Lite v1.8.1
ESP_MultiResetDetector v1.3.0
LittleFS Flag read = 0xFFFC0003
multiResetDetectorFlag = 0xFFFC0003
lowerBytes = 0x0003, upperBytes = 0x0003
Expand Down Expand Up @@ -1885,8 +1886,8 @@ N

```
Starting ESP_WiFi_MQTT using LittleFS on ESP32_DEV
ESP_WiFiManager_Lite v1.7.0
ESP_MultiResetDetector v1.2.1
ESP_WiFiManager_Lite v1.8.1
ESP_MultiResetDetector v1.3.0
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
lowerBytes = 0x0001, upperBytes = 0x0001
Expand Down Expand Up @@ -1933,7 +1934,7 @@ This is the terminal output when running [**ESP_WiFi**](examples/ESP_WiFi) examp

```
Starting ESP_WiFi using LittleFS on ESP32S3_DEV
ESP_WiFiManager_Lite v1.8.0
ESP_WiFiManager_Lite v1.8.1
ESP_MultiResetDetector v1.3.0
LittleFS Flag read = 0xFFFE0001
multiResetDetectorFlag = 0xFFFE0001
Expand All @@ -1942,11 +1943,11 @@ No multiResetDetected, number of times = 1
LittleFS Flag read = 0xFFFE0001
Saving config file...
Saving config file OK
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=jenniqqs
[WML] SSID1=HueNet2,PW1=jenniqqs
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=password
[WML] SSID1=HueNet2,PW1=password
[WML] BName=ESP32_S3
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=jenniqqs
[WML] SSID1=HueNet2,PW1=jenniqqs
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=password
[WML] SSID1=HueNet2,PW1=password
[WML] BName=ESP32_S3
[WML] WiFi connected after time: 0
[WML] SSID=HueNet1,RSSI=-23
Expand All @@ -1965,6 +1966,48 @@ Saving config file OK
HHH
```

---

### 7. [ESP_WiFi](examples/ESP_WiFi) on ESP32C3_DEV using LittleFS


This is the terminal output when running [**ESP_WiFi**](examples/ESP_WiFi) example on **ESP32C3_DEV** using LittleFS


```
Starting ESP_WiFi using LittleFS on ESP32C3_DEV
ESP_WiFiManager_Lite v1.8.1
ESP_MultiResetDetector v1.3.0
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
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=password
[WML] SSID1=HueNet2,PW1=password
[WML] BName=ESP32_C3
[WML] Hdr=ESP_WM_LITE,SSID=HueNet1,PW=password
[WML] SSID1=HueNet2,PW1=password
[WML] BName=ESP32_C3
[WML] WiFi connected after time: 0
[WML] SSID=HueNet1,RSSI=-21
[WML] Channel=2,IP=192.168.2.85
H
Your stored Credentials :
Blynk Server1 = account.duckdns.org
Token1 = token1
Blynk Server2 = account.ddns.net
Token2 = token2
Port = 8080
MQTT Server = mqtt.duckdns.org
Stop multiResetDetecting
Saving config file...
Saving config file OK
HHH
```

---
---

Expand Down Expand Up @@ -2041,7 +2084,8 @@ Submit issues to: [ESP_WiFiManager_Lite issues](https://github.com/khoih-prog/ES
26. Fix ESP8266 bug not easy to connect to Config Portal for ESP8266 core v3.0.0+
27. Fix the blocking issue in loop() with configurable `WIFI_RECON_INTERVAL`
28. Add support to **ESP32-S3 (ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.) using EEPROM, SPIFFS or LittleFS**

29. Add `LittleFS` support to **ESP32-C3**
30. Use `ESP32-core's LittleFS` library instead of `Lorol's LITTLEFS` library for ESP32 core v2.0.0+

---
---
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
## Table of Contents

* [Changelog](#changelog)
* [Release v1.8.1](#release-v181)
* [Release v1.8.0](#release-v180)
* [Release v1.7.0](#release-v170)
* [Release v1.6.0](#release-v160)
Expand All @@ -28,6 +29,11 @@

## Changelog

### Release v1.8.1

1. Add LittleFS support to `ESP32-C3`.
2. Use `ESP32-core's LittleFS` library instead of `Lorol's LITTLEFS` library for ESP32 core v2.0.0+

### Release v1.8.0

1. Add support to `ESP32-S3` (`ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3`, etc.) using [ESP32 core, esp32-s3-support branch, v2.0.2+](https://github.com/espressif/arduino-esp32/tree/esp32-s3-support)
Expand Down
10 changes: 5 additions & 5 deletions examples/ESP_WiFi/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@
/////////////////////////////////////////////

// LittleFS has higher priority than SPIFFS
#if ( ARDUINO_ESP32C3_DEV )
// Currently, ESP32-C3 only supporting SPIFFS and EEPROM. Will fix to support LittleFS
#define USE_LITTLEFS false
#define USE_SPIFFS true
#else
#if ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 2) )
#define USE_LITTLEFS true
#define USE_SPIFFS false
#elif defined(ARDUINO_ESP32C3_DEV)
// For core v1.0.6-, ESP32-C3 only supporting SPIFFS and EEPROM. To use v2.0.0+ for LittleFS
#define USE_LITTLEFS false
#define USE_SPIFFS true
#endif

/////////////////////////////////////////////
Expand Down
10 changes: 5 additions & 5 deletions examples/ESP_WiFi_MQTT/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@
/////////////////////////////////////////////

// LittleFS has higher priority than SPIFFS
#if ( ARDUINO_ESP32C3_DEV )
// Currently, ESP32-C3 only supporting SPIFFS and EEPROM. Will fix to support LittleFS
#define USE_LITTLEFS false
#define USE_SPIFFS true
#else
#if ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 2) )
#define USE_LITTLEFS true
#define USE_SPIFFS false
#elif defined(ARDUINO_ESP32C3_DEV)
// For core v1.0.6-, ESP32-C3 only supporting SPIFFS and EEPROM. To use v2.0.0+ for LittleFS
#define USE_LITTLEFS false
#define USE_SPIFFS true
#endif

/////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ESP_WiFiManager_Lite",
"version": "1.8.0",
"version": "1.8.1",
"keywords": "wifi, wi-fi, MultiWiFi, multi-wifi, WiFiManager, esp8266, esp32, esp32-s2, esp32-s3, esp32-c3, Communication, iot, credentials, persistent, config-portal, DoubleReset, MultiReset, DoubleResetDetector, littlefs, spiffs, eeprom, light-weight",
"description": "Library to configure MultiWiFi/Credentials at runtime for ESP32 (including ESP32-S2, ESP32-S3 and ESP32-C3) and ESP8266 boards. You can also specify DHCP HostName, static AP and STA IP. Use much less memory compared to full-fledge WiFiManager. Config Portal will be auto-adjusted to match the number of dynamic custom parameters. Optional default Credentials to be autoloaded into Config Portal to use or change instead of manually input. Credentials are saved in LittleFS, SPIFFS or EEPROM. New powerful-yet-simple-to-use feature to enable adding dynamic custom parameters from sketch and input using the same Config Portal. Double or MultiDetectDetector as well as Virtual Switches feature permits entering Config Portal as requested. Configurable Customs HTML Headers, including Customs Style, Customs Head Elements, CORS Header",
"authors":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ESP_WiFiManager_Lite
version=1.8.0
version=1.8.1
author=Khoi Hoang
maintainer=Khoi Hoang <[email protected]>
license=MIT
Expand Down
Loading

0 comments on commit 98490f4

Please sign in to comment.