Hi,
I am using nRF5 SDK v17.2.0 on a legacy product. I have code that looks like this:
ret_code_t rc = sd_ble_gatts_rw_authorize_reply(event->evt.common_evt.conn_handle, &authParams);
if (rc == NRF_SUCCESS)
{
NRF_LOG_INFO("Event history - read %d events starting at %d", eventListContent.events().get_length(), originalOffset);
}
else
{
NRF_LOG_ERROR("Failed to reply to event history read request. RC: %d", rc);
}
When reading the characteristic repeatedly, I sometimes see something like this printed out:
00> <info> app: Event history - read 8 events starting at 0 00> <info> app: Event history - read 8 events starting at 8 00> <info> app: Event history - read 8 events starting at 16 00> <info> app: Event history - read 8 events starting at 24 00> <info> app: Event history - read 8 events starting at 32 00> <error> app: Failed to reply to event history read request. RC: 8 00> <info> app: Event history - read 8 events starting at 48 00> <info> app: Event history - read 8 events starting at 56 00> <info> app: Event history - read 0 events starting at 64
Return code of 8 corresponds to NRF_ERROR_INVALID_STATE. Why would I get that?