Skip to content

Commit d20e3f7

Browse files
authored
Document max_notifications configuration option for esp32_ble component (#5208)
1 parent 5688515 commit d20e3f7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

components/esp32_ble.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ can run.
2424
io_capability: keyboard_only
2525
disable_bt_logs: true # Default, saves flash
2626
connection_timeout: 20s # Default, matches client timeout
27+
max_notifications: 12 # Default, increase if needed
2728
2829
Configuration variables:
2930
------------------------
@@ -58,6 +59,16 @@ Configuration variables:
5859

5960
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.
6061

62+
- **max_notifications** (*Optional*, integer): The maximum number of BLE characteristics that can have notifications enabled across all connections. Only available when using ESP-IDF framework. Defaults to ``12``.
63+
64+
- Range: 1 to 64
65+
- This is a global limit shared across all BLE connections
66+
- Increase if you see ``ESP_GATT_NO_RESOURCES`` (status=128) errors when enabling notifications
67+
68+
.. note::
69+
70+
The ``max_notifications`` option controls the ``CONFIG_BT_GATTC_NOTIF_REG_MAX`` ESP-IDF setting. This limit is per GATT client interface, not per connection. If you're using ESPHome as a Bluetooth proxy with multiple devices that have many characteristics requiring notifications, you may need to increase this value. The error ``status=128`` in logs indicates you've hit this limit.
71+
6172
``ble.disable`` Action
6273
-----------------------
6374

0 commit comments

Comments
 (0)