Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Can't get Just Works bonding between nRF5 SDK and nRF Connect SDK to work

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?

Parents
  • Hi

    I assume you haven't set the two devices to bond using the same security levels. What kind of pairing are you looking to do? LESC Just Works, or something more secure? Implementing LESC has already been discussed in detail in this case, where they are eventually able to enable LESC paring for the peripheral_uart example project. Please give it a read and see if you missed any crucial steps.

    Best regards,

    Simon

Reply
  • Hi

    I assume you haven't set the two devices to bond using the same security levels. What kind of pairing are you looking to do? LESC Just Works, or something more secure? Implementing LESC has already been discussed in detail in this case, where they are eventually able to enable LESC paring for the peripheral_uart example project. Please give it a read and see if you missed any crucial steps.

    Best regards,

    Simon

Children
No Data
Related