calling pm_peers_delete cause fatal error
why does it happened?
nRF5_SDK_17.0.2_d674dde/ble_app_multirole_lesc

calling pm_peers_delete cause fatal error
why does it happened?
nRF5_SDK_17.0.2_d674dde/ble_app_multirole_lesc


It shows as the pictures
why is this happening
main.c 282
static void adv_scan_start(void) {
ret_code_t err_code;
scan_start();
// Turn on the LED to signal scanning.
bsp_board_led_on(CENTRAL_SCANNING_LED);
// Start advertising.
err_code = ble_advertising_start(&m_advertising, BLE_ADV_MODE_FAST);
APP_ERROR_CHECK(err_code);
NRF_LOG_INFO("Advertising");
}
it still keeps crashing and rebooting
while am I using the release mode it did not happen
but why
If it's ble_advertising_start() that returns error 8 (NRF_ERROR_INVALID_STATE), then looking at the doc here , it means that the advertising module is not initialized. i.e. advertising_init() need to be called before adv_scan_start()
it means that the advertising module is not initialized. i.e. advertising_init() need to be called before adv_scan_start()

but i have already called
OK, it could be that underlaying function sd_ble_gap_adv_start() that also returns NRF_ERROR_INVALID_STATE
* @retval ::NRF_ERROR_INVALID_STATE adv_handle is not configured or already advertising.
2 delete_bonds could perhaps trigger this.

Try to remove the first call to delete_bonds().
If you want to "force" delete_bonds to be called, then set erase_bonds= true instead
but why cant i direct use delete_bonds func even I remove the second one it still happened
adv_handle is not configured or already advertising.
also did you mean delete_bond() will call advertise start function? how to fix that?