This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ble_bondmngr.c:bond_info_store() issue

Hi, Regarding the bond_info_store() routine, I am having issues where after several calls to this function (client pairing forget/reconnect), my p_bond gets corrupted. This problem invariably occurs after the second call to pstorage_store(). Please verify that the dest_block variable MUST remain in scope, even if the function returns NRF_SUCCESS. Thus, my quick fix is to make this variable static. Regards, Ara

Parents
  • Thanks for your replies.

    It failed at MODULE_ID_RANGE_CHECK in pstorage_store(), where module_id was corrupted (strangely enough it contained the previously calculated CRC). dest_block must remain in scope as it is being passed by reference. My problem vanished when I made it static (not a perfect solution since another caller can crush this variable to early).

Reply
  • Thanks for your replies.

    It failed at MODULE_ID_RANGE_CHECK in pstorage_store(), where module_id was corrupted (strangely enough it contained the previously calculated CRC). dest_block must remain in scope as it is being passed by reference. My problem vanished when I made it static (not a perfect solution since another caller can crush this variable to early).

Children
No Data
Related