Skip to content

fix: improve AP signal stability for ESP32-C3 PCB antenna boards#4

Closed
gyanesh-maurya wants to merge 1 commit intoSeanChangX:mainfrom
gyanesh-maurya:fix/ap-signal-esp32c3-pcb-antenna
Closed

fix: improve AP signal stability for ESP32-C3 PCB antenna boards#4
gyanesh-maurya wants to merge 1 commit intoSeanChangX:mainfrom
gyanesh-maurya:fix/ap-signal-esp32c3-pcb-antenna

Conversation

@gyanesh-maurya
Copy link
Contributor

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 the
    single radio between AP and STA, making AP beacons unreliable
  • Default TX power is too high for small PCB antennas, causing signal
    distortion
  • Default HT40 (40 MHz) bandwidth reduces compatibility with some devices

Fix

  • Set WiFi.mode(WIFI_AP) before NW.autoConnect() so the AP starts with
    a dedicated radio (NetWizard switches mode internally when connecting to
    saved Wi-Fi)
  • Reduce TX power to WIFI_POWER_13dBm to prevent signal distortion
  • Set HT20 (20 MHz) bandwidth via esp_wifi_set_bandwidth() for better
    client compatibility
  • Explicit softAPConfig() and softAP() with channel 1 for maximum
    compatibility

Tested on

  • ESP32-C3 (Super Mini variant)

- 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)
@SeanChangX
Copy link
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.

@SeanChangX SeanChangX closed this Mar 5, 2026
@gyanesh-maurya gyanesh-maurya deleted the fix/ap-signal-esp32c3-pcb-antenna branch March 5, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

There is no Wi-Fi being created.

2 participants