mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #525] howto call config page at runtime #441
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#441
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 @ageurtse on GitHub (Feb 16, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/525
i'm using the development brance and need to connect to the config page at runtime.
My problem is that at runtime i already run a webserver.
So calling wifiManager.startWebPortal(); isn't helping.
after calling this one all is hanging.
where i need it for is in case of needed, change the ssid and password and change static ip adres.
@SomeGuyNamedJay commented on GitHub (Feb 19, 2018):
I'd love to know the answer to this too. In the meantime, this is what I do:
Add a "webpage" to call the resetSettings():
In setup:
httpServer.on("/resetWifi", {
resetWifi();
ESP.restart();
})
Function:
void resetWifi() {
WiFiManager wifiManager;
wifiManager.resetSettings();
}
For some reason I get an error if I put wifiManager.resetSettings() in the httpServer call.
@ageurtse commented on GitHub (Feb 20, 2018):
for me this isn't working.
my board isn't resetting the settings.
see log from serial monitor
as you can see it keeps resetting.
after rebooting the device it connects back to my wifi network.
realy need some advice on this.
@tablatronix commented on GitHub (Feb 20, 2018):
what version of esp ?
@tablatronix commented on GitHub (Feb 20, 2018):
oh nm, I see it, 2.4.0 has bugged erase config
https://github.com/esp8266/Arduino/pull/3635
use development version of wm, or staging of esp
@tablatronix commented on GitHub (Feb 20, 2018):
#461
@tablatronix commented on GitHub (Feb 20, 2018):
sorry , let me check, you are obviously using dev branch
@tablatronix commented on GitHub (Feb 20, 2018):
ok try this
#DEFINE FIXERASECONFIGI forgot I removed it
@tablatronix commented on GitHub (Feb 21, 2018):
have you tried running one webserver on another port , like 81 ?
@ageurtse commented on GitHub (Feb 23, 2018):
not working for me.
below te code that i call to reset my settings and restart the ESP, but after restarting it stil connect;s to my wifi.
I wan't somehow that the user can go to a server page to reset all settings and causing the esp to restart. but i can't get it to work.
and below this line the whole sketch.
@tablatronix commented on GitHub (Feb 23, 2018):
use proper code formatting
@ageurtse commented on GitHub (Feb 23, 2018):
don't understand what is wrong with the above code formating.
i'm a hobby programmer, that could be the problem, sorry for that.
@tablatronix commented on GitHub (Feb 23, 2018):
What happens if you minimize this to a basic sketch that sets then erases config ?
have you tried erasing with esptool first ?
@ageurtse commented on GitHub (Feb 23, 2018):
The example sketch AutoConnectWithReset is running fine.
Next try to alter things, but i can't get it working.
see code i use for testing.
Is wifiManager.resetSettings(); only working in the setup routine ?
@tablatronix commented on GitHub (Feb 23, 2018):
Thanks, fixed
Problem was persistent was off
@ageurtse commented on GitHub (Feb 23, 2018):
And where do i turn persistent on ?
@tablatronix commented on GitHub (Feb 23, 2018):
I fixed it in development