-
Notifications
You must be signed in to change notification settings - Fork 37
ESP: WiFi: Fix (re)connection #89
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- On ESP32 the call will block execution up to 1s - On ESP8266 the call will block execution up to 30s
- On ESP8266 the call will block execution up to 3s
Memory usage change @ 91f7345
Click for full report table
Click for full report CSV
|
aentinger
approved these changes
Nov 28, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 ESP8266 was running some internal state machine too afaik. That's one of those problems of highly abstracted APIs like WiFi.begin()
- you really don't know what's happening under the hood and how long it might take.
Frenzoid
approved these changes
Nov 29, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue 1: i've got 2 ESP8266 boards and they are not able to connect to my WiFi with the current implementation: it looks like this delay is not enough to get the board connected.
Solution: delay until the board is connected with a maximum timeout of 3s
Issue 2: both my ESP8266 and ESP32 board are not alway reconneting to WiFi if connection drops (power off WiFi from the router)
Solution: moving
WiFi.begin(_ssid, _pass);
inCONNECTING
status with a proper retry delay solves the issue for both boards