Hi, all
I'm using nRF52832 pc10040, s132.
This is ble_app_uart_c example, and I'm trying to read my own beacon device's characteristic value.
ble_uuid_t p_uuid = {.uuid = 0x1601, .type = BLE_UUID_TYPE_BLE};
ble_gattc_handle_range_t p_handle_range = {.start_handle = 0x0001, .end_handle = 0xFFFF};
err_code = sd_ble_gattc_char_value_by_uuid_read(p_ble_nus_evt->conn_handle, &p_uuid, &p_handle_range);
if(err_code != NRF_SUCCESS)
{
NRF_LOG_INFO("Failed to send read request to peer error = %d", err_code);
printf("\n\rFailed to send read request to peer error = %d\n\r", err_code);
}
I successfully retrieved device name using line 4: 'sd_ble_gattc_char_value_by_uuid_read'.
I also read the value of '0' before my device sent data.

But if I try to read the moment the device sends data, I can't get the value right.

I have to read this type of value.

case BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP :
for(uint32_t j = 0; j <= p_read_rsp->len; j++) {
for (uint32_t i = 0; i < p_read_rsp->offset; i++)
{
while(app_uart_put( p_read_rsp->data[i]) != NRF_SUCCESS);
}
printf("\r\n");
}
break;
this is my output part code.
How can I get this value?