[GH-ISSUE #1007] How to tell if the WIFI manager just went through AP mode? #858

Open
opened 2026-02-28 01:27:22 +03:00 by kerem · 3 comments
Owner

Originally created by @KiavashS on GitHub (Feb 10, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1007

I'm writing a SPIFFS module to save and retrieve additional parameters through WifiManager. I'm having trouble working out the logic of how to best know if I should retrieve stored values from the flash or from the parameters entered on the web page. The parameters aren't mandatory, so I can't just check if there is a value.

I'm thinking if I can detect that the WifiManager went into AP mode the last time it booted, then it means values should be retrieved from the parameters. Otherwise, get them from the stored SPIFFS file.

Any thoughts? Is there a way to tell if on a given boot up, the AP was used to retrieve values?

Originally created by @KiavashS on GitHub (Feb 10, 2020). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1007 I'm writing a SPIFFS module to save and retrieve additional parameters through WifiManager. I'm having trouble working out the logic of how to best know if I should retrieve stored values from the flash or from the parameters entered on the web page. The parameters aren't mandatory, so I can't just check if there is a value. I'm thinking if I can detect that the WifiManager went into AP mode the last time it booted, then it means values should be retrieved from the parameters. Otherwise, get them from the stored SPIFFS file. Any thoughts? Is there a way to tell if on a given boot up, the AP was used to retrieve values?
Author
Owner

@lbussy commented on GitHub (Feb 27, 2020):

Assuming the user made a configuration commit, one of the various callbacks would work.

<!-- gh-comment-id:592163483 --> @lbussy commented on GitHub (Feb 27, 2020): Assuming the user made a configuration commit, one of the various callbacks would work.
Author
Owner

@KiavashS commented on GitHub (Mar 1, 2020):

Assuming the user made a configuration commit, one of the various callbacks would work.

Sorry I don't understand

<!-- gh-comment-id:593092248 --> @KiavashS commented on GitHub (Mar 1, 2020): > Assuming the user made a configuration commit, one of the various callbacks would work. Sorry I don't understand
Author
Owner

@lbussy commented on GitHub (Mar 1, 2020):

Sorry I don't understand

Documentation on callbacks.

<!-- gh-comment-id:593107735 --> @lbussy commented on GitHub (Mar 1, 2020): > Sorry I don't understand Documentation on [callbacks](https://github.com/tzapu/WiFiManager/tree/development#callbacks).
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#858
No description provided.