Hi,
I have my application based on nRF52840 device.
When writting a wrong passkey, my device is reseted.
Which can be the reason? I have already implemented event PM_EVT_CONN_SEC_FAILED:
static void pm_evt_handler(pm_evt_t const * p_evt)
{
ret_code_t err_code;
pm_conn_sec_config_t config;
pm_conn_sec_status_t conn_sec_status;
pm_handler_on_pm_evt(p_evt);
pm_handler_disconnect_on_sec_failure(p_evt);
pm_handler_flash_clean(p_evt);
switch (p_evt->evt_id)
{
case PM_EVT_CONN_SEC_SUCCEEDED:
// Check if the link is authenticated (meaning at least MITM).
err_code = pm_conn_sec_status_get(p_evt->conn_handle, &conn_sec_status);
APP_ERROR_CHECK(err_code);
break;
case PM_EVT_CONN_SEC_FAILED:
m_ble_general.ble_conn_handle = BLE_CONN_HANDLE_INVALID;
break;
case PM_EVT_PEERS_DELETE_SUCCEEDED:
advertising_start();
break;
case PM_EVT_CONN_SEC_CONFIG_REQ:
config.allow_repairing = true;
pm_conn_sec_config_reply(p_evt->conn_handle, &config);
break;
case PM_EVT_BONDED_PEER_CONNECTED:
pm_local_database_has_changed();
break;
default:
break;
}
}
Please, find attached sniffer trace for this moment.
What do I have to correct to avoid these resets?
Dani.

