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

How could I calculable the bonded amount in SDK 15.2.0?

Hi, 

The product is peripheral, CPU is nRF52832 and I use nRF5_SDK_15.2.0_9412b96.

My customer asks me how many bonded amounts support in our product?

because I can't find a configuration of ram memory map. (Like SDK 11.0.0, nRF51822)

by the way, my product at least the bond amounts must more than eight.

How could I calculable the bonded amount in SDK 15.2.0?

How could I arrange for the memory of nrf52832?

Parents
  • Hi,

    The peer manager uses FDS to manage the storage of bonds in flash. So the number of bonds you can store depends on how many pages you have allocated to it (look for fds settings in sdk_config), if there are other FDS users in your app,  and how many CCCDs you have in your attribute table. I suggest that you try calling fds_stat() periodically to determine the flash usage for your app specifically. 

    It usually shouldn't be a problem to store considerably more than 8 bonds, but note that the whitelist can only hold 8 devices. So 8 may be the practical limit if you rely on whitelist scanning or advertising.

  • Hi, 

    Thank you for this answer.

    But I need to calculable the bonded amount for my clients. 

    Please support how many bonded devices in our product? (import question)

    And my fds settings are (FDS_VIRTUAL_PAGES 3) and (FDS_VIRTUAL_PAGE_SIZE 1024).

    what's whitelist is limited to less than 8?

  • Hi,

    Each bond will require around 60*4 bytes. The exact size depends on how many CCCDs you have in your attribute table. And one of the FDS pages is reserved for garbage collection, so that leaves you with 2 flash pages for data storage. So I guess you will be able to keep approx. 20 bonds with this configuration. However, I would have allocated more flash to FDS if the target is to support this many bonds. The reason is that garbage collection is a relatively time-consuming operation that you don't want to run too often. 

    Below is a screenshot showing a test I did with the ble_app_hrs sample from SDK 16.0.0. This is after one bond and 2 CCCD updates. Note that the number of freeable words increases when existing data records are updated. These are freed when you run garbage collection. 

    CFF.K said:
    what's whitelist is limited to less than 8?

     The limit is only relevant if you use a whitelist in your app. 

Reply
  • Hi,

    Each bond will require around 60*4 bytes. The exact size depends on how many CCCDs you have in your attribute table. And one of the FDS pages is reserved for garbage collection, so that leaves you with 2 flash pages for data storage. So I guess you will be able to keep approx. 20 bonds with this configuration. However, I would have allocated more flash to FDS if the target is to support this many bonds. The reason is that garbage collection is a relatively time-consuming operation that you don't want to run too often. 

    Below is a screenshot showing a test I did with the ble_app_hrs sample from SDK 16.0.0. This is after one bond and 2 CCCD updates. Note that the number of freeable words increases when existing data records are updated. These are freed when you run garbage collection. 

    CFF.K said:
    what's whitelist is limited to less than 8?

     The limit is only relevant if you use a whitelist in your app. 

Children
No Data
Related