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

Wrong disconnected reason due to encryption with incorrect LTK

Hi

I'm using the nRF52832 with the SoftDevice S132 V6.0.0 in the central role and would like to encrypt a link with a stored LTK.

The encryption with the function sd_ble_gap_encrypt() with the correct LTK works fine. But when I start the encryption procedure with a peripheral that has an incorrect LTK, I would have expected that the BLE_GAP_EVT_DISCONNECTED event with the reason 0x3D (MIC failure) occurs, as it is described in this MSC.

Instead, I get the BLE_GAP_EVT_DISCONNECTED event with the reason 0x08 (Connection Timeout) after the supervision timeout expired. Am I doing something wrong or is this a bug in the SoftDevice?

EDIT:

I have a further question. Is that correct that the parameters lesc, auth and ltk_len in the ble_gap_enc_info_t struct are not needed/respected by the function sd_ble_gap_encrypt?

Many thanks in advance for your help.

Best regards

Parents Reply
  • But on the sniffer, I see a frame sent by the peripheral after the LL_START_ENC_RSP sent by the central. Isn't that the encrypted LL_START_ENC_RSP from the peripheral?

    I've now also used an nRF52-DK with S132 V6.1.0 as peripheral device to verify the behavior. The disconnect reason on the peripheral is 0x3D (MIC failure) as expected. But the disconnect reason on the central is still 0x08.

Children
No Data
Related