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

Bonding after pairing for "ble_app_multirole_lesc"

I have a question about the sample project "ble_app_multirole_lesc (SDK V15.3.0)".

I set the following parameters to perform pairing without bonding.


////////////////////////////////////////////////////////////////////////////////////////
// Security parameters to be used for all security procedures.
sec_params.bond = 0;
sec_params.mitm = 0;
sec_params.lesc = 1;
sec_params.keypress = 0;
sec_params.io_caps = BLE_GAP_IO_CAPS_NONE;
sec_params.oob = 0;
sec_params.min_key_size = 7;
sec_params.max_key_size = 16;
sec_params.kdist_own.enc = 0;
sec_params.kdist_own.id = 0;
sec_params.kdist_peer.enc = 0;
sec_params.kdist_peer.id = 0;

err_code = pm_sec_params_set(&sec_params);
APP_ERROR_CHECK(err_code);
////////////////////////////////////////////////////////////////////////////////////////


Is it possible to manually bond after pairing is confirmed?
Also, please let me know how.

Parents Reply
  • Hi,

    Do you get the disconnected, handle 1, reason 0x13 message after trying to read or write to the heart rate characteristics?

    In that case it may be because in the example this characteristics are initialize to require LESC with MITM (numeric comparison).

    In line 1061, inside hrs_init():

        // Require LESC with MITM (Numeric Comparison).
        hrs_init_params.hrm_cccd_wr_sec = SEC_MITM;
        hrs_init_params.bsl_rd_sec      = SEC_MITM;

    If your characteristics require MITM then you should bond with MITM and set IO capabilities. If you don't want to use MITM then you should change the requirements for the characteristics to "SEC_JUST_WORKS".

    Best Regards,

    Marjeris

Children
No Data
Related