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

Whitelist random private resolvable address without bonding

Hello!
I have an Android phone and nRF52840 as a peripheral. Now I want the peripheral to have a whitelist with exactly 1 peer with whitelist being dropped at button press. Android must be able to connect to like a 100 of such peripheral devices.
I got this working with PeerManager and bonding procedure. But I'm not sure if Android can store hundreds of bonded devices. So I need to make whitelisting work without bonding. The problem is that after pairing pm_peer_id_list() returns 0 peers.
The question is do we have IRK's available after pairing without bonding to put them into whitelist?

 

  • Hi

    Note that our S140 SoftDevice only supports up-to 8 whitelisted devices, see pm_whitelist_set and BLE_GAP_WHITELIST_ADDR_MAX_COUNT.  I am not sure if the Peer Manager will store any information about the peer if only pairing and not bonding is performed. So that could be why pm_peer_id_list() returns 0 peers when the peer is only paired. 

    Can you check that the following fields are set in peer_manager_init?

     

    sec_param.kdist_own.enc  = 1;
    sec_param.kdist_own.id   = 1;
    sec_param.kdist_peer.enc = 1;
    sec_param.kdist_peer.id  = 1;

    In addition, it might be that the IRK is only shared by the central when bonding is performed. 

    Best regards

    Bjørn

  • Thank you for the answer.
    I need 1 whitelisted device from nRF side, so 8 is enough. When I set kdist to 1 then API reqiures me to set bond=true as well. How to make sure that IRK is shared only in the process of bonding?

  • Superuzir said:
    When I set kdist to 1 then API reqiures me to set bond=true as well. How to make sure that IRK is shared only in the process of bonding?

     I assume that you mean that the IRK is shared only in the process of pairing?

    I have been looking at the Bluetooth Specification and it seems that exchanging the IRK when pairing is not allowed, see below.

    BLUETOOTH CORE SPECIFICATION Version 5.1 | Vol 3, Part C, Section 9.4.2, page 2180

    If Security Manager pairing is supported, the Host shall set the Bonding_Flags
    to ‘No Bonding’ as defined in [Vol 3] Part H, Section 3.5.1 and bonding
    information shall not be exchanged or stored.

    Best regards

    Bjørn

Related