Hi everyone ! I have a problem for configuring Wifi and BLE 1. Hardware Environment: Chip: ESP32-S3 N16R8 (ESP-IDF Framework, ESPHome library connect to Home Assistant ) Current Setup: Using esp32_ble_tracker sensors 2. Problems being encountered: Radio Conflict: When the ESP32-S3 is in Access Point mode (to set up Wi-Fi), the phone App is difficult to connect or times out because the default Esp32_ble_tracker automatically scans (scans) as soon as it starts, causing controversy over Radio resources. Scanning Wi-Fi points: Scanning Wi-Fi channels when starting the forum is slow (at least ~8 seconds)
3. Tested solutions: Adjust setup_priority: -100 for BLE Tracker and use stop_scan at -101 to release Radio for AP Mode.
Configure Coexistence in SDKConfig to prioritize Wi-Fi.
4. Questions requiring advice: Question A : How to completely suppress BLE automatic scanning at the Driver level right after initialization without waiting for the stop_scan command?
Regarding Wi-Fi Access Point (AP Mode) connection performance:
In AP mode for user setup (Captive Portal), I encountered a situation where the phone App often timed out or could not find the SSID when BLE Tracker was active. Even with interval/window optimization, Radio switching between Wi-Fi Beacon and BLE Scan still causes large jitter.
Question B : Besides using stop_scan, is there any advanced configuration in esp-idf to force the ESP32-S3 to reserve 100% of the Radio resources for the Wi-Fi AP without being periodically “wakened up” by the Bluetooth driver?
I want to ensure the Wi-Fi Handshaking process is not interrupted by any BLE scanning cycles until the Wi-Fi STA is successfully connected.
Hi @Karosm Goal: I want to set up a “Clean” boot process (Radio-Clean Boot). In particular, the 2.4GHz Radio must devote 100% of its resources to the Wi-Fi AP so that the phone application can connect and set up Wi-Fi in the smoothest way. Only after the Wi-Fi STA connects successfully, BLE is enabled.
Problem with stop_scan currently: Even though I set setup_priority: -100 for BLE Tracker and immediately called stop_scan at level -101, in fact the AP connection is still very slow (Frequently reporting Time Out or SSID not found).
Reasons I suspect stop_scan is not good enough: Race Condition: It appears that the Bluetooth Driver still responds to startup and takes control of the Radio for an extremely short period of time before the stop_scan command takes effect.
Background activity: Even when scanning is stopped, the Bluetooth Driver still maintains some interference or jitter in the Wi-Fi Handshake process, leading to the Application timeout.
My question for the experts:
Is there a “Hard-Stop” method to initialize the BLE component without touching the Radio until explicitly told to do so?
Does stop_scan actually release all hardware registers, or is there a low-level background task in the ESP-IDF Bluetooth stack that still interferes with the Wi-Fi AP handshake/handshake?
How can I ensure a specific 100% “No Bluetooth” radio environment during the Captive/Provisioned Port phase?
If you are using the API component why not use the api.connected function within that to signal to start the ble scan. That way until the device is up and connected to HA it won’t start the scan.
Remove the window and interval settings and leave as default, those were only suggested for wired environments and I think even that guidance has been removed.
Hi @EBME2
I’m very happy for your suggestion. I will test them out tomorrow
I’m very happy to receive welcome from the group and help from you. I hope there are many more useful solutions like you so I can solve the problem I am facing. I’m very grateful for this. Thank you so much !
Not an expert but I would expect that if you have
continuous: false
and scanning not started, esp gives the Wi-Fi stack full priority over the antenna.
Hi @huytran-df I’d try removing the window and interval settings first as that may fix your issue and make the rest unnecessary. There was a bit of lack of clarity in the past documentation that caught many people out including me. The settings you have were recommended for wired Ethernet but many people thought you had to use for all devices, if you did it killed Wi-Fi connectivity to HA.
The current documentation recommends leaving as default.
Hi @EBME2
I’m trying to optimize Radio resources on ESP32-S3 by only enabling BLE when Home Assistant is actually connected (subscribed entity). However, I’m encountering two serious problems:
YAML Syntax Error: When using state_subscription_only: true in the api.connected condition, the compiler reports the error: [state_subscription_only] is an invalid option for [api.connected].
Hi @Karosm
If so, is there a solution to prevent my ESP32S3 from failing to connect or getting timeout errors when setting up Wi-Fi via the phone app while in AP mode? Thanks !
Hi @EBME2@Karosm
I just wanted to express my sincere gratitude for your help. I have resolved the problem using state_subscription_only: true when updating esphome version 2026.1.3
I will come back again if I have seen the problem again. Thanks, Have a nice day !!!