mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1553] Cant get the runtime web portal to work - startWebPortal() #1325
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#1325
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 @jonasbjurel on GitHub (Jan 22, 2023).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1553
Basic Infos
I can't get the run-time webportal to work.
Hardware
WiFimanager Branch/Release: 2.0.15-rc-1
Esp8266/Esp32:
Hardware: ESP wrover
Core Version: 2.0.0
Description
Problem description
I want the webportal to run all the time such that I can perform an OTA at any time, the config portal works okay. After the config portal has concluded after a config save and connect , I try to start a runtime web-portal with no success, cannot connect to it with the IP-address the AP has assigned to my ESP32.
Simplified code snippet:
WiFiManager wifiManager;
wifiManager.setAPStaticIPConfig(IPAddress(WIFI_MGR_AP_IP),
IPAddress(WIFI_MGR_AP_GW_IP),
IPAddress(255,255,255,0));
wifiManager.setAPCallback(configModeCb);
wifiManager.setPreSaveConfigCallback(preSaveConfigCb);
wifiManager.setSaveConfigCallback(saveConfigCb);
wifiManager.setTitle(WIFI_MGR_HTML_TITLE);
wifiManager.setConnectTimeout(WIFI_MGR_STA_CONNECT_TIMEOUT_S);
wifiManager.setConfigPortalTimeout(WIFI_MGR_AP_CONFIG_TIMEOUT_S);
wifiManager.setShowStaticFields(true);
wifiManager.setShowDnsFields(true);
wifiManager.setShowInfoErase(true);
wifiManager.setShowInfoUpdate(true);
wifiManager.setBreakAfterConfig(true);
wifiManager.setShowPassword(false);
wifiManager.setCaptivePortalEnable(true);
wifiManager.setConfigResetCallback(resetCb);
wifiManager.setConfigPortalTimeoutCallback(configurePortalConnectTimeoutCb);
hostNameConfigParam = new WiFiManagerParameter("HostName", "HostName", networkConfig.hostName, 31);
wifiManager.addParameter(hostNameConfigParam);
mqttServerUriConfigParam = new WiFiManagerParameter("MQTTserverURI", "MQTTserverURI", networkConfig.mqttUri, 100);
wifiManager.addParameter(mqttServerUriConfigParam);
char tmpMqttPort[6];
mqttServerPortConfigParam = new WiFiManagerParameter("MQTTserverPort", "MQTTserverPort",
itoa(networkConfig.mqttPort,
tmpMqttPort, 10), 5);
wifiManager.addParameter(mqttServerPortConfigParam);
char apSsid[50];
sprintf(apSsid, "%s_%s", WIFI_MGR_AP_NAME_PREFIX, getMac());
wifiManager.startConfigPortal(apSsid);
wifiManager.stopConfigPortal();
wifiManager.startWebPortal(); // Does not work
For full code see: https://github.com/jonasbjurel/GenericJMRIdecoder/blob/main/client/Arduino/genJMRIDecoderClient/networking.cpp
Settings in IDE
Module: -
Additional libraries:
See: https://github.com/jonasbjurel/GenericJMRIdecoder/blob/main/client/Arduino/genJMRIDecoderClient/networking.cpp
Sketch
See: https://github.com/jonasbjurel/GenericJMRIdecoder/blob/main/client/Arduino/genJMRIDecoderClient/networking.cpp
Debug Messages
....
*wm:config portal exiting
*wm:Starting Web Portal
....
@tablatronix commented on GitHub (Jan 23, 2023):
Bump your wn debugging up. Could be conflict with mqtt client? So it just isnt listening?
@jonasbjurel commented on GitHub (Jan 24, 2023):
Thank you, will try when I'm back from my business trip on Sat.
@tablatronix commented on GitHub (Jan 25, 2023):
Yeah not sure I will be able to reproduce, hoping extra logging shows something obvious
@jonasbjurel commented on GitHub (Jan 27, 2023):
Hi, I tried to do this to get more debug output, but I didn't get any more debug info:
#define WM_DEBUG_LEVEL 4
#include <WiFiManager.h>
Any suggestions.
BR/Jonas
@tablatronix commented on GitHub (Jan 28, 2023):
you know I don't think i added a method to change logging level real time.. You have to do it via a build flag or global env..
or change it in the .h file.
@jonasbjurel commented on GitHub (Jan 28, 2023):
Isnt that what I just did with:
#define WM_DEBUG_LEVEL 4
#include <WiFiManager.h>
?
BR/Jonas
@tablatronix commented on GitHub (Jan 28, 2023):
you cannot define in a sketch it doesn't work
@tablatronix commented on GitHub (Feb 9, 2023):
Any luck ?
@jonasbjurel commented on GitHub (Feb 13, 2023):
Got full logging, troubleshooting as we speak.
Hope to provide feed-back soon.
BR/Jonas
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows
From: Shawn @.>
Sent: Thursday, 9 February 2023 21:56
To: @.>
Cc: @.>; @.>
Subject: Re: [tzapu/WiFiManager] Cant get the runtime web portal to work - startWebPortal() (Issue #1553)
Any luck ?
—
Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftzapu%2FWiFiManager%2Fissues%2F1553%23issuecomment-1424828298&data=05%7C01%7C%7Ce000658a72b14bafd5ea08db0ae01855%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638115729819983888%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xd5i0jTikIuYRDJqS6e6rT8W%2Ftb%2FUoPvIh6zQ4%2BzvLI%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAC7HWSQEJGE6VGY57OWPZGDWWVKXHANCNFSM6AAAAAAUDFUJYQ&data=05%7C01%7C%7Ce000658a72b14bafd5ea08db0ae01855%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638115729819983888%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=GiPbj6jV7ynO1z6FWrtegWGRzbPoHAi6DdoIvqygJ%2FM%3D&reserved=0.
You are receiving this because you authored the thread.Message ID: @.***>
@jonasbjurel commented on GitHub (Feb 14, 2023):
My bad, missunderstanding of the function.
I thought that the wifimanager would start an own task for the async operation, so I didn't periodically process() the HTTP requests.
Thanks for the support.