Central nRF5 device connects to peripheral NCS and initiates bonding.
The peripheral reports that security failed with error code 4 (BT_SECURITY_ERR_AUTH_REQUIREMENT) "The requested security level could not be reached".
Central nRF5 has these Peer Manager settings:
// Security parameters to be used for all security procedures. sec_param.bond = true; sec_param.mitm = false; sec_param.lesc = false; sec_param.keypress = false; sec_param.io_caps = BLE_GAP_IO_CAPS_NONE; sec_param.oob = false; sec_param.min_key_size = 7; sec_param.max_key_size = BLEAM_DATA_CHUNK_SIZE; sec_param.kdist_own.enc = true; sec_param.kdist_own.id = true; sec_param.kdist_peer.enc = true; sec_param.kdist_peer.id = true;
Peripheral NCS device uses pretty much the Peripheral UART example but with button press requirement removed.
I tried removing security callbacks like the answer to this post suggested at the peripheral and setting the central nRF5 params differently, tried setting LESC as true, but it didn't work. With LESC set on central nRF5 I got NRF_ERROR_INVALID_ADDR on sd_ble_gap_sec_params_reply call. If I set the params at the central to only pairing/no bonding, the pairing is successful.
I'm pretty sure I'm missing something on either side, but I can't find any information on the subject. What can be done to have nRF5 and NCS devices to bond?