Hello
I have developed an application on my nRF52840 which allows a smartphone to be able to connect in secure BLE.
Everything works fine but I notice that every time I do a "pairing" via an Android smartphone, that the smartphone "bonds" the device even though I specified in the request that I did not want bondage.. I don't have this problem on IOS.
I have tested with your examples and nRF Connect and have the same behavior.
Here is how I defined my peer_manager:
void peer_manager_init(bool erase_bonds)
{
ble_gap_sec_params_t sec_param;
ret_code_t err_code;
err_code = pm_init();
APP_ERROR_CHECK(err_code);
if (erase_bonds)
{
err_code = pm_peers_delete();
APP_ERROR_CHECK(err_code);
}
memset(&sec_param, 0, sizeof(ble_gap_sec_params_t));
// Security parameters to be used for all security procedures.
sec_param.bond = false;//true;
sec_param.mitm = false;
sec_param.lesc = 1;
sec_param.keypress = 0;
sec_param.io_caps = BLE_GAP_IO_CAPS_NONE;
sec_param.oob = false;
sec_param.min_key_size = 7;
sec_param.max_key_size = 16;
sec_param.kdist_own.enc = 0;//1;
sec_param.kdist_own.id = 0;//1;
sec_param.kdist_peer.enc = 0;//1;
sec_param.kdist_peer.id = 0;//1;
err_code = pm_sec_params_set(&sec_param);
APP_ERROR_CHECK(err_code);
err_code = pm_register(pm_evt_handler);
APP_ERROR_CHECK(err_code);
}Could you test with your smartphones to see if your android also creates a "bond" even if you specified "no bonding" in your security request? (it is to know if it is an android bug or at home?)
Thank you