-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Description
Description of defect
The following preprocessor switch prevents handling of notifications and indications (pushing to the client) when the security feature is disabled. Removing the preprocessor switch fixes the issue. Any idea why this code snippet has anything to do with the security switch?
mbed-os/connectivity/FEATURE_BLE/source/cordio/source/GattServerImpl.cpp
Lines 827 to 848 in 2eb06e7
// This characteristic has a CCCD attribute. Handle notifications and | |
// indications for all active connections if the authentication is | |
// successful | |
size_t updates_sent = 0; | |
#if BLE_FEATURE_SECURITY | |
for (dmConnId_t conn_id = DM_CONN_MAX; conn_id > DM_CONN_ID_NONE; --conn_id) { | |
if (DmConnInUse(conn_id) == true) { | |
if (is_update_authorized(conn_id, att_handle)) { | |
uint16_t cccd_config = AttsCccEnabled(conn_id, cccd_index); | |
if (cccd_config & ATT_CLIENT_CFG_NOTIFY) { | |
AttsHandleValueNtf(conn_id, att_handle, len, (uint8_t *) buffer); | |
updates_sent++; | |
} | |
if (cccd_config & ATT_CLIENT_CFG_INDICATE) { | |
AttsHandleValueInd(conn_id, att_handle, len, (uint8_t *) buffer); | |
updates_sent++; | |
} | |
} | |
} | |
} | |
#endif // BLE_FEATURE_SECURITY |
Target(s) affected by this defect ?
BLE targets.
Toolchain(s) (name and version) displaying this defect ?
GCC ARM
What version of Mbed-os are you using (tag or sha) ?
mbed-os-6.15.0
What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
Not related
How is this defect reproduced ?
Get the update GATT server example and disable security with: "ble.ble-feature-security": false
. Observe no notifications being received by the client.
AGlass0fMilk and ladislas