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

Multiple GATT read with RedBear Nano (nRF52)

Hi! I'm using two RedBear Nano v2 and I'm trying to read a long characteristic from one of the two devices. As I read in other posts in the forum, I need to invoke the read method multiple times with increasing offsets in order to read the entire characteristic. However, if I invoke the read method multiple times, it seems that only the callback regarding the last read is executed.

Do you have any suggestion on how can I address this issue?

Thanks in advance for the help.

Parents
  • Hi,

    That sounds strange. Are you checking the return code of sd_ble_gattc_read()? Make sure that you wait for a BLE_GATTC_EVT_READ_RSP after every call to sd_ble_gattc_read(), before you start new read operation. Otherwise sd_ble_gattc_read() should return NRF_ERROR_BUSY

    If that isn't the problem, can you show us how you perform the read operations? And what SDK and Softdevice version are you using? 

Reply
  • Hi,

    That sounds strange. Are you checking the return code of sd_ble_gattc_read()? Make sure that you wait for a BLE_GATTC_EVT_READ_RSP after every call to sd_ble_gattc_read(), before you start new read operation. Otherwise sd_ble_gattc_read() should return NRF_ERROR_BUSY

    If that isn't the problem, can you show us how you perform the read operations? And what SDK and Softdevice version are you using? 

Children
No Data
Related