diff --git a/include/bluetooth/gatt.h b/include/bluetooth/gatt.h index 91e8a963ee2..a0091db40b1 100644 --- a/include/bluetooth/gatt.h +++ b/include/bluetooth/gatt.h @@ -622,10 +622,12 @@ ssize_t bt_gatt_attr_read_chrc(struct bt_conn *conn, })), \ BT_GATT_ATTRIBUTE(_uuid, _perm, _read, _write, _value) -#if IS_ENABLED(CONFIG_BT_SETTINGS_CCC_LAZY_LOADING) +#if defined(CONFIG_BT_SETTINGS_CCC_LAZY_LOADING) #define BT_GATT_CCC_MAX (CONFIG_BT_MAX_CONN) -#else +#elif defined(CONFIG_BT_CONN) #define BT_GATT_CCC_MAX (CONFIG_BT_MAX_PAIRED + CONFIG_BT_MAX_CONN) +#else + #define BT_GATT_CCC_MAX 0 #endif /** @brief GATT CCC configuration entry. */ diff --git a/subsys/bluetooth/host/Kconfig b/subsys/bluetooth/host/Kconfig index 47a1f339dd7..e1e5de5fa37 100644 --- a/subsys/bluetooth/host/Kconfig +++ b/subsys/bluetooth/host/Kconfig @@ -206,6 +206,7 @@ config BT_SETTINGS if BT_SETTINGS config BT_SETTINGS_CCC_LAZY_LOADING bool "Load CCC values from settings when peer connects" + depends on BT_CONN default y help Load Client Configuration Characteristic setting right after a bonded @@ -215,6 +216,7 @@ config BT_SETTINGS_CCC_LAZY_LOADING config BT_SETTINGS_CCC_STORE_ON_WRITE bool "Store CCC value immediately after it has been written" + depends on BT_CONN help Store Client Configuration Characteristic value right after it has been updated.