[GH-ISSUE #293] How to check if there are saved wifi credentials #246

Closed
opened 2026-02-28 01:24:17 +03:00 by kerem · 1 comment
Owner

Originally created by @gonsays on GitHub (Jan 12, 2017).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/293

Is there any simple way, on WiFiManager, to check whether there are wifi credentials saved or not?

I have an ESP8266 connected to a button. If I press the button upon esp's startup it will do: wifiManager.resetSettings() and wifiManager.autoConnect("AutoConnectAp").

Besides the button, I would like to have another option: if there are no previously saved settings it would launch the autoConnect function. To do so, I would use an IF LOOP to check that there are no saved settings and launch the WiFiManager AP mode for configuration.

Thank you very much in advance!

Originally created by @gonsays on GitHub (Jan 12, 2017). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/293 Is there any simple way, on WiFiManager, to check whether there are wifi credentials saved or not? I have an ESP8266 connected to a button. If I press the button upon esp's startup it will do: wifiManager.resetSettings() and wifiManager.autoConnect("AutoConnectAp"). Besides the button, I would like to have another option: if there are no previously saved settings it would launch the autoConnect function. To do so, I would use an IF LOOP to check that there are no saved settings and launch the WiFiManager AP mode for configuration. Thank you very much in advance!
kerem closed this issue 2026-02-28 01:24:17 +03:00
Author
Owner

@skx commented on GitHub (Feb 1, 2017):

The following will output the saved values, if any:

 Serial.println( WiFi.SSID() );
 Serial.println( WiFi.psk() );

You can test if they are null/empty as you wish :)

<!-- gh-comment-id:276759269 --> @skx commented on GitHub (Feb 1, 2017): The following will output the saved values, if any: Serial.println( WiFi.SSID() ); Serial.println( WiFi.psk() ); You can test if they are null/empty as you wish :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#246
No description provided.