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

Why Nrf51DK gets disconnect entering wrong passkey

image descriptionHello Everyone,

I have been working on the NRF51DK by using proxmity examples as reference when i added the static passkey for the connection security it is working well after entering correct passkey its gets bonded and connected and also every service is performing well but if i enter the wrong passkey the device gets disconnected automatically and restart again , i have checked in my disconnect event i didnot find anuthing weird but i could not able to find the reason for this issue could anyone please suggest me what could be the possible reason for this issue any ideas or suggestions will be really helpful for me

Thank you

Parents
  • FormerMember
    0 FormerMember

    As you know, it is either the phone or the nRF51 device that disconnects the link. If you run the nRF51 in debug mode you can set a breakpoint on sd_ble_gap_disconnect(..) and the event BLE_GAP_EVT_DISCONNECTED. If the code hits sd_ble_gap_disconnect(..), it is the nRF51 that is disconnecting, and if the code hits BLE_GAP_EVT_DISCONNECTED, it is the phone that is disconnecting.

Reply
  • FormerMember
    0 FormerMember

    As you know, it is either the phone or the nRF51 device that disconnects the link. If you run the nRF51 in debug mode you can set a breakpoint on sd_ble_gap_disconnect(..) and the event BLE_GAP_EVT_DISCONNECTED. If the code hits sd_ble_gap_disconnect(..), it is the nRF51 that is disconnecting, and if the code hits BLE_GAP_EVT_DISCONNECTED, it is the phone that is disconnecting.

Children
No Data
Related