Void Sentry
An AI-driven, real-time Sentry Turret platform leveraging asynchronous I/O and computer vision to deliver high-precision autonomous motion tracking on resource-constrained embedded hardware.
Loading...
Searching...
No Matches
WifiStore Class Reference

Reads and writes the wifi NVS namespace (keys nets, pin, appw) using the pure blob formats. More...

#include <wifi_store.h>

Public Member Functions

bool load (prov::NetworkList &list, prov::PinRecord &pin)
 Loads the saved networks and the PIN record.
 
bool save_nets (const prov::NetworkList &list)
 Stores the network list blob.
 
bool save_pin (const prov::PinRecord &rec)
 Stores the PIN record blob.
 
String hotspot_password ()
 Returns the setup hotspot password, creating and storing 10 random characters on the first call.
 
void erase_all ()
 Erases the saved networks, the PIN and the hotspot password (a new one is generated on demand).
 

Detailed Description

Reads and writes the wifi NVS namespace (keys nets, pin, appw) using the pure blob formats.

Every call opens and closes the namespace, so the object holds no state. Not thread-safe by itself: WifiManager calls it under its mutex.

Member Function Documentation

◆ hotspot_password()

String WifiStore::hotspot_password ( )

Returns the setup hotspot password, creating and storing 10 random characters on the first call.

Characters come from an alphabet without 0/O/1/l/I, drawn with esp_random().

◆ load()

bool WifiStore::load ( prov::NetworkList & list,
prov::PinRecord & pin )

Loads the saved networks and the PIN record.

A missing, truncated or corrupt blob is treated as empty (one log line, no crash).

Parameters
[out]listReceives the saved networks (cleared first).
[out]pinReceives the PIN record (default-constructed, not set, when absent).
Returns
true if a valid network list was loaded.

◆ save_nets()

bool WifiStore::save_nets ( const prov::NetworkList & list)

Stores the network list blob.

Returns
true if all bytes were written.

◆ save_pin()

bool WifiStore::save_pin ( const prov::PinRecord & rec)

Stores the PIN record blob.

Returns
true if all bytes were written.

The documentation for this class was generated from the following files: