I have added the following modification to "ble_app_hids_mouse" example for pca10040 s132.
I want to add a peer whose IRK is known as follows,
void peer_add()
{
memcpy(&bondData,samsung,sizeof(pm_peer_data_bonding_t));
//bRet = peer_is_irk(&bondData.peer_ble_id.id_info);
APP_ERROR_CHECK(pm_peer_new(&p1,&bondData,NULL));
}
/**@brief Function for application main entry.
*/
int main(void)
{
bool erase_bonds;
// Initialize.
log_init();
timers_init();
buttons_leds_init(&erase_bonds);
power_management_init();
ble_stack_init();
scheduler_init();
gap_params_init();
gatt_init();
advertising_init();
services_init();
sensor_simulator_init();
conn_params_init();
peer_manager_init();
//Testing
peer_add();
// Start execution.
NRF_LOG_INFO("HID Mouse example started.");
timers_start();
advertising_start(erase_bonds);
// Enter main loop.
for (;;)
{
idle_state_handle();
}
}
But i am getting error. you can check the log below.
<info> app_timer: RTC: initialized.
<error> peer_manager_pds: Could not write data to flash. fds_record_{write|update}() returned 0x8601. peer_id: 0
<error> peer_manager_pds: Could not delete peer data. fds_file_delete() returned 0x8601 for peer_id: 0
<error> peer_manager_handler: Unexpected fatal error occurred: error: Unknown error code
<error> peer_manager_handler: Asserting.
<error> app: Fatal error
I know that the error related to initialization of FDS module but it is Initialized in peer_manager. am I correct?
or anything else need to be initialised?
I have added 1 second delay after peer_manager_init() and checked but same error is coming.