mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1127] Store parameters even when WiFi cannot connect #965
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#965
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 @Jeppedy on GitHub (Sep 17, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1127
Basic Infos
Hardware
WiFimanager Branch/Release:
Esp8266/Esp32:
Hardware: ESP-12e, esp01, esp25
Adafruit Feather Huzzah - ESP8266-based
Description
Feature Request:
Today, the additional parameters are not being stored if a connection to the Wifi cannot be established.
As I'm sure many are, I'm using your library both to manage the Wifi config and as an easy way to allow me to adjust parameters on the device (even when it can connect to WiFi).
All works fine. No bugs...
But, you've made the design decision to NOT call the "SaveParams" callback if you cannot get a connection, or if the new SSID/PSWD are not supplied.
The params I have are unrelated to the WiFi connection.
Preferred:
When exiting the Portal and you asked to save the params...
First call the Save callback.
Then...
If the SSID or PSWD are null, fall back to the previously-configured params and attempt connection as you do today (About line 255 in WiFiManager.cpp).
This allows me to change my additional params without even touching the wifi config.
Or, have two callbacks: "Wifi Connection related", called as it is today, and "Unrelated to Wifi", which is always called when the config portal calls for a save.
If you believe this is worthy, I can clean up my mods to your library and submit...
@tablatronix commented on GitHub (Sep 17, 2020):
already possible
also
In alpha/dev version you can move params to a seperate page and have seperate callbacks.
@Jeppedy commented on GitHub (Sep 17, 2020):
Can you point me to an example sketch?
On Thu, Sep 17, 2020, 12:07 Shawn A notifications@github.com wrote:
@Jeppedy commented on GitHub (Sep 17, 2020):
So setBreakAfterConfig means "save params even if connection didn't
succeed"?
J
On Thu, Sep 17, 2020, 12:39 Jeffrey Herr jeff@theherrs.com wrote:
@tablatronix commented on GitHub (Sep 17, 2020):
Yeah its an old throwback thing, it should be noted in the readme.
It was to stop the configportal after connect fail, but a side effect was that the callback never occurs also, and this also fixes that.