mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1121] WM with ESPAsyncWebserver #959
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#959
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 @dronecz on GitHub (Sep 6, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1121
Basic Infos
Hardware
WiFimanager Branch/Release:
Esp8266/Esp32:
Hardware: ESP-12e, esp01, esp25
ESP Core Version: 2.4.0, staging
Description
I´m looking for someone, who is willing to help me with adding ESPAsyncWebserver via
#definein sketch like btomer did few years back. I did some work on this in my fork, but so far I can not compile sketch with this define.@tablatronix commented on GitHub (Sep 6, 2020):
Ill take a look and add a branch, might be a few days
@ortegafernando commented on GitHub (Sep 7, 2020):
Hi, may be this is a good start point or a good excuse to "join" both projects:
https://github.com/khoih-prog/ESP_WiFiManager
May be all collaborators of both projects could collaborate like a team in only one project, not to have to roads for the same finish.
@tablatronix commented on GitHub (Sep 7, 2020):
The async library is mostly compatible with the regualar one, so there is not much to do to add it, just some testing
@bigFin commented on GitHub (Dec 9, 2020):
BUMP!
@tablatronix commented on GitHub (Dec 9, 2020):
I am actually using it right now to see what we need to do
@fkoteam commented on GitHub (Dec 10, 2020):
is it uploaded? what version should I use?
Thank you very much for your work!
@tablatronix commented on GitHub (Dec 11, 2020):
Good news, it should work and be doable
Bad news, its alot of work, lots of refactoring, almost everything that uses the server needs to be changed.
I will start working on it a little bit and see , the problem is most of the arg and header stuff doe not work the same and has to be rewritten, even stopping the server is different syntax.
@dronecz commented on GitHub (Dec 11, 2020):
Awesome, can we help somehow?
@tablatronix commented on GitHub (Dec 11, 2020):
I need to figure out what needs to change for the new ota upload, and to find the new syntax to get args.
I pushed a new branch, it is in progress, as far as I got atm. But its a start and you can see the changes in handleroot for sending headers now, I was going to make it the same codebase and swappable, but it is too much work atmm easier to just change it all, another 4-5 hours plus testing and it should be done
@tablatronix commented on GitHub (Dec 14, 2020):
Its done, ready to test, there are a few things that might be broken, ota uploading has to be rewritten , esp32 not worked on yet, and url params not added back in for no scan and refresh
@tablatronix commented on GitHub (Dec 18, 2020):
Have you tried this yet?
@dronecz commented on GitHub (Dec 21, 2020):
Hi, sorry for delay, I had no time to try it until now. I implemented in my code and it works. I was able to connect to my AP via WM without problem.
Many thanks for this.
Is there something specific which you want me to test?
@tablatronix commented on GitHub (Dec 21, 2020):
There are some gotchas that I need to continue to work on, but It should work ok. Just that it works, you can save, change reset, use params whatever you were doing before.
@dronecz commented on GitHub (May 12, 2021):
Hi, sorry for long delay but I finally have time to make more work on my project with WM using ESPAsyncWebserver.
I tried OnDemandConfigPortal sketch and with async library does not scan and show networks. To confirm this I tried same sketch with latest alpha release and that one is working as it should.
Here is log:
Thanks for help.
@dronecz commented on GitHub (Aug 16, 2021):
@tablatronix any hint on this one? I looked on this again and difference is somewhere in
autoConnect()function. If I comment out call to this function and start configportal manually by pressing button, I do not see any networks. Also value of_lastscanvariable is not reset when reach 60 seconds.@tablatronix commented on GitHub (Feb 23, 2022):
I merged master back into this and resolved conflicts, ota seems all jacked up, code needs to be updated.
Backport the following methods to abstact master to prepare for cross compile..
setupHTTPServer
teardownHTTPServer
setupDNSD
HTTPSend
template all web handlers with arguments to allow both or other webservers objects or globals
fix ota code
@tablatronix commented on GitHub (May 11, 2023):
My idea was to make WM compatible with both or any webserver, but I have no idea how to get this working ideally.
I want to keep route callbacks as seperate methods, which means lots of functions to deal with.
therefore I want to avoid having to have overloads for these callbacks..
My idea was to use a template to have either local server pointer or async resp obj as the first argument. Now i dont want to pass the local pointer all the way through the webserver binds thats just asking for problems, and the syntax structures might be different. so instead i want to pass an empty arg for this, I want to also avoid adding variadic args to avoid the overhead etc as we do not really need it.
I also do not want to refactor the entire web handling into some abstract class or something more complex.
Idea is like
I just am not sure if this is the best route, or how to properly do the templates, nullptr has issues, so just going with something empty and adding a check in the callbacks seems easier
@lucaoliano commented on GitHub (Mar 8, 2024):
Hi @tablatronix,
on my fork I have an implementation that supports both WebServer and AsyncWebServer. Can you take a look at it? If you think it would be good, I'm happy to contribute with a PR.
@tablatronix commented on GitHub (Mar 8, 2024):
Thanks, I was hoping to find a way to do it much cleaner than having all those blocks, makes maintenance a nightmare and code legibility is a mess