mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #102] Testing connection to new AP gives up easily #78
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#78
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 @solexious on GitHub (Feb 12, 2016).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/102
I'm trying to connect to my tp-link tl-wr702n router through wifimanager.
Currently when it tries to connect it will fail out very quickly and not connect, where as it will connect fine to my wifi router in the other room fine.
I've been running my project fine with this module and wifi ap just calling wifi connect normally so I wonder if wifimanager is just timing out trying to connect really quickly, or needs to try multiple times?
I can't currently see any settings to tell it how hard to try to connect to a new network.
@solexious commented on GitHub (Feb 12, 2016):
I've noticed the connection error is always that the wifi is idle?
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Connection result:
*WM: 0
*WM: Failed to connect.
*WM: Request redirected to captive portal
*WM: Handle root
@tzapu commented on GitHub (Feb 12, 2016):
hi, have you got the flash size under tools set to the same size your esp module has?
i have seen this happen at times with the wrong flash size set, also some weird combination of delays in the sketch cause it not to connect and fail immediately with 0
unfortunatelly this is quite random, i can t replicate it
@tzapu commented on GitHub (Feb 12, 2016):
i can t try to connect harder or longer, the library is using the exact same functions you and everyone else is using to connect, but due to mode switching from AP to STA weirdness like this seems to happen
@solexious commented on GitHub (Feb 12, 2016):
My details on the info page are:
Flash Chip ID
1458400
Flash Size
4194304 bytes
And I'm using "4M (1M SPIFFS)"
Is it possible to get it to try connecting a few times?
@tzapu commented on GitHub (Feb 16, 2016):
hi, if you can you should update to the latest github version of the library and check the new info page, there s an ide flash size and a chip flash size that should be equal
i have also added a new option to WiFiManger to set a connect timeout.
in order to use this you d need tocall
wifiManager.setConnectTimeout(30);
before autoConnect. parameter is time in seconds to wait before bailing on connection.
i am very interested to see if it helps at all with your issue
@solexious commented on GitHub (Feb 16, 2016):
Thanks for making the changes. I've updated to the latest git version.
Info page tells me:
I added the 30 second timeout for trying to connect, I had it connect 1 out of 10 tries. Also tried setting the timeout to 60. Timed the wait and its waiting the amount of time I set t to.
I once also had it return connection result 4, but other than that the failures were all 0.
@tzapu commented on GitHub (Feb 16, 2016):
that s a pitty...
i am only using the standard functions so I do not know why it would connect ok for you just callign wifi connect and not through the lib...
can you try a simple sketch to find out if that s still the case, if it still connects ok from the first attempt?
@tzapu commented on GitHub (Feb 16, 2016):
if you don t use WiFiManager, in a test sketch, does everything work ok? Does your module see and connect ok to the router causing you issues?
@solexious commented on GitHub (Feb 16, 2016):
Given the basic WifiClient esp8266 sketch another try, connected fine first time each try, swapped back to wifimanager and had the same issue as before. (same esp8266 module, same wifi ap its trying to connect to)
@tzapu commented on GitHub (Feb 17, 2016):
ok, thanks for letting me know.
given that i only use the standard functions, i ll think what the differences are (of calling order, as that s the only thing) and try to build a sample sketch we can use to debug and send to esp8266 core so they can research the possible bug there.
will you be able to test stuff?
@solexious commented on GitHub (Feb 17, 2016):
More than happy to. :)
@tzapu commented on GitHub (Feb 23, 2016):
hi,
sorry for the delay
could you give this a spin?
https://gist.github.com/tzapu/5b13866aaa584b32074a
it basically tries to duplicate as much as possible from the WiFiManager flow, without all the nice things, to see if we can find where the issue lies...
@solexious commented on GitHub (Feb 23, 2016):
I've tested that script 10 times, all 10 it worked correctly and connected fine showing the following serial output:
I checked as well and I could see it broadcasting correctly as an AP during the process as well.
@tzapu commented on GitHub (Mar 5, 2016):
i ve added a new fix to WiFiManager that tries to avoid a race condition that i found. i don t think it might be useful in your case, but worth a try nontheless...
@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?
@solexious commented on GitHub (Mar 10, 2016):
Apologies for the delay.
I've just done a git pull and tested it with my module.
It now works perfectly with the examples in the library. I've tried it 10 times with 2 different AP's that the esp is trying to connect to (that it was failing on before) and it connected first time everytime.
Thanks so much for fixing it,
Charles
@tzapu commented on GitHub (Mar 10, 2016):
that is wonderful news
i ll give it a bit more time so if there s anything wrong people can report it, then will release it on lib manager
@wvdv2002 commented on GitHub (Mar 15, 2016):
With the latest commit the ability to make a connection has been greatly improved.
Before a lot of times it took a few restarts to get the connection up and running. Now it directly connects every time. Tested on Android hotspot and KPN Experia Box.
Thanks for solving this bug,
Wouter
@tzapu commented on GitHub (Mar 15, 2016):
good to know, thank you. i ll probably release it soon then
cheers