This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Bonding seems to freeze with computer, rejects phone

I am trying to implement bonding with the Uart example in SDK 14. I have followed the instructions for how to use implement device manager and then migrating to peer manager. I've also been able to find examples in other posts. I have been using segger RTT and getting printouts of what is happening, but still can not figure out where my problem may be. I am hoping that someone could take a look at my logs and either be able to point out a problem or let me know what other logging i should add.

logging for connection with pc:

 0> APP:INFO:on_ble_evt: BLE_GAP_EVT_CONNECTED
 0> APP:INFO:on_ble_evt: BLE_GAP_EVT_SEC_PARAMS_REQUEST
 0> APP:INFO:SD_BLE_GAP_SEC_PARAMS_REPLY 1 SUCCESS 
 0> 
 0> Sec_Dis:INFO:NEED TO GET NEW PEER ID 
 0> Sec_Dis:INFO:NEW PEER ID CREATED: SUCCESS 
 0> Sec_Dis:INFO:PEER ID IS READY. PDB_WRITE_BUF_GET SUCCESS 
 0> Sec_Dis:INFO:SD_BLE_GAP_SEC_PARAMS_REPLY: FAILURE 
 0> Sec_Dis:INFO:p_sec_params != NULL: SUCCESS 
 0> Sec_Dis:INFO:SECURITY REPLY FAILURE 
 0> Sec_Dis:INFO:NRF_ERROR: 8 
 0> 
 0> APP:INFO:on_ble_evt: BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST
 0> APP:INFO:sd_ble_gatts_exchange_mtu_reply->mtu request SUCCESS 
 0> APP:INFO:on_ble_evt: (0x00000019)
 0> APP:INFO:on_ble_evt: (0x00000012)
 0> APP:INFO:on_ble_evt: BLE_GATTS_EVT_SYS_ATTR_MISSING
 0> APP:INFO:sd_ble_gatts_sys_attr_set->attr missing SUCCESS 
 0> APP:INFO:PM_EVT_LOCAL_DB_CACHE_APPLIED 

Logging from phone connection (which phone tells me is rejected):

0> APP:INFO:on_ble_evt: BLE_GAP_EVT_CONNECTED
 0> APP:INFO:on_ble_evt: BLE_GAP_EVT_SEC_PARAMS_REQUEST
 0> APP:INFO:SD_BLE_GAP_SEC_PARAMS_REPLY 1 SUCCESS 
 0> 
 0> Sec_Dis:INFO:NEED TO GET NEW PEER ID 
 0> Sec_Dis:INFO:NEW PEER ID CREATED: SUCCESS 
 0> Sec_Dis:INFO:PEER ID IS READY. PDB_WRITE_BUF_GET SUCCESS 
 0> Sec_Dis:INFO:SD_BLE_GAP_SEC_PARAMS_REPLY: FAILURE 
 0> Sec_Dis:INFO:p_sec_params != NULL: SUCCESS 
 0> Sec_Dis:INFO:SECURITY REPLY FAILURE 
 0> Sec_Dis:INFO:NRF_ERROR: 8 
 0> 
 0> APP:INFO:on_ble_evt11111111: (0x00000019)
 0> APP:INFO:on_ble_evt11111111: (0x00000012)
 0> APP:INFO:on_ble_evt11111111: (0x00000012)
 0> APP:INFO:on_ble_evt: BLE_GAP_EVT_DISCONNECTED
 0> APP:INFO:on_adv_evt: BLE_ADV_EVT_FAST
  • I found a post that talks about the nrf error 8, which can be found here: devzone.nordicsemi.com/.../

    What i found is that in my main code I am calling "sd_ble_gap_sec_params_reply()" in my main code and it appears to also being called by the peer manager. I was making the call in the function "on_ble_evt(ble_evt_t * p_ble_evt)". With the call being commented out, my logs are now showing differently for the phone connection.

Related