[GH-ISSUE #1486] Question on WiFiManager use #1267

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

Originally created by @cniedzi on GitHub (Sep 4, 2022).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1486

Hi,
I don't know if this is a right place for questions concerning WiFiManager; if not please advise me where should I go.

I build the ESP32S2-based device that should connect to last connected WiFi after powering on, without passing any credentials or waiting. If there aren't any known WiFis, the program should go further without any WiFi connection. The only way to set WiFI credentials is WiFiManager's wm.startConfigPortal() triggered by pushing a button.
So the code framework will be:

void setup() {
	WiFiManager wm;
	WiFi.mode(WIFI_STA);
        WiFi.begin(); //??????????

} 

void loop() {
	if (buttonPushed) {
		wm.startConfigPortal("AP");
	}
}

Is this a correct way to try to connect to the last connected WiFi by means of WiFi.begin()?
Where the last known WiFi credentials are stored (in particular these set by WiFIManager), in internal registers of ESP32?

Originally created by @cniedzi on GitHub (Sep 4, 2022). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1486 Hi, I don't know if this is a right place for questions concerning WiFiManager; if not please advise me where should I go. I build the ESP32S2-based device that should connect to last connected WiFi after powering on, without passing any credentials or waiting. If there aren't any known WiFis, the program should go further without any WiFi connection. The only way to set WiFI credentials is WiFiManager's wm.startConfigPortal() triggered by pushing a button. So the code framework will be: ``` void setup() { WiFiManager wm; WiFi.mode(WIFI_STA); WiFi.begin(); //?????????? } void loop() { if (buttonPushed) { wm.startConfigPortal("AP"); } } ``` Is this a correct way to try to connect to the last connected WiFi by means of WiFi.begin()? Where the last known WiFi credentials are stored (in particular these set by WiFIManager), in internal registers of ESP32?
kerem 2026-02-28 01:29:20 +03:00
  • closed this issue
  • added the
    Question
    label
Author
Owner

@tablatronix commented on GitHub (Sep 4, 2022):

Yes

There are some helper functions also, you can use autoconnect and disable autostartconfigportal, you can use the getWiFiIsSaved to check if creds exist etc

<!-- gh-comment-id:1236364051 --> @tablatronix commented on GitHub (Sep 4, 2022): Yes There are some helper functions also, you can use autoconnect and disable autostartconfigportal, you can use the getWiFiIsSaved to check if creds exist etc
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#1267
No description provided.