fix: improve AP signal stability for ESP32-C3 PCB antenna boards#4
Closed
gyanesh-maurya wants to merge 1 commit intoSeanChangX:mainfrom
Closed
fix: improve AP signal stability for ESP32-C3 PCB antenna boards#4gyanesh-maurya wants to merge 1 commit intoSeanChangX:mainfrom
gyanesh-maurya wants to merge 1 commit intoSeanChangX:mainfrom
Conversation
- Reduce TX power to WIFI_POWER_13dBm to prevent signal distortion on boards with small PCB antenna near crystal oscillator - Set HT20 (20 MHz) bandwidth for better client compatibility - Does not change WiFi mode or AP management (NetWizard handles those)
Owner
|
Thanks for taking the time to submit this fix and for testing on the ESP32-C3 Super Mini. We ended up addressing #2 in a slightly different way: we kept NetWizard’s existing flow (including AP_STA so the config AP stays up while trying to connect) and only apply the lower TX power and HT20 after the portal is started, in both main.cpp and network_task.cpp. That way we get the same stability benefit on PCB antenna boards without changing when or how the AP is brought up. We’re closing this PR since that approach is already in main (commit b751a7b), but we really appreciate your contribution and the clear analysis in the PR description. |
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.
Fixes #2
Problem
On ESP32-C3 boards with a small PCB antenna (e.g. Super Mini), the QBIT
Wi-Fi AP either doesn't appear or is too weak to connect to. This is caused
by RF interference between the antenna and the crystal oscillator on these
compact boards.
Root Cause
WiFi.mode(WIFI_AP_STA)(set internally by NetWizard) time-shares thesingle radio between AP and STA, making AP beacons unreliable
distortion
Fix
WiFi.mode(WIFI_AP)beforeNW.autoConnect()so the AP starts witha dedicated radio (NetWizard switches mode internally when connecting to
saved Wi-Fi)
WIFI_POWER_13dBmto prevent signal distortionesp_wifi_set_bandwidth()for betterclient compatibility
softAPConfig()andsoftAP()with channel 1 for maximumcompatibility
Tested on