[GH-ISSUE #80] Gives up too quickly #55

Closed
opened 2026-02-28 01:23:09 +03:00 by kerem · 13 comments
Owner

Originally created by @buzztiaan on GitHub (Jan 23, 2016).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/80

Did i read right that it only tries connecting once, and then gives up and becomes an access point?

I think some configurable retry-count is in order, with some smallish delay between then. Just to make it a bit more userfriendly on not perfect reception locations :D

Originally created by @buzztiaan on GitHub (Jan 23, 2016). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/80 Did i read right that it only tries connecting once, and then gives up and becomes an access point? I think some configurable retry-count is in order, with some smallish delay between then. Just to make it a bit more userfriendly on not perfect reception locations :D
kerem closed this issue 2026-02-28 01:23:09 +03:00
Author
Owner

@tzapu commented on GitHub (Jan 24, 2016):

hi, only tries once,
but in my experience, when reception is poor, the connecting functions just stand there waiting a lot longer until they can establish the connection.
if you have those kinds of issues, maybe it s worth thinking about starting it on a button press rather than automatically... and on normal startup retry as you see fit

<!-- gh-comment-id:174261909 --> @tzapu commented on GitHub (Jan 24, 2016): hi, only tries once, but in my experience, when reception is poor, the connecting functions just stand there waiting a lot longer until they can establish the connection. if you have those kinds of issues, maybe it s worth thinking about starting it on a button press rather than automatically... and on normal startup retry as you see fit
Author
Owner

@buzztiaan commented on GitHub (Jan 24, 2016):

whats the exact issue you are avoiding by not doing something as simple as 'try 5 times' ?

<!-- gh-comment-id:174329284 --> @buzztiaan commented on GitHub (Jan 24, 2016): whats the exact issue you are avoiding by not doing something as simple as 'try 5 times' ?
Author
Owner

@tzapu commented on GitHub (Jan 25, 2016):

needless delays, i am not a fan of delays :)
i ve got some battery powered sensors for instance, that could do without waiting for a number of retries
(it could be set to 1, of course).
there are also some situations(routers i guess) in which i ve had the connection take a looong while before connecting, having 5 retries would mean it would take forever to get to see the configuration access point

<!-- gh-comment-id:174415415 --> @tzapu commented on GitHub (Jan 25, 2016): needless delays, i am not a fan of delays :) i ve got some battery powered sensors for instance, that could do without waiting for a number of retries (it could be set to 1, of course). there are also some situations(routers i guess) in which i ve had the connection take a looong while before connecting, having 5 retries would mean it would take forever to get to see the configuration access point
Author
Owner

@buzztiaan commented on GitHub (Jan 25, 2016):

i see it give up within 3 seconds as-is, in situations where all wifi clients around it have a fine signal

i'll just fork and implement, see if it gets better
the default could be repeat once ;)

<!-- gh-comment-id:174430455 --> @buzztiaan commented on GitHub (Jan 25, 2016): i see it give up within 3 seconds as-is, in situations where all wifi clients around it have a fine signal i'll just fork and implement, see if it gets better the default could be repeat once ;)
Author
Owner

@tzapu commented on GitHub (Jan 25, 2016):

for example, i have a router that at times takes 20 secs or more to connect or fail... i m saying 20 because i kind of give up counting by then, could be longer 30-40

<!-- gh-comment-id:174431242 --> @tzapu commented on GitHub (Jan 25, 2016): for example, i have a router that at times takes 20 secs or more to connect or fail... i m saying 20 because i kind of give up counting by then, could be longer 30-40
Author
Owner

@tzapu commented on GitHub (Jan 31, 2016):

i ve also just thought of this, using the OnDemandConfigPortal + a WiFi.begin() in a loop of retries you can achieve exactly what you propose, so the tools are already there

<!-- gh-comment-id:177410412 --> @tzapu commented on GitHub (Jan 31, 2016): i ve also just thought of this, using the OnDemandConfigPortal + a WiFi.begin() in a loop of retries you can achieve exactly what you propose, so the tools are already there
Author
Owner

@tzapu commented on GitHub (Feb 16, 2016):

@buzztiaan i have added a new option to WiFiManger to set a connect timeout.
in order to use this you d need to update to the latest github version of the lib and call
wifiManager.setConnectTimeout(30);
before autoConnect. parameter is timeout in seconds .
i am very intereste to know if this would help in your case

<!-- gh-comment-id:184594205 --> @tzapu commented on GitHub (Feb 16, 2016): @buzztiaan i have added a new option to WiFiManger to set a connect timeout. in order to use this you d need to update to the latest github version of the lib and call `wifiManager.setConnectTimeout(30);` before autoConnect. parameter is timeout in seconds . i am very intereste to know if this would help in your case
Author
Owner

@buzztiaan commented on GitHub (Feb 16, 2016):

I'll test it out within 24hrs!

<!-- gh-comment-id:184595098 --> @buzztiaan commented on GitHub (Feb 16, 2016): I'll test it out within 24hrs!
Author
Owner

@tzapu commented on GitHub (Feb 23, 2016):

also, if that doesn t work, could you try the following sketch and see if you get a connection?
https://gist.github.com/tzapu/5b13866aaa584b32074a

<!-- gh-comment-id:187543730 --> @tzapu commented on GitHub (Feb 23, 2016): also, if that doesn t work, could you try the following sketch and see if you get a connection? https://gist.github.com/tzapu/5b13866aaa584b32074a
Author
Owner

@tablatronix commented on GitHub (Feb 29, 2016):

It looks like the core autoconnect tries 3 times, but very quickly also.

<!-- gh-comment-id:190343582 --> @tablatronix commented on GitHub (Feb 29, 2016): It looks like the core autoconnect tries 3 times, but very quickly also.
Author
Owner

@tzapu commented on GitHub (Mar 1, 2016):

well, the thing is it gets the idle status set very fast, so it doesn t attempt anything else...

<!-- gh-comment-id:190568226 --> @tzapu commented on GitHub (Mar 1, 2016): well, the thing is it gets the idle status set very fast, so it doesn t attempt anything else...
Author
Owner

@tzapu commented on GitHub (Mar 8, 2016):

hi, i ve just made another commit to this, could you please try the github version of WiFiManager and see if anything changed for you?

<!-- gh-comment-id:193619167 --> @tzapu commented on GitHub (Mar 8, 2016): hi, i ve just made another commit to this, could you please try the github version of WiFiManager and see if anything changed for you?
Author
Owner

@buzztiaan commented on GitHub (Aug 6, 2016):

been a while since i tried this

just grabbed latest version through libmanager, and all previous issues seem to not be present :D
closing for now, will open new issue when it happens ;)

<!-- gh-comment-id:238020452 --> @buzztiaan commented on GitHub (Aug 6, 2016): been a while since i tried this just grabbed latest version through libmanager, and all previous issues seem to not be present :D closing for now, will open new issue when it happens ;)
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#55
No description provided.