microbit: Update to indicate service change on SYS_ATTR_MISSING
When using bonded connections to a central device, an explicit service changed indication should be used in cases where a device's GATT table appears out of date. This patch preserves the metadata of the Service Changed characterisitic, and also adds this indication as described.
This commit is contained in:
parent
47098827fc
commit
fd017fbf2b
1 changed files with 2 additions and 1 deletions
|
@ -422,7 +422,8 @@ void nRF5xGattServer::hwCallback(ble_evt_t *p_ble_evt)
|
|||
}
|
||||
|
||||
case BLE_GATTS_EVT_SYS_ATTR_MISSING:
|
||||
sd_ble_gatts_sys_attr_set(gattsEventP->conn_handle, NULL, 0, 0);
|
||||
sd_ble_gatts_sys_attr_set(gattsEventP->conn_handle, NULL, 0, BLE_GATTS_SYS_ATTR_FLAG_USR_SRVCS);
|
||||
sd_ble_gatts_service_changed(gattsEventP->conn_handle, 0x000c, 0xffff);
|
||||
return;
|
||||
|
||||
case BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST:
|
||||
|
|
Loading…
Add table
Reference in a new issue