summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Lilleengen <lulf@redhat.com>2022-06-27 20:40:47 +0200
committerGitHub <noreply@github.com>2022-06-27 20:40:47 +0200
commit60655f023612131ee7a44cf5c9415b4b9b11e4c0 (patch)
treec7a9c4762a733d7a883727de0b8528094ab92585
parenta5026485151138112b522a27c4a340614d7a7512 (diff)
parent6f19ca1f0c3a7cfdf23089f6e114b1c80250af43 (diff)
downloadnrf-softdevice-60655f023612131ee7a44cf5c9415b4b9b11e4c0.zip
Merge pull request #118 from xgroleau/fix/117_cccd_not_initialized
Fix cccd attribute missing
-rw-r--r--nrf-softdevice/src/ble/gatt_server.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/nrf-softdevice/src/ble/gatt_server.rs b/nrf-softdevice/src/ble/gatt_server.rs
index 398f88d..99d22dd 100644
--- a/nrf-softdevice/src/ble/gatt_server.rs
+++ b/nrf-softdevice/src/ble/gatt_server.rs
@@ -182,6 +182,12 @@ where
server.on_write(params.handle, &v).map(|e| f(e));
}
+ raw::BLE_GATTS_EVTS_BLE_GATTS_EVT_SYS_ATTR_MISSING => {
+ info!("initializing gatt sys att");
+ let ret =
+ raw::sd_ble_gatts_sys_attr_set(conn_handle, ::core::ptr::null(), 0, 0);
+ RawError::convert(ret).err();
+ }
_ => {}
}
None