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

NRF_ERROR_DATA_SIZE on disconnect

Hello all,

I am getting an error when my device disconnects from the client. The error occurs while bond storage due to data limit exceeds.

err_code = ble_bondmngr_bonded_centrals_store();
APP_ERROR_CHECK(err_code);<br/>

Does anyone has any Idea how bond storage works? I didn't find any details in nrf51 SDK doc. How can I limit bonded-centrals data so that my device remains in bonded state?

  • As you say; this is an error indicating that the bond manager has exceeded its storage space.

    Proposed way to handle this in your application:

    First set BLE_BONDMNGR_MAX_BONDED_CENTRALS to one higher than they plan to support in their application (eg: set to 3 if you plan to support 2 bonds).

    Then on every disconnect and power on reset use ble_bondmngr_central_ids_get() to count the number of bonded masters in the list.

    If the count equal BLE_BONDMNGR_MAX_BONDED_CENTRALS, then they should use ble_bondmngr_bonded_central_delete() to delete the first entry in the list, which always will be the oldest bond.

    Afterwards do ble_bondmngr_init() to re-init the RAM database.

  • I had one more doubt regarding errors. I was getting NRF_ERROR_BUSY error. It occurs when i enable services in master control panel. I have two services with characteristic having indication property. So when first CCCD write happens then just after that I get this error.

  • Since that specific issue is different from this thread, could you create a new post with a bit more details on where the assert occurs? If the answer I initially gave helped you out with your original issue, I would appreciate if you accepted the answer :-)

Related