Hi,
I use IDF version 4.3 and uses NIMBLE stack both for central and peripheral role. Sometimes the NIMBLE stack crashes when peripheral is connected and central is trying to connect to a device.
I've registered two different reasons for the NIMBLE stack reset:
0x0c (12) BLE_HS_ECONTROLLER Event from controller is invalid.
0x13 (19) BLE_HS_ETIMEOUT_HCI HCI request timed out; controller unresponsive.
I've attached logs.
What triggers these resets?
NIMBLE stack crashes
NIMBLE stack crashes
- Attachments
-
- nimble_stack_reset_reason_12.png (206.68 KiB) Viewed 1911 times
-
- disconnect_reason_19.png (176.34 KiB) Viewed 1911 times
-
- disconnect_reason_12.png (198.5 KiB) Viewed 1911 times
Re: NIMBLE stack crashes
I added a log with debug printouts enabled, seems like assertion fails in ble_gap.c line 1166:
/**
* Called when an error is encountered while the master-connection-fsm is
* active.
*/
static void
ble_gap_master_failed(int status)
{
switch (ble_gap_master.op) {
case BLE_GAP_OP_M_CONN:
STATS_INC(ble_gap_stats, initiate_fail);
ble_gap_master_connect_failure(status);
break;
#if NIMBLE_BLE_SCAN
case BLE_GAP_OP_M_DISC:
STATS_INC(ble_gap_stats, initiate_fail);
ble_gap_disc_complete();
ble_gap_master_reset_state();
break;
#endif
default:
BLE_HS_DBG_ASSERT(0); <-------------------------------------------------------------------------
break;
}
}
/**
* Called when an error is encountered while the master-connection-fsm is
* active.
*/
static void
ble_gap_master_failed(int status)
{
switch (ble_gap_master.op) {
case BLE_GAP_OP_M_CONN:
STATS_INC(ble_gap_stats, initiate_fail);
ble_gap_master_connect_failure(status);
break;
#if NIMBLE_BLE_SCAN
case BLE_GAP_OP_M_DISC:
STATS_INC(ble_gap_stats, initiate_fail);
ble_gap_disc_complete();
ble_gap_master_reset_state();
break;
#endif
default:
BLE_HS_DBG_ASSERT(0); <-------------------------------------------------------------------------
break;
}
}
- Attachments
-
- crash_with_debug_printout.png (199.65 KiB) Viewed 1875 times
Who is online
Users browsing this forum: ESP_Sprite and 308 guests