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

Peer list: Addition of Peers, Order of Peers, Compatibility with Whitelist

Hi,

I have a few questions about how the peer list works. (using S132 v 7.0.1 and SDK version 16)

  • How or when are peers added to the peer list of the Central? Are they added when connected, when paired or when bonded? do we need to call for example "sd_ble_gap_connect" or which function adds them?

  • When using a whitelist, we call the function like "peer_list_get" that will read the peers from the list. Then we set the whitelist with "im_whitelist_set". In this function we put the first 8 values in the peer list into the whitelist (see code snipplet below).
    • But which ones are those first 8 values i.e. how is this peer list ordered? I have read in the function definition of "pm_next_peer_id_get" that: "The order in which peer IDs are returned should be considered unpredictable". But If we have more than 8 peers, will older peers or those with lower RSSI not get added to the whitelist?

    ret = peers_id_keys_get(p_peers, peer_cnt, addrs, &wlist_addr_cnt, NULL, NULL);

    for (uint32_t i = 0; i < BLE_GAP_WHITELIST_ADDR_MAX_COUNT; i++)
    {
        addr_ptrs[i] = &addrs[i];
    }
    
    return sd_ble_gap_whitelist_set(addr_ptrs, peer_cnt);

Thank you for your kind assistance

Related