mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1184] Using both WebServer.h and esp_http_server.h at the same time??? #1009
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#1009
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 @jameszah on GitHub (Jan 3, 2021).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1184
Hi, quick question about using this on ESP32 with Arduino IDE and with an http server already running in my code:
Has anyone tried to use this library which includes the WebServer.h server object, and at the same time use direct server code with esp_http_server.h software. The two packages fight over who controls symbols (like HTTP_GET) during the compile, and after solving that, then the WebServer.h object and my own object created with esp_http_server.h fight over who controls the events -- and only one can get the events.
I have a work-around to do the WiFiManager stuff, and then close the object, and then start a new server with all my own http server stuff.
I think the solution would be to re-do this library without the WebServer.h object, and directly grab the http events, and include WiFiManger events in the mix of other http events that my program already handles.
So just looking for a little advice if anyone has faced this issue?
I was using the esp_http_server.h calls, such as:
While WebServer.h calls such as:
@tablatronix commented on GitHub (Jan 4, 2021):
Not sure what that is there are a few options
WM does not allow passing in an httpd yet, but ours is a shared pointer so you can use it in your own code.
You can run it on alternate ports, you cannot close and restart same port ( there is a bug in esp with port binding it seems )
I have an experimental async webserver branch also
@jameszah commented on GitHub (Jan 4, 2021):
Very interesting -- I think that "port binding" bug was my problem.
So for the record here is my solution:
I haven't tried it away from my wifi yet. I assume it will fail to connect, then start the server to get the ssid, which will also fail, and then all the non-wifi aspects of my program will start running normally.
https://github.com/jameszah/ESP32-CAM-Video-Recorder-junior