Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay to connect with wifi #41

Closed
uncodead opened this issue Jul 5, 2019 · 3 comments
Closed

Delay to connect with wifi #41

uncodead opened this issue Jul 5, 2019 · 3 comments
Assignees

Comments

@uncodead
Copy link

uncodead commented Jul 5, 2019

Hello!

After updating my project with your master, I realized that esp is taking a few minutes to connect to wifi. Did you notice that too?

@rjwats
Copy link
Owner

rjwats commented Jul 6, 2019

There is a deliberate delay if there is a failure to connect to the WiFi. See the code in WiFiSettingsService.cpp to see how this works. The delay is fixed to 60 seconds.

The delay is required to prevent the device continually channel switching when in auto-reconnect mode - this causes the access point stability issues.

There might be an improved solution to this with a back-off retry approach which would allow for more frequent retries without crippling the access point.

I'll look at implementing this soon.

@rjwats rjwats self-assigned this Jul 6, 2019
@uncodead
Copy link
Author

uncodead commented Jul 6, 2019 via email

@rjwats
Copy link
Owner

rjwats commented Jul 6, 2019

Setting the access point provision mode to "never" will prevent the access point from coming up in the event of WiFi connection failure. Disable it if you like, but you won't be able to re-configure the device if you change your WiFi password (without re-flashing via serial).

The back-off retry approach might give you better luck. I've not had any issues with connecting to WiFi first time personally so this issue I suspect it's related to WiFi channel switching. I'm planning on implementing the exponential back-off retry approach, which might help in your situation.

@uncodead uncodead closed this as completed Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants