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

Secure connect when event PM_EVT_BONDED_PEER_CONNECTED

nRF52832, SDK15, s132

When I have event PM_EVT_BONDED_PEER_CONNECTED, should I call

pm_conn_secure(p_evt->conn_handle, false);

for secure connection? Or it secure connect will call automaticly from SD? Because after event  

PM_EVT_BONDED_PEER_CONNECTED 

I get automaticly PM_EVT_CONN_SEC_SUCCEEDED

Or this

pm_conn_secure(p_evt->conn_handle, false);

needs only for bonding?

Parents
  • Hi,

    Someone needs to initiate encryption of the link, but if you are making a peripheral and have already bonded, the central will typically do this. The rest is not handled by the SoftDevice itself, but it is handled for you. Specifically, the SoftDevice will send the application a BLE_GAP_EVT_SEC_INFO_REQUEST (see MSC), and it is taken care of in the peer manager function sec_info_request_process() (security_dispatcher.c).

Reply
  • Hi,

    Someone needs to initiate encryption of the link, but if you are making a peripheral and have already bonded, the central will typically do this. The rest is not handled by the SoftDevice itself, but it is handled for you. Specifically, the SoftDevice will send the application a BLE_GAP_EVT_SEC_INFO_REQUEST (see MSC), and it is taken care of in the peer manager function sec_info_request_process() (security_dispatcher.c).

Children
Related