From c75240a939206892c133b3a46d405a691083384f Mon Sep 17 00:00:00 2001 From: Hrishikesh Dhayagude Date: Fri, 19 Jul 2019 14:34:57 +0800 Subject: [PATCH] NimBLE: Give an option to configuration no of bonds and CCCD's to save through menuconfig --- components/bt/host/nimble/Kconfig.in | 14 ++++++++++++++ .../bt/host/nimble/port/include/esp_nimble_cfg.h | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/components/bt/host/nimble/Kconfig.in b/components/bt/host/nimble/Kconfig.in index 24d969e74..2fcbf91c7 100644 --- a/components/bt/host/nimble/Kconfig.in +++ b/components/bt/host/nimble/Kconfig.in @@ -7,6 +7,20 @@ config BT_NIMBLE_MAX_CONNECTIONS help Defines maximum number of concurrent BLE connections +config BT_NIMBLE_MAX_BONDS + int "Maximum number of bonds to save across reboots" + default 3 + depends on BT_NIMBLE_ENABLED + help + Defines maximum number of bonds to save for peer security and our security + +config BT_NIMBLE_MAX_CCCDS + int "Maximum number of CCC descriptors to save across reboots" + default 8 + depends on BT_NIMBLE_ENABLED + help + Defines maximum number of CCC descriptors to save + config BT_NIMBLE_L2CAP_COC_MAX_NUM int "Maximum number of connection oriented channels" range 0 10 diff --git a/components/bt/host/nimble/port/include/esp_nimble_cfg.h b/components/bt/host/nimble/port/include/esp_nimble_cfg.h index 5208f733d..7b9da7521 100644 --- a/components/bt/host/nimble/port/include/esp_nimble_cfg.h +++ b/components/bt/host/nimble/port/include/esp_nimble_cfg.h @@ -568,11 +568,11 @@ #endif #ifndef MYNEWT_VAL_BLE_STORE_MAX_BONDS -#define MYNEWT_VAL_BLE_STORE_MAX_BONDS (3) +#define MYNEWT_VAL_BLE_STORE_MAX_BONDS CONFIG_BT_NIMBLE_MAX_BONDS #endif #ifndef MYNEWT_VAL_BLE_STORE_MAX_CCCDS -#define MYNEWT_VAL_BLE_STORE_MAX_CCCDS (8) +#define MYNEWT_VAL_BLE_STORE_MAX_CCCDS CONFIG_BT_NIMBLE_MAX_CCCDS #endif #ifndef MYNEWT_VAL_BLE_STORE_CONFIG_PERSIST