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
  • Hi Petter,

    I have resolved my previous problems. But I have one yet. I run my central nRF and peripheral Android Apps. So, I can see bonding and secuirity passkey request on display of phone. And after that I can see that phone and nRF was bonded (I can see in Bluetooth setting of phone and in 0x7e000 address of nRF). I do reset nRF. And pm_peer_count() returns 0 and I can see bonding and secuirity passkey request on display of phone again... I don't know what happens. Please, help me!

Reply
  • Hi Petter,

    I have resolved my previous problems. But I have one yet. I run my central nRF and peripheral Android Apps. So, I can see bonding and secuirity passkey request on display of phone. And after that I can see that phone and nRF was bonded (I can see in Bluetooth setting of phone and in 0x7e000 address of nRF). I do reset nRF. And pm_peer_count() returns 0 and I can see bonding and secuirity passkey request on display of phone again... I don't know what happens. Please, help me!

Children
No Data
Related