mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1514] Terminating WiFiManager's web portal #1291
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#1291
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 @ambarusa on GitHub (Oct 28, 2022).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1514
Basic Infos
Hardware
WiFimanager Branch/Release: Master
Esp8266:
Hardware: ESP-12e,
Core Version: 2.4.0, staging
Description
Hi all. I'm having troubles with terminating WiFiManager's web portal, and starting my own. I know... there were issues opened before regarding this, but this case is different, because it's used in non-blocking mode, and a reset() would change the behavior in the system.
Briefly, after the software connects to the Wi-Fi, I want to change the webservers in the
WiFiEventStationModeGotIPcallback function. First I got exceptions, and it turned out becausestopConfigPortal()was called by me, and later on bywm.process(). I solved this by settingwm.setDisableConfigPortal(false);which stops theprocess()function to care about closing the webserver.But still, it seems like after calling the
wm.stopWebPortal();the webserver doesn't close, however thewm.getWebPortalActive()tells the opposite. I could put in a loop my AsyncWebServer'sbegin()function, but I'm not sure if it's handled by the library, and there's no API go get it's status.So, what do you suggest I should terminate the WiFiManager's web portal?
Thanks in advance
Settings in IDE
Module: Wemos D1 Mini
Additional libraries: SPAsyncWebServer
Sketch
@tablatronix commented on GitHub (Nov 28, 2022):
I have never figured this out, No matter how I try to stop and free the webserver, i can never start it back on the same port..
@inoffice commented on GitHub (Dec 12, 2022):
Hi and good day
Sorry by my newie in WifiManager, and sorry if item comment before, but not found any. ambarusa say "terminating WiFiManager's web portal, and starting my own" How?... i try this, redirect to my own portal after Wifimanager conect to some Wifi, and redirecto my own Webserver create in my ESP32 D1 mini. I agree some info!! THANKS
@delcioDEV commented on GitHub (Apr 26, 2023):
To terminate the WiFiManager web portal, you can use the stopConfigPortal() function. However, as you mentioned, calling this function will also stop the web server created by the WiFiManager library, which is not what you want.
To solve this issue, you can call stopWebPortal() instead of stopConfigPortal(). This function will stop the WiFiManager web portal, but it will not stop the web server created by the WiFiManager library. You can then start your own web server using the Webserver_start() function.
@tablatronix commented on GitHub (Sep 8, 2023):
Found this today, hints at the same issue
https://github.com/me-no-dev/ESPAsyncWebServer/issues/777