I am working on nRF52840 DK with nRF5_SDK_15.2.0_9412b96 and I used the example ble_app_rscs_c with absolutely no changes. I first erased the flash and then burned the Softdevice and app to erase any bonding. I used LightBlue on my iPhone to advertise 0x1814 (BLE_UUID_RUNNING_SPEED_AND_CADENCE). The first time I received the pairing request on iPhone. Every time I restart the DK, I receive the following error several times (4 to 5 times):
<info> peer_manager_handler: Connection security failed: role: Central, conn_handle: 0x0, procedure: Encryption, error: 4352
<info> peer_manager_handler: Connection secured: role: Central, conn_handle: 0, procedure: Encryption.
Although it finally works, these failures cause a long delay. I have also seen this problem reported for BLE peripheral examples but their solution (un-pairing from iPhone) does not work for me. I need to keep the devices paired.
I was wondering how I can fix this.
I tested the example on my side and aren't able to reproduce the issue. Could you give me a detailed step-by-step procedure on how I can reproduce this?
Have you tried to download a fresh copy of the SDK from our website?
Yes, I have used a fresh copy of the SDK. I just compiled the template using IAR with no changes.
When I keep the iPhone close to the DK, sometimes, I don't see the error. But if I keep the iPhone 50 cm away, I see the error quiet often. Steps to re-produce:
1. Make sure iPhone is not paired.
2. Erase the flash, burn the softdevice and app.
3. Using LighBlue, advertise BLE_UUID_RUNNING_SPEED_AND_CADENCE
4. Connect and pair (you'll see the pairing request on iPhone).
5. Turn the DK off/on and you will see the error several times before it succeeds.
I have a similar issue, I'm using the ble_app_multirole_lesc example for nRF5_SDK_15.2.0_9412b96.I have erased 2 dev kits and placed the example on both.
When they try to connect I end up with this error:
<info> app: CENTRAL: Already connected to this device as PERIPHERAL (handle: 0), disconnecting.<info> peer_manager_handler: Connection security failed: role: Central, conn_handle: 0x0, procedure: Encryption, error: 4352<warning> peer_manager_handler: Disconnecting conn_handle 0.<info> app: CENTRAL: Disconnected, handle: 0, reason: 0x16
And the other one:
<info> app: PERIPHERAL: Already connected to this device as CENTRAL (handle: 1), disconnecting.<info> app: PERIPHERAL: Disconnected, handle 1, reason 0x13.
I'm not able to have a connection and receive heart rate data. Any clue what can go wrong ?