Skip to content

Commit 6648d09

Browse files
authored
[esp32_ble] Document connection_timeout configuration option (#5196)
* [esp32_ble] Document connection_timeout configuration option * sanity
1 parent 075c777 commit 6648d09

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

components/esp32_ble.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ can run.
2323
esp32_ble:
2424
io_capability: keyboard_only
2525
disable_bt_logs: true # Default, saves flash
26+
connection_timeout: 20s # Default, matches client timeout
2627
2728
Configuration variables:
2829
------------------------
@@ -48,6 +49,15 @@ Configuration variables:
4849

4950
The ``disable_bt_logs`` option intelligently disables only the Bluetooth logging categories that are not required by your configuration. Each Bluetooth component registers the specific loggers it needs, and all unused loggers are automatically disabled during compilation. This includes loggers for Classic Bluetooth features (like RFCOMM, A2DP, HID) that are not used by ESPHome's BLE implementation.
5051

52+
- **connection_timeout** (*Optional*, :ref:`config-time`): The maximum time to wait for a BLE connection to be established. Only available when using ESP-IDF framework. Defaults to ``20s``.
53+
54+
- Range: 10 to 180 seconds
55+
- This timeout should align with the timeout used by your BLE client software to prevent connection slot waste
56+
57+
.. note::
58+
59+
The ``connection_timeout`` option is particularly important when using ESPHome as a Bluetooth proxy. The default of 20 seconds matches the timeout used by aioesphomeapi and bleak-retry-connector. If a connection attempt times out on the client side but ESP-IDF continues trying to connect, the connection slot remains occupied and unavailable for new connections. Setting this to match your client timeout ensures connection slots are freed immediately when a connection fails.
60+
5161
``ble.disable`` Action
5262
-----------------------
5363

0 commit comments

Comments
 (0)