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

BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM hanging on mobile app

Dear All, I have developed a BLE system in which nRF52832 is being used as a peripheral and central concurrently. I am also using BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM property on few characteristics to enable passkey access to those characteristics. I tested my system many times with nordic "nRF Connect" mobile app and everything worked perfectly fine. The app used to ask me passkey and all those.

But suddenly (to me it's suddenly; there might be some reason) all the characteristics with BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM property does not pop up the passskey screen on the app. Rather there is wait symbol which keeps me waiting for few second and the device gets disconnected after few seconds (may be due to timeout). This happened last week. While I was trying to fix it; I tested the nRF connect app on iPhone5 (previously I was using S7 edge) and I don't know what happened that the app started working on S7 edge perfectly fine again (same code; same passkey functionality). I was happy and I ignored it.

Few days back it happened again and again I don't know why? The app gets hanged and eventually gets disconnected. This time device is showing same problem on iOS app as well and android functionality could not be recovered.

Does anyone have any idea:

  1. Why can be possible reason for this?
  2. What can be the possible solution?

Note: I am using nRF52832 with SDK 11 and SD132.

Looking forward to your response.

  • FormerMember
    0 FormerMember

    It sounds likely that the disconnect comes from "a connection supervision timeout", which occurs when one of the device in the connection is not responding.

    Could you run the nRF52 in debug mode, set at breakpoint in the error handler, and check if the application goes to the error handler at some point?

    Do you have an extra nRF51-DK or a nRF51-Dongle? If so, could you use the sniffer to track what is being transferred over the air and check at which event the chip stops responding?

    The sniffer should be used with Wireshark, and it works best with version 1.10, not one of the newer versions. Wireshark can be downloaded here:

Related