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

Disconnect of bonded device

Hi!

I am having problems with bonding and the UART service. To connect to the peripheral I am using nrfConnect and nrfToolbox (UART) on an iPhone 6.

I am trying to setup an encrypted and bonded connection in the ble_app_uart example from SDK 8.0.0.

I am using a static passkey and have added this permissions to the characteristics/attributes:

BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm);
BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM(&cccd_md.write_perm);
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm);
BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM(&attr_md.write_perm);

The TX char. has the same settings.

If the devices are not bonded, the pairing procedure starts (I need to enter the pin on the iPhone, etc.). In this case everything works fine. I can send, I can receive strings.

The problems start after the first disconnect. When I connect back (the devices are bonded) I get disconnected almost immediately with the disconnect reason 0x003D from the device manager.

Can you give me any thoughts on what am I doing wrong.

Thank you and kind regards, Rok

Parents
  • 0x003D is BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE (Connection Terminated due to MIC Failure). I think you will get this error when you use incorrect encryption keys when you try encrypt the link with a bonded device. Are you using the unmodifed device manager? Do you experience this if you clear the bond information on both device before you test? Why are you using such an old SDK? I seem to remember some issues with iOS devices on older SDKs, but it should work now. Let me know, and I'll try to reproduce the issue.

Reply
  • 0x003D is BLE_HCI_CONN_TERMINATED_DUE_TO_MIC_FAILURE (Connection Terminated due to MIC Failure). I think you will get this error when you use incorrect encryption keys when you try encrypt the link with a bonded device. Are you using the unmodifed device manager? Do you experience this if you clear the bond information on both device before you test? Why are you using such an old SDK? I seem to remember some issues with iOS devices on older SDKs, but it should work now. Let me know, and I'll try to reproduce the issue.

Children
No Data
Related