Skip to content
Snippets Groups Projects
Commit 80f215b6 authored by thiebolt's avatar thiebolt
Browse files

update

parent 56dfa5b0
Branches
No related tags found
No related merge requests found
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
# (c) neOCampus / F.Thiebolt Université Toulouse3, Laboratoire IRIT # (c) neOCampus / F.Thiebolt Université Toulouse3, Laboratoire IRIT
=== Release 221225 / feature-NVSbackport (ESP32 NVS WiFiCredentials backport) === Release 221225 / backport-NVSnamespace
Note: temporary release only intended to neOSensors with FW <= 220815
Based on Release 220815 / esp32 2.0.4 (because later releases broke the SPIFFS partitioning) Based on Release 220815 / esp32 2.0.4 (because later releases broke the SPIFFS partitioning)
- backport NVS namespace for WiFi credentials - backport NVS namespace for WiFi credentials
......
...@@ -10,10 +10,11 @@ ...@@ -10,10 +10,11 @@
* --- * ---
* Notes: * Notes:
* --- * ---
* F.Thiebolt aug.20 removed EEPROM support * F.Thiebolt may.23 add NVS support to save sensOCampus given credentials
* F.Thiebolt aug.20 removed EEPROM support
* added SPIFFS support to load/save config file * added SPIFFS support to load/save config file
* Thiebolt F. Nov.19 migrate to Arduino Json 6 * Thiebolt F. Nov.19 migrate to Arduino Json 6
* Thiebolt F. July 17 * Thiebolt F. July 17
* *
*/ */
...@@ -27,6 +28,14 @@ ...@@ -27,6 +28,14 @@
#include "SPIFFS.h" #include "SPIFFS.h"
#endif #endif
/* NVS namespace @ EPS32 */
#ifdef ESP32
#include "Preferences.h" // NVS storage (instead of the DEPRECATED eeprom)
#elif defined (ESP8266)
#warning "[esp8266] no NVS namespace available ... grab WiFi ssid/psk from last connection"
#endif
/* neOCampus related includes */
#include "sensocampus.h" #include "sensocampus.h"
#include "neocampus_utils.h" #include "neocampus_utils.h"
...@@ -42,6 +51,10 @@ ...@@ -42,6 +51,10 @@
// note that config of various modules is NOT saved // note that config of various modules is NOT saved
#define CONFIG_JSON_SIZE (JSON_OBJECT_SIZE(20)) // used to parse sensOCampus config FILE #define CONFIG_JSON_SIZE (JSON_OBJECT_SIZE(20)) // used to parse sensOCampus config FILE
// NVS namespace for WiFi credentials
#define SENCO_NVS_NAMESPACE "sensOCampus" // 15 chars max.
#define SENSO_MQTT_LOGIN_KEY xxxxxxx
#define SENSO_MQTT_PASS_KEY yyyyyy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment