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

About the number of saved bonding information

Hello.
I am developing using nrf52832 (S132 v7.0.1, SDK v16.0.0).

I use whitelist to store bonding information. Is there an upper limit to the number that can be stored?
Also, how can I set it to increase the number that can be saved?

If you have any materials, please let me know.
Please let us know if you have any questions.
Thank you.

Parents
  • Hi Kei, 

    The number of peers can be handled by the peer manager is defined by the flash space that's the fds module has. 
    It's defined in sdk_config.h as FDS_VIRTUAL_PAGES (by default 3 pages) . So there isn't really a limit for number of peer in peer manager. You can just increase the number of page reserved for FDS.

    However, there is a limit for whitelisting. It's the limitation of the hardware. So the softdevice only allow a whitelist of max 8 devices (BLE_GAP_WHITELIST_ADDR_MAX_COUNT). 
    A workaround for this is to rotate this 8 devices list. So for example if you have 16 devices you want to put into the whitelist, you can scan/advertise with 8 devices in whitelist at a time, and then switch. 

  • thank you for your answer.

    When connecting to a BLE device and performing bonding, the information may be listed in the FDS using a white list.
    Therefore, I thought that all of them were registered on the white list.

    The action I want to do is receive advertisements from bonded BLE devices. For that purpose, I thought that by setting "filter_policy" to "BLE_GAP_SCAN_FP_WHITELIST", it would be possible to receive advertisements only for bonded BLE devices.

    How should I register for the white list?
    And how do you rotate the devices you want to whitelist?

    Thank you.

  • Hello.

    Thank you for the code.
    I don't have NRF 52DK, so I used the code as a reference.
    However, the error still occurs.

    When I checked, I bonded two devices, but the contents of the peers array were "0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff". I think that there are 0x0000 and 0x0001 if two units are bonded.

    Why is there only one?

    Also, the current code does not repeat receiving and not receiving advertisements alternately, but acts to receive both advices.

    How can this be resolved?

    Thank you.

  • Hello.

    "0x0000, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff"

    The cause of this phenomenon was that BLE_GAP_WHITELIST_ADDR_MAX_COUNT was 1. When I changed it to 8, I was able to get the peer ID "0x0000, 0x0001, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffffff".

    However, the error is not fixed. "Ret = pm_whitelist_set (peers [1], 1);" causes BLE_GAP_ERROR_WHITELIST_IN_USE.

    Thank you.

  • Hei Kei, 
    Please use pm_whitelist_set(&peers[1], 1); not pm_whitelist_set(peers[1], 1);

  • Hello.

    I forgot to add "&".
    When I put it on, it started to work as I expected.

    Thank you very much.

    If anything happens, please do it again.

  • Hello.

    I've changed the code to scan more than 8 whitelists. (In the case of 12 units, scan 8 units and then scan 4 units)
    With that code, I changed BLE_GAP_WHITELIST_ADDR_MAX_COUNT from 8 to 1 and checked if the same thing could be done with 2 devices.
    However, when pm_whitelist_set is executed, it stops working at address 0x00000A60. Why on earth do you fly to address 0x00000A60?

    Thank you.

    Postscript

    This was because the second argument of pm_whitelist_set was 8 instead of 1.

    Thank you very much.

Reply
  • Hello.

    I've changed the code to scan more than 8 whitelists. (In the case of 12 units, scan 8 units and then scan 4 units)
    With that code, I changed BLE_GAP_WHITELIST_ADDR_MAX_COUNT from 8 to 1 and checked if the same thing could be done with 2 devices.
    However, when pm_whitelist_set is executed, it stops working at address 0x00000A60. Why on earth do you fly to address 0x00000A60?

    Thank you.

    Postscript

    This was because the second argument of pm_whitelist_set was 8 instead of 1.

    Thank you very much.

Children
No Data
Related