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

Secure Connections Only Mode

How do I enable Secure Connections Only mode on S130/nRF51?

Alternatively, how do I tell if pairing was performed using LE Secure Connections?

  • Hi Tim,

    You can find the pairing parameters from the peer device when BLE_GAP_EVT_SEC_PARAMS_REQUEST event occurs. If you don't want to bond with a device doesn't support LE secure connection you can reject that with the sd_ble_gap_sec_params_reply().

    In addition, when you declare a characteristic, you can choose the security level. If you choose security level 4, BLE_GAP_CONN_SEC_MODE_SET_LESC_ENC_WITH_MITM() , bonding with LE Secure connection will be required if the peer wants to read data from the characteristic.

    When 2 device paired, you will receive BLE_GAP_EVT_AUTH_STATUS, and you can find in the parameter comes (ble_gap_evt_auth_status_t) with the event the security level that the connection currently is.

Related