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

Writing own bonding manager for S120 based devices

Hi

I am writing my own bonding manager.

In the S110 stack after Phase 3 of pairing the keys are exchanged which result in the EVT_AUTH_STATUS event which in turn contains the LTK and IRK etc.

In the S120 message sequence chart it shows the same event will occur and then it shows 'Store keys'

I am looking at the ble_gap_evt_auth_status_t struct in the SDK 6.0.0 (in ble_gap.h in the S120 folder) and it does NOT contain any data members that are keys.

Then I see that there is a Device Manager that has been provided in SDK 6.0.0 and again for the code that processes the AUTH _STATUS event I cannot see anything that implies a key is being saved.

What am I missing ? Given that it seems people out there have got bonding working with S120.

My understanding is that in a connection, when the decision is made to go for encryption the LTK as provided by the slave end should be used. Therefore at the end of the AUTH_STATUS there should be the LTK from the slave that I need to store in my master implementation.

I am really confused because basically the result of a bonding MUST result in sharing of keys are I cannot see any data member that conveys a key. And the S120 image is now production status so I am obviously not getting it !!

Look forward to some feedback and thank you in advance.

Parents Reply
  • Hi

    You are a star !!

    Now that you point me to it I can see it in the documentation. Hopefully Nordic update the message sequence chart with a note to make it clear.

    It does however mean that one needs to keep some static memory around for those values to be populated given the key exchange will occur much later. Can understand why it is done the way it is as the local keys have to be provided prior to phase 3.

    Regardless, you have saved me a lot of time waiting from an official response.

    Many thanks Mahendra

Children
No Data
Related