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

nrf51422 static passkey in uart app with s110

I am using nrf51422 and ble app uart as my example code and trying to connect to my ios app nrf toolbox by enabling a static key for the pairing process. i have read all the previous threads on this problem and do all the necessary steps but my code does not work.it is still working ass ble app uart example with no passkey. i have attached my project password2.zip can someone tell me where i am making a mistake.?

Parents Reply
  • Hi Nomi, I saw that in your code you didn't set any characteristic's permission to require encryption. All of them was set with BLE_GAP_CONN_SEC_MODE_SET_OPEN. The central device will not do bonding if they don't need to.

    What you need to do is to set the read/write permission with encryption using MITM for the characteristics (so that passkey will be used) with BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM().

    You can find this at line 118, 119 and 173 in the source code of the example here.

Children
No Data
Related