mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #652] How to don't be blocked by wifiManager.autoConnect()? #545
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#545
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 @spilz87 on GitHub (Jul 10, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/652
Hello,
I'm using wifiManger library and it works very well for me.
But for my projects, my esp8266s have other stuff to do than wifi stuff (like receive data through serial port and display them on screen) independently of wifi connection.
So I need a way to don't be blocked during wifi connection, more over when there is no wifi in house.
Is it possible to have like a state machine for wifi connection that is call in loop() but doesn't block the use of the esp ?
Sorry for my bad English, I hope you understand what I mean, if no, let me know to try explain differently
Thanks for your help
@d-a-v commented on GitHub (Jul 10, 2018):
I have the same feature request.
For my personal use I added a callback for that purpose: offline-loop
I did not make it a PR. Devs might consider implementing a similar feature for working-offline guys like us :)
edit: the way to use it is to make all offline operations in
void loop_offline(), set this function in the above callback, and call it too from withinloop(). What I meant is that Devs might propose a better way to do that with official WiFiManager's API.@tablatronix commented on GitHub (Jul 11, 2018):
Develoment branch setconfigportalblocking false , process() in loop
@spilz87 commented on GitHub (Jul 11, 2018):
That's the idea, I prefer the way to have a process in loop than to have to separe online and offline part
@tablatronix commented on GitHub (Jul 11, 2018):
I am making an example now, It has not been tested yet though.
something like this should work
@d-a-v commented on GitHub (Jul 11, 2018):
Thanks a lot !
@tablatronix commented on GitHub (Jul 14, 2018):
dup #379
@spilz87 commented on GitHub (Jul 15, 2018):
Hello,
Actually it doesn't really solve all my request :
I need no blocking at all, even during connection.
If I understand well with your exemple, we don't stay blocked if it run portail, but if there is wrong wifi settings, it stay on the conne ruin loop, until connection time out (if set).
For my projects with an oled screen and rotary encoder (like on 3d printer) I need the ESP react to the encoder, connected or trying to connect or not connected. Like a state machine run in loop()
@tablatronix commented on GitHub (Jul 15, 2018):
Then don't use autoconnect or use a really short connecttimeout.
Not sure what to tell you more specifically.
@spilz87 commented on GitHub (Jul 16, 2018):
you mean by using begin instead of autoconnect ?
@tablatronix commented on GitHub (Jul 16, 2018):
Yeah and manually check connect status and start configportal in your code so you have better control.