[GH-ISSUE #912] Would it be possible to not let autoConnect block the setup? #774

Closed
opened 2026-02-28 01:26:59 +03:00 by kerem · 2 comments
Owner

Originally created by @markg85 on GitHub (Jul 13, 2019).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/912

Hi,

Currently the autoConnect function blocks the setup till it either makes a wifi connection or sets itself up as AP in case it couldn't make a connection.

That on it's own is awesome!

However, i'm now playing with a usecase where i want to fade a light in as soon as the device turns on. That "fading in" is something that's run in the loop function. And that loop function only starts when the setup is done... which autoconnect is blocking... :)

Another thing i want to do is pulsate the light while a wifi connection is being made. Those are 2 reason why having it blocking it really inconvenient.

I could.... use interrupts and work around it that way, but that feels a bit hacky.

So therefore i'm wondering if it would be possible to make autoconnect non blocking?

An approach that i can think of would be to let WiFiManager know that i want to use auto connect (say with a new function: setAutoconnect(true)). Then have another new function like loop() or handle() that should be placed in the main loop function to handle the wifi connection as it's made.

Just curious...

Cheers,
Mark

Originally created by @markg85 on GitHub (Jul 13, 2019). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/912 Hi, Currently the autoConnect function blocks the setup till it either makes a wifi connection or sets itself up as AP in case it couldn't make a connection. That on it's own is awesome! However, i'm now playing with a usecase where i want to fade a light in as soon as the device turns on. That "fading in" is something that's run in the loop function. And that loop function only starts when the setup is done... which autoconnect is blocking... :) Another thing i want to do is pulsate the light while a wifi connection is being made. Those are 2 reason why having it blocking it really inconvenient. I could.... use interrupts and work around it that way, but that feels a bit hacky. So therefore i'm wondering if it would be possible to make autoconnect non blocking? An approach that i can think of would be to let WiFiManager know that i want to use auto connect (say with a new function: setAutoconnect(true)). Then have another new function like loop() or handle() that should be placed in the main loop function to handle the wifi connection as it's made. Just curious... Cheers, Mark
kerem 2026-02-28 01:26:59 +03:00
  • closed this issue
  • added the
    duplicate
    label
Author
Owner

@tablatronix commented on GitHub (Jul 13, 2019):

#379
#818

Development branch

#500

<!-- gh-comment-id:511078778 --> @tablatronix commented on GitHub (Jul 13, 2019): #379 #818 ## Development branch #500
Author
Owner

@markg85 commented on GitHub (Jul 13, 2019):

Ha, that's awesome!
I am hesitant to upgrade to the dev branch, but i think i'm going to give it a shot now. As with this it already has 3 features that i requested before...

<!-- gh-comment-id:511124693 --> @markg85 commented on GitHub (Jul 13, 2019): Ha, that's awesome! I am hesitant to upgrade to the dev branch, but i think i'm going to give it a shot now. As with this it already has 3 features that i requested before...
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#774
No description provided.