-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
esp_dpp: Fix retry with esp_supp_dpp_start_listen after failure (IDFGH-9508) #10865
Conversation
This fixes a subtle bug in which ESP_ERR_DPP_TX_FAILURE errors would call esp_supp_dpp_stop_listen which sets the s_dpp_stop_listening flag to true. Subsequent attempts to restart listening with esp_supp_dpp_start_listen then only attempt to listen once more for 500ms before reading the s_dpp_stop_listening flag again and giving up. This contributes greatly to espressif#10615, but the fix here is still largely a work-around as it sometimes requires manually retrying a couple times before it works. Without this fix, any number of retries by deinit/init again will seemingly not work as the retries for currently unknown reasons.
|
In my opinion it actually makes more sense to silently keep retrying for a longer period than 500ms (the spec seems to suggest 5s is reasonable). Further, upon looking into the DPP protocol it seems that there is a new version 2 available and stable that addresses some of the channel misalignment issues we seem to be experiencing. wpa_supplicant on Android is running this version and is even advertising that it wants to use version 2, but wpa_supplicant even in v5.0.1 is using a very old version with only DPP1 support. I recommend upgrading wpa_supplicant as a way of fixing the issue properly, though I can't say for sure this will fix it ATM. |
For context, the dpp-enrollee sample tells us that we should call esp_supp_dpp_start_listen upon error, but it doesn't work for the reasons outlined in this issue. |
This fixes a subtle bug in which ESP_ERR_DPP_TX_FAILURE errors would call esp_supp_dpp_stop_listen which sets the s_dpp_stop_listening flag to true. Subsequent attempts to restart listening with esp_supp_dpp_start_listen then only attempt to listen once more for 500ms before reading the s_dpp_stop_listening flag again and giving up. This contributes greatly to #10615, but the fix here is still largely a work-around as it sometimes requires manually retrying a couple times before it works. Without this fix, any number of retries by deinit/init again will seemingly not work as the retries for currently unknown reasons. Signed-off-by: Shreyas Sheth <[email protected]> Closes #10865
This fixes a subtle bug in which ESP_ERR_DPP_TX_FAILURE errors would call esp_supp_dpp_stop_listen which sets the s_dpp_stop_listening flag to true. Subsequent attempts to restart listening with esp_supp_dpp_start_listen then only attempt to listen once more for 500ms before reading the s_dpp_stop_listening flag again and giving up. This contributes greatly to #10615, but the fix here is still largely a work-around as it sometimes requires manually retrying a couple times before it works. Without this fix, any number of retries by deinit/init again will seemingly not work as the retries for currently unknown reasons. Signed-off-by: Shreyas Sheth <[email protected]> Closes #10865
This fixes a subtle bug in which ESP_ERR_DPP_TX_FAILURE errors would call esp_supp_dpp_stop_listen which sets the s_dpp_stop_listening flag to true. Subsequent attempts to restart listening with esp_supp_dpp_start_listen then only attempt to listen once more for 500ms before reading the s_dpp_stop_listening flag again and giving up. This contributes greatly to #10615, but the fix here is still largely a work-around as it sometimes requires manually retrying a couple times before it works. Without this fix, any number of retries by deinit/init again will seemingly not work as the retries for currently unknown reasons. Signed-off-by: Shreyas Sheth <[email protected]> Closes #10865
This fixes a subtle bug in which ESP_ERR_DPP_TX_FAILURE errors would call esp_supp_dpp_stop_listen which sets the s_dpp_stop_listening flag to true. Subsequent attempts to restart listening with esp_supp_dpp_start_listen then only attempt to listen once more for 500ms before reading the s_dpp_stop_listening flag again and giving up. This contributes greatly to #10615, but the fix here is still largely a work-around as it sometimes requires manually retrying a couple times before it works. Without this fix, any number of retries by deinit/init again will seemingly not work as the retries for currently unknown reasons. Signed-off-by: Shreyas Sheth <[email protected]> Closes #10865
This fixes a subtle bug in which ESP_ERR_DPP_TX_FAILURE errors would call esp_supp_dpp_stop_listen which sets the s_dpp_stop_listening flag to true. Subsequent attempts to restart listening with esp_supp_dpp_start_listen then only attempt to listen once more for 500ms before reading the s_dpp_stop_listening flag again and giving up.
The lack of this fix contributes greatly to #10615, but I don't think this fix addresses the root cause. With this fix, it typically works but sometimes requires manually retrying it in the phone UI a couple of times. Without this fix, any number of retries by deinit/init again will seemingly not work as the retries seem to lose too much state or are not done quickly enough to realistically work around the issue, most likely due to a timing race condition somewhere I can't identify.