Hello, I am using the HTS example for the nrf51822.
In the example, bond information can be deleted during initialisation by holding down one of the buttons.
In my program, the processor is not reset, nor is there a button for deleting bonds.
After time the bond table fills up, until there is no memory to store new bonds: (BLE_GAP_EVT_DISCONNECTED => ble_bondmngr_bonded_masters_store => bond_info_store => NRF_ERROR_NO_MEM)
How do I delete old bonds (possibly all of them) when the bond table is full, to make room for new bonds.
I have tried the code below (both in the disconnected event and from main), but it crashes the softdevice:
// check not connected
// turn off advertising
if (m_masters_in_db_count >= BLE_BONDMNGR_MAX_BONDED_MASTERS)
{
ble_bondmngr_bonded_masters_delete();
load_all_from_flash();
m_is_bondmngr_initialized = true;
}