mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1699] question where are credintials stored #1439
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#1439
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ear9mrn on GitHub (Jan 8, 2024).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1699
Can anyone tell me where/how the credentials (ssid, password) are stored for esp32?
A little googling suggests this is done by wifi library but it is not clear. I could not find anything in this code to suggest where they come from once stored.
I tried the following (using preferences library) but came up blank. Either this is not the correct method of the variable names are not correct. Any guidance would be helpful as I would like to use the same or similar method for some other parameters for a project.
`
#include<Preferences.h>
Preferences preferences;
String ssid;
String password;
void setup {
preferences.begin("credentials", false);
ssid = preferences.getString("ssid", "");
password = preferences.getString("password", "");
Serial.println(ssid);
Serial.println(password);
}
`
Thanks,
Pete.
@tablatronix commented on GitHub (Jan 8, 2024):
They are stored in NVS by ESP32, you can read them using the WM funcs
But they are only available when wifi is init on the esp32, so you have to start wifi first.
set .mode(STA) etc.
I have open issues researching how to get them without turning wifi on.
@kungfupizza commented on GitHub (May 23, 2024):
@tablatronix
How many sets of WiFi credentials are stored in the NVS?
@tablatronix commented on GitHub (May 27, 2024):
Only the one, multi config is not inplemented