Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Regarding the Motivation of Bonding

Hello,

I am new to BLE as a technology and have a question regarding how Peer Manager handles bonding.

As I currently understand, the function of bonding is to enable devices which have previously been connected to begin encrypting their communications without needing to rebroadcast keys. It appears that Peer Manager stores those keys in flash, meaning that they should persist through a power cycle of the nRF5 device.

However, from other DevZone answers, as well as the source code itself, it appears that Peer Manager will reject a pairing attempt from any device it was previously bonded with. Does this not defeat the purpose of bonding? I thought the pairing process was necessary for devices to begin communicating, whether for the first time ever, or after they were disconnected.

Is my understanding of bonding or pairing wrong? Or have I misinterpreted the source code?

G

  • Hi Salticid,

    I think you're mixing up connection request and pairing request. 

    Pairing is the procedure where two BLE devices exchange encryption keys in order to secure an already established BLE connection. 

    Bonding is simply storing the encryption keys exchanged during the paring procedure for later use. 

    Hence, connection, pairing and bonding will always be performed in the following order. 

    1. Connection Establishment

    2. Pairing

    3. Bonding 

    Best regards

    Bjørn 

     

Related