summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2019-01-23 22:12:38 -0500
committerDan Halbert <halbert@halwitz.org>2019-01-23 22:12:38 -0500
commit7998a7696d31c68c8837af86173ec5d507567ca2 (patch)
treea167eb8ae5a728d5beec950ee4f953ec9aec7a71
parentb1f1bb1389809e07c8b315aa9891d58e79c247e9 (diff)
also handle BLE_GATTS_EVT_SYS_ATTR_MISSING: fixes Android:
-rw-r--r--ports/nrf/common-hal/bleio/Peripheral.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/nrf/common-hal/bleio/Peripheral.c b/ports/nrf/common-hal/bleio/Peripheral.c
index 9dedc33e9..0a5a8069d 100644
--- a/ports/nrf/common-hal/bleio/Peripheral.c
+++ b/ports/nrf/common-hal/bleio/Peripheral.c
@@ -275,6 +275,10 @@ STATIC void peripheral_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
break;
}
+ case BLE_GATTS_EVT_SYS_ATTR_MISSING:
+ sd_ble_gatts_sys_attr_set(self->conn_handle, NULL, 0, 0);
+ break;
+
default:
// For debugging.
// mp_printf(&mp_plat_print, "Unhandled peripheral event: 0x%04x\n", ble_evt->header.evt_id);