This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to read more than 1 byte using sd_ble_gattc_read?

Hi I use 4 characteristics in peripheral and central. When I write to one of the characteristics in the peripheral, I read it using sd_ble_gattc_read in the central. But, when BLE_GATTC_EVT_READ_RSP is got, only p_ble_evt->evt.gattc_evt.params.read_rsp.data[0] is present. The p_ble_evt->evt.gattc_evt.params.read_rsp.len is correct though (I send 20 bytes from peripheral to central in that particular characteristic). Is there a way to get all the 20 characteristics using sd_ble_gattc_read? or, can this be done only with sd_ble_gattc_char_value_by_uuid_read? Do you have any example (central and peripheral code) that uses sd_ble_gattc_char_value_by_uuid_read to read more than 20 bytes in one characteristic?

Related