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

pm_conn_secure fails 0x3002

Hello,

I'm trying to migrate to Peer Manager, but I have a problem. This code returns error BLE_ERROR_INVALID_CONN_HANDLE constantly.

static void on_ble_evt(ble_evt_t * p_ble_evt)
{
...
    case BLE_GAP_EVT_CONNECTED:                 					
         err_code = pm_conn_secure(p_gap_evt->conn_handle, false);
         APP_ERROR_CHECK(err_code);
    break;

Device has the Central role. Where is my mistake?

Best Regards,

Pavel

my_proj.zip

Parents
  • So im_peer_id_get_by_conn_handle() returns PM_PEER_ID_INVALID which makes link_secure_central_new_peer() return NRF_ERROR_INTERNAL. I'm not entirely sure what is causing this. You have pm_on_ble_evt() in ble_evt_dispatch() yes? Maybe you could edit your question and upload your complete project so I could test it here? What SDK and SoftDevice version are you using?

Reply
  • So im_peer_id_get_by_conn_handle() returns PM_PEER_ID_INVALID which makes link_secure_central_new_peer() return NRF_ERROR_INTERNAL. I'm not entirely sure what is causing this. You have pm_on_ble_evt() in ble_evt_dispatch() yes? Maybe you could edit your question and upload your complete project so I could test it here? What SDK and SoftDevice version are you using?

Children
No Data
Related