Hi,
I'm using nRF52832 with IAR and SDK V15, S132.
I incorporated the peer manager in the uart serial profile example.
I assume, since I have 3 pages (inc. GC) set in FDS, that the Device and Central can store about 50 bonded peers.
As far as I understand, once a new bond request is received and there's no more space left I will get the PM_EVT_STORAGE_FULL event.
Currently, in that event the following code is implemented:
err_code = fds_gc(); if (err_code == FDS_ERR_NO_SPACE_IN_QUEUES) { err_code = fds_gc(); APP_ERROR_CHECK(err_code); } else APP_ERROR_CHECK(err_code);
This makes no sense as the FDS is used only for bonded device information, so I assume I must delete the peers before running the fds_gc() function.
I read that the peers cannot be deleted when the device is connectable or connected, so is it safe to delete the peers in this event?
Also, is it safe to delete the peers in the PM_EVT_CONN_SEC_FAILED event?
Please answer the above regarding both Central and Peripheral.
The function pm_peers_delete() deletes all peers, how can I modify it to delete only the oldest peers? say, half of the stored peers?
Thank you