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.

Related