This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Unique Identifier for Bonds in Application Space

Working through a custom security implementation. It is to desirable to know a unique identifier for each bond that has been made with the nrf51822 SD. When the SD enters into an encrypted bond link with an authenticated central I would like to keep track of some application information specific to that bond. In my mind, the easiest way to do this is with a unique identifier.

Is there a unique identifier for the active bond that can be used in the application space?

Parents
  • I think you can try to use dm_whitelist_create() to get addresses/IRKs of all bonded devices and use this as UID.

    The only problem is this:

    Also, if this routine is called when a connection exists with one or more peer devices, those connected devices are not added to the whitelist.

    But I checked dm_whitelist_create() code and I don't see where does it exclude connected devices from the peers table.

    UPD:

    Aren't the number of entries in the white list fairly limited. Something like 2?

    Yes, it's limited, but up to 8:

    /**@brief Maximum amount of addresses in a whitelist. */
    #define BLE_GAP_WHITELIST_ADDR_MAX_COUNT (8)
    
    /**@brief Maximum amount of IRKs in a whitelist.
     * @note  The number of IRKs is limited to 8, even if the hardware supports more.
     */
    #define BLE_GAP_WHITELIST_IRK_MAX_COUNT (8)
    

    Well, you can just forget about this dm_whitelist_create() function and just directly use peers table:

    static peer_id_t
    m_peer_table[DEVICE_MANAGER_MAX_BONDS]; /**< Table maintaining bonded devices' identification information, an instance is allocated in the table when a device is bonded and freed when bond information is deleted. */

    UPD:

    Though you can't get access to the m_peer_table without editing SDK files.

    But still with dm_whitelist_create() function you can get all the peers table info, because in dm_whitelist_create() there is no checks whatever or not requested number of addresses/IRKs is more then BLE_GAP_WHITELIST_ADDR_MAX_COUNT/BLE_GAP_WHITELIST_IRK_MAX_COUNT, if you request from it DEVICE_MANAGER_MAX_BONDS number of addresses/IRKs then it'll just give you all avaible peers addresses/IRKs.

    Just check dm_whitelist_create() code for yourself.

  • Aren't the number of entries in the white list fairly limited. Something like 2? Could you explain a little more about the use of the white list in general? I'm not sure I am seeing the entire picture yet .

Reply Children
No Data
Related