intermediate checkin while attempting characteristic discovery

This commit is contained in:
Rohit Grover 2015-04-29 09:14:20 +01:00
parent 096071c25e
commit ba73fee202

View file

@ -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;
}