This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Correct parameter to sd_ble_gap_sec_params_reply() when bonding not allowed

Hello,

I decided that bonding (does it equivalent to "pairing"?) is not allowed in my application, so I modified the following definition in main.c: #define SEC_PARAM_BOND 0 //1

And inside the on_ble_evt() function, I am not sure which of the following 2 options is correct when replying to the BLE_GAP_EVT_SEC_PARAMS_REQUEST event, please advise.

option 1) case BLE_GAP_EVT_SEC_PARAMS_REQUEST: err_code = sd_ble_gap_sec_params_reply(m_conn_handle, BLE_GAP_SEC_STATUS_SUCCESS, &m_sec_params); break;

option 2) case BLE_GAP_EVT_SEC_PARAMS_REQUEST: err_code = sd_ble_gap_sec_params_reply(m_conn_handle, BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP, &m_sec_params); break;

Thank you! Joseph

Related