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

BLE LESC Multirole DHKey Reply Confusion

I'm trying to under the ble_app_multirole_lesc project and I'm a bit confused about calling sd_ble_auth_key_reply and sd_ble_lesc_dhkey_reply. If you are using Just Works Unauthenticated, then I would think that the BLE_GAP_EVT_PASSKEY_DISPLAY event shouldn't be called, so you never reply with your DHKey or Auth key. Am I misunderstanding the LESC operations?

  • Hi,

    It was due to one of the bug we had (DRGN-7235) in the S13x v2.0.0 that the sd_ble_gap_lesc_dhkey_reply can't be called before sd_ble_gap_auth_key_reply() that we need to put the call in BLE_GAP_EVT_PASSKEY_DISPLAY . And this affects when you don't use PASSKEY but Justwork.

    However the issue is fixed on S13x v2.0.1. So you can actually update the new softdevice, and then move the call sd_ble_lesc_dhkey_reply to BLE_GAP_EVT_LESC_DHKEY_REQUEST() event instead. And that should fix the issue you have with Justworks bonding.

Related