Bugfix for crash when scanning while attempting to join#137
Open
someone42 wants to merge 9 commits intotonyp7:masterfrom
Open
Bugfix for crash when scanning while attempting to join#137someone42 wants to merge 9 commits intotonyp7:masterfrom
someone42 wants to merge 9 commits intotonyp7:masterfrom
Conversation
|
someone42 thank you friend. This helped fix the incorrect password error. :) |
…tton to show password when joining a network, The wifi manager can be reliably stopped and restarted without a system reset, Changes to make DNS server replies more palatable for windows
…ime the wifi manager was restarted
…an old saved connection would cause a crash
…ns during a user-requested connection
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The main commit here (1af351e) is to deal with an issue where if esp32-wifi-manager is attempting to join an AP using stored AP details and can't join, when it attempts to scan for new APs there will be a crash. For example:
esp32-wifi-manager will then crash. This is because join attempts to the old router are still happening in the background, but the user connecting to esp32-wifi-manager's AP will trigger scan requests. As per esp-idf documentation (https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/wifi.html#scan-when-wi-fi-is-connecting), esp_wifi_scan_start() will fail immediately if a join attempt is in progress. The use of the ESP_ERROR_CHECK macro then causes a crash.
The commit introduces a software timer which will retry the scan later if it fails.
The other commit (9ddab86) is just something to deal with compilation errors I was getting when trying to include wifi_manger.h in my own application.