Hi all,
I am using SDK14.1.0
Steps of my execution are -
1) My requirement is to make bond when making connection to the android APP. I have done following initialization sequence-
timers_init();
//System API for schedule initialisation - queue size 10
buttons_leds_init(&erase_bonds);
ble_stack_init();
gap_params_init();
gatt_init();
advertising_init();
services_init();
conn_params_init();
peer_manager_init();
//Application API for initialisation of device configuration
init_configuration();
//Application API for setting of device configuration - LED- buzzer beeps/blink ,interval settings etc
set_configuration();
//System API for BLE advertising status check timer: timeout same as advertising timeout
delete_bond();
2) Do hardware reset. In device initialization I want to delete all the bonds created in step (1). I have called following function for delete bond
void delete_bond(void)
{
ret_code_t err_code;
err_code = pm_peers_delete();
APP_ERROR_CHECK(err_code);
NRF_LOG_INFO("delete bond error code = %d",err_code);
// disable the autoconnection in case of bond deleted.
AUTOCONNECTION_ENABLE = false;
}
But I am getting a fatal error at Following code
   APP_ERROR_CHECK(err_code);