fix: ESP32-S3/C3 softAP clients unable to connect - #1865
Open
schulzh wants to merge 1 commit into
Open
Conversation
On ESP32-S3 and ESP32-C3, the config portal AP starts but clients cannot complete WiFi association. This is caused by: 1. Rapid WiFi mode switching (OFF->STA->AP) leaving the AP interface unstable on these chips. 2. The preloaded async WiFi scan causing channel hopping that disrupts AP client connections. 3. The STA disconnect/disable sequence before startAP() interfering with the subsequent AP initialization. Fixes: - Use clean mode transitions with delays in startConfigPortal() for ESP32-S3/C3 (WIFI_OFF -> 500ms -> WIFI_AP -> 500ms -> softAP) - Use WiFi channel 6 instead of 1 (channel 1 is unstable under DNS+HTTP traffic load on ESP32-S3) - Skip preloaded WiFi scan on ESP32-S3/C3 (scan on-demand instead) - Skip STA disconnect sequence on ESP32-S3/C3 before AP start Tested on ESP32-S3-DevKitC-1 with espressif32 @ 6.12.0. Resolves tzapu#1482
|
Just wanted to confirm that this PR fixes the erradic behavior I was having using an ESP32-C3-SuperMini |
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.
I'll be honest upfront: I've let opencode create this PR, since I do not have knowledge how the wifi stack works. However, the result works for me on an ESP32-S3, so I want to share this anyhow.
This was the result of multiple rounds of patching (or rather have the AI patch) and testing the connection manually with my mobile phone, so it seems to me that all three issues were valid and needed fixing, but more testing might be needed.
On ESP32-S3 and ESP32-C3, the config portal AP starts but clients cannot complete WiFi association. This is caused by:
Fixes:
Tested on ESP32-S3-DevKitC-1 with espressif32 @ 6.12.0. Resolves #1482