Skip to content

fix: ESP32-S3/C3 softAP clients unable to connect - #1865

Open
schulzh wants to merge 1 commit into
tzapu:masterfrom
schulzh:fix/esp32-s3-softap
Open

fix: ESP32-S3/C3 softAP clients unable to connect#1865
schulzh wants to merge 1 commit into
tzapu:masterfrom
schulzh:fix/esp32-s3-softap

Conversation

@schulzh

@schulzh schulzh commented May 16, 2026

Copy link
Copy Markdown

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:

  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 #1482

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
@roberttco

Copy link
Copy Markdown

Just wanted to confirm that this PR fixes the erradic behavior I was having using an ESP32-C3-SuperMini

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Esp32 s3/c3 softap not working esp v2.0.3+

3 participants