From de2743b702c8571188e078696b27a3bd76bd2bec Mon Sep 17 00:00:00 2001 From: paul-szczepanek-arm <33840200+paul-szczepanek-arm@users.noreply.github.com> Date: Tue, 14 May 2019 10:16:08 +0100 Subject: [PATCH 1/2] not include attribute write cback for CCC --- .../targets/TARGET_CORDIO/source/CordioGattServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioGattServer.cpp b/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioGattServer.cpp index d4a0f9db1b..ff9cc6683b 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioGattServer.cpp +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioGattServer.cpp @@ -543,7 +543,7 @@ ble_error_t GattServer::insert_descriptor( #endif // BLE_FEATURE_SECURITY } - if (properties & WRITABLE_PROPERTIES) { + if (properties & WRITABLE_PROPERTIES && !(attribute_it->settings & ATTS_SET_CCC)) { attribute_it->settings |= ATTS_SET_WRITE_CBACK; } } From eda064563c796b3f78efe34367b54eebb9bf1c94 Mon Sep 17 00:00:00 2001 From: paul-szczepanek-arm <33840200+paul-szczepanek-arm@users.noreply.github.com> Date: Tue, 14 May 2019 11:20:14 +0100 Subject: [PATCH 2/2] no read callback for CCC --- .../targets/TARGET_CORDIO/source/CordioGattServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioGattServer.cpp b/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioGattServer.cpp index ff9cc6683b..08cd7ae124 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioGattServer.cpp +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioGattServer.cpp @@ -510,7 +510,7 @@ ble_error_t GattServer::insert_descriptor( #endif // BLE_FEATURE_SECURITY } - if (properties & READ_PROPERTY) { + if (properties & READ_PROPERTY && !(attribute_it->settings & ATTS_SET_CCC)) { attribute_it->settings |= ATTS_SET_READ_CBACK; } }