1
0
mirror of https://github.com/esphome/esphome.git synced 2025-02-25 14:28:14 +00:00

Fix BLE max notifications with ESP-IDF 5.x (#8301)

This commit is contained in:
J. Nick Koston 2025-02-24 09:12:15 -05:00 committed by GitHub
parent bfa3254d6c
commit 96682f5cbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -238,6 +238,12 @@ async def to_code(config):
else: else:
add_idf_sdkconfig_option("CONFIG_BTU_TASK_STACK_SIZE", 8192) add_idf_sdkconfig_option("CONFIG_BTU_TASK_STACK_SIZE", 8192)
add_idf_sdkconfig_option("CONFIG_BT_ACL_CONNECTIONS", 9) add_idf_sdkconfig_option("CONFIG_BT_ACL_CONNECTIONS", 9)
# CONFIG_BT_GATTC_NOTIF_REG_MAX controls the number of
# max notifications in 5.x, setting CONFIG_BT_ACL_CONNECTIONS
# is enough in 4.x
# https://github.com/esphome/issues/issues/6808
if CORE.data[KEY_CORE][KEY_FRAMEWORK_VERSION] >= cv.Version(5, 0, 0):
add_idf_sdkconfig_option("CONFIG_BT_GATTC_NOTIF_REG_MAX", 9)
cg.add_define("USE_OTA_STATE_CALLBACK") # To be notified when an OTA update starts cg.add_define("USE_OTA_STATE_CALLBACK") # To be notified when an OTA update starts
cg.add_define("USE_ESP32_BLE_CLIENT") cg.add_define("USE_ESP32_BLE_CLIENT")