gatt_read() returns an error code 0x3002

Device: nrf52833 

SD S140

Application - Central Host, based on uart central sample project

The peripheral device needs to deliver a block of data (10-20K bytes) to the Central Application.  A BLE connectiion is made, then the Central app will read a characteristic multiple times until the block of data is read.  The periperal will automatically update the characteristic after each Read request of the Central.

Problem: After 200 successful reads of an expected 1200, the soft device returns the following error code.   Code == x3002, invalid handle?

NRF_LOG_DEBUG("READ logger DATA");
err_code = sd_ble_gattc_read(p_ble_nus_c->conn_handle, p_ble_nus_c->handles.cble_logger_handle,0);

return err_code

I need help debugging why this is occurring wthout a disconnect event after many successful reads.

Thanks,

Dan

Parents
  • Can you print the conn_handle and and attribute handle (first and second parameters for sd_ble_gattc_read) as logs when you read the characteristic. Since you are reading the same characteristic on the same connection, they should remain same. If your logs say that your handle is valid when you get the error, then we should dig a bit more into this as that might be a buggy behaviour somewhere in our solution.

Reply
  • Can you print the conn_handle and and attribute handle (first and second parameters for sd_ble_gattc_read) as logs when you read the characteristic. Since you are reading the same characteristic on the same connection, they should remain same. If your logs say that your handle is valid when you get the error, then we should dig a bit more into this as that might be a buggy behaviour somewhere in our solution.

Children
No Data
Related