Skip to content
Snippets Groups Projects
Commit 8771460f authored by francois's avatar francois
Browse files

update

parent 0a7a7912
Branches
No related tags found
No related merge requests found
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#include <WiFi.h> #include <WiFi.h>
#endif /* ESP8266 */ #endif /* ESP8266 */
#include "Preferences.h" // NVS storage (instead of the DEPRECATED eeprom)
#include "neocampus.h" #include "neocampus.h"
#include "neocampus_debug.h" #include "neocampus_debug.h"
...@@ -53,6 +55,9 @@ extern bool _need2reboot; ...@@ -53,6 +55,9 @@ extern bool _need2reboot;
#define CONFIG_JSON_SIZE (JSON_OBJECT_SIZE(20)) #define CONFIG_JSON_SIZE (JSON_OBJECT_SIZE(20))
// NVS namespace for WiFi credentials
#define WIFI_NVS_NAMESPACE "wifiCredentials" // 15 chars max.
// constructor // constructor
wifiParametersMgt::wifiParametersMgt( void ) { wifiParametersMgt::wifiParametersMgt( void ) {
...@@ -342,6 +347,17 @@ void wifiParametersMgt::_applyDefaults( void ) { ...@@ -342,6 +347,17 @@ void wifiParametersMgt::_applyDefaults( void ) {
// Whole destruction option // Whole destruction option
_opt_eraseALL = false; _opt_eraseALL = false;
/*
* [may.23] now trying to access wifi credentias NVS namespace
*/
Preferences nvs_area;
if( nvs_area.begin(WIFI_NVS_NAMESPACE,true) ) { // readonly mode
log_debug(F("\n[wifiParams] opened NVS WiFi credentials namespace ..."));log_flush();
// TO BE CONTINUED
}
/* /*
* finally structure is initialized * finally structure is initialized
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment