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

central encryption error (ble_app_hrs_c)

Hi, I'm using nRF52832 Software Development Kit, PCA10040, S132.

I'm getting this error while trying to connect with my device in the "ble_app_hrs_c".

"Connection security failed: role: Central, conn_handle: 0x0, procedure: Encryption, error: 4102"

It can be seen in this section and recognized as a security error in the peer_manager section.

void pm_handler_pm_evt_log(pm_evt_t const * p_pm_evt)
{
    NRF_LOG_DEBUG("Event %s", m_event_str[p_pm_evt->evt_id]);

    switch (p_pm_evt->evt_id)
    {
        case PM_EVT_BONDED_PEER_CONNECTED:
            NRF_LOG_DEBUG("Previously bonded peer connected: role: %s, conn_handle: %d, peer_id: %d",
                          m_roles_str[ble_conn_state_role(p_pm_evt->conn_handle)],
                          p_pm_evt->conn_handle,
                          p_pm_evt->peer_id);
            break;

        ...

        case PM_EVT_CONN_SEC_FAILED:
            NRF_LOG_INFO("Connection security failed: role: %s, conn_handle: 0x%x, procedure: %s, error: %d",
                         m_roles_str[ble_conn_state_role(p_pm_evt->conn_handle)],
                         p_pm_evt->conn_handle,
                         m_sec_procedure_str[p_pm_evt->params.conn_sec_start.procedure],
                         p_pm_evt->params.conn_sec_failed.error);
            NRF_LOG_DEBUG("Error (decoded): %s",
                          sec_err_string_get(p_pm_evt->params.conn_sec_failed.error));
            break;
            
        ...
    }
}

What caused this error? How can I fix the error?

BR,

Lyrics

Parents Reply Children
No Data
Related