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

Accepted GATT status for write authorization reply?

I'm sending a write authorization reply using sd_ble_gatts_rw_authorize_reply() in response to a standard Write Request with one byte of data. When I set the gatt_status to BLE_GATT_STATUS_ATTERR_REQUEST_NOT_SUPPORTED, the reply() function returns NRF_ERROR_INVALID_PARAM. However, if I set the gatt_status to BLE_GATT_STATUS_ATTERR_WRITE_NOT_PERMITTED, the reply() function returns NRF_SUCCESS. The other parameters in the authorization reply are the same in both cases.

Is there a reason why BLE_GATT_STATUS_ATTERR_REQUEST_NOT_SUPPORTED cannot be used?

More importantly, What are the valid GATT status codes than can be used for a write authorization reply? What are the valid GATT status codes for a read authorization reply?

I'm using S132 v2.0.1 and SDK 11.0.0 on the nRF52.

Thanks, Austin

Related