diff --git a/btle/btle.cpp b/btle/btle.cpp index 8e8f715..d88e26d 100644 --- a/btle/btle.cpp +++ b/btle/btle.cpp @@ -186,6 +186,13 @@ static void btle_handler(ble_evt_t *p_ble_evt) p_ble_evt->evt.gattc_evt.params.prim_srvc_disc_rsp.services[index].uuid.uuid, p_ble_evt->evt.gattc_evt.params.prim_srvc_disc_rsp.services[index].handle_range.start_handle, p_ble_evt->evt.gattc_evt.params.prim_srvc_disc_rsp.services[index].handle_range.end_handle); + + ble_gattc_handle_range_t handleRange = { + .start_handle = p_ble_evt->evt.gattc_evt.params.prim_srvc_disc_rsp.services[index].handle_range.start_handle, + .end_handle = p_ble_evt->evt.gattc_evt.params.prim_srvc_disc_rsp.services[index].handle_range.end_handle + }; + printf("characteristics_discover returned %u\r\n", + sd_ble_gattc_characteristics_discover(p_ble_evt->evt.gattc_evt.conn_handle, &handleRange)); } printf("services discover returned %u\r\n", sd_ble_gattc_primary_services_discover(p_ble_evt->evt.gattc_evt.conn_handle, @@ -204,6 +211,15 @@ static void btle_handler(ble_evt_t *p_ble_evt) } break; + case BLE_GATTC_EVT_CHAR_DISC_RSP: { + switch (p_ble_evt->evt.gattc_evt.gatt_status) { + default: + printf("gatt failure status: %u\r\n", p_ble_evt->evt.gattc_evt.gatt_status); + break; + } + break; + } + default: break; }