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

Long Read with authorize: how to reply with ATTERR_INVALID_OFFSET

What is the exact sequence when reading a characteristic with variable length and authorize required.

When I have a actual data length of 14 I can read with offset = 0 and a normal "Read Request" is transmitted.

How do I know that I have read all data? Do I have to do send a second Read with offset to know that there are no more data left?

When I do a second read with offset = 14, a "Read Blob Request is sent from the client to the server, and I want to answer with BLE_GATT_STATUS_ATTERR_INVALID_OFFSET. Calling "sd_ble_gatts_rw_authorize_reply" with status =  BLE_GATT_STATUS_ATTERR_INVALID_OFFSET results in the erro_code INVALID_PARAM.

Related