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

No BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST with secure connection?

When I add an attribute with BLE_GAP_CONN_SEC_MODE_SET_OPEN I get a BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event when I try to read it. I do not however get a BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST event when I add the attributes with BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM. Why?

  • If you want the sole control, then set the required security level to "OPEN". If the softdevice had given you an authorization event for a security-restricted attribute (and the current link was unencrypted), your only action would be to reject the read, as to not break the spec. I am not sure how useful it would be to wake up the application just for this, but I can understand that it feels inconsistent if you think authorization takes priority over authentication.

Related