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

irk_match when having a BLE_GAP_EVT_CONNECTED

Hi all,

I have made my own device manager because the device manager from Nordic is somewhat bloat (in code and resources) and I needed to add a feature, ranking the devices so the less used device is removed when the storage is full and a new devices wants to bond. I was not able to create this feature outside the device manager. Anyway, I want to test the manager and every thing is working well. The only thing I am not able to test is irk. I never see an irk_match. The devices gets identified by means of the address or by means of the diversifier. I find this rather strange be cause the iPhone uses a random address, so it should be identified with an irk. Does anybody knows why I do not get a irk_match in a connect event?

Thanks in advance,

Marcel

  • In connection setup, the encryption diversifier plays no role. If you want to identify a device before connecting, you need to know the static peer address or its IRK. If you want to identify a (previously bonded) device by the means of instantly encrypting, then that is a way. The master sends the previously agreed-upon diversifier and you look up the LTK that belongs to it. These are the keys you need to store to be able to identify the master for encryption. A table of LTKs, indexed by the div. The device manager's device_instance_find() is only called when encryption has been started by the master.

    In newer variants of the SoftDevice, we abandoned the combined diversifier approach and ask you to instead look up the LTK based on an EDIV and RAND which is sent from the master.

  • Ok ,we understand each other than correctly now. The real question was already answered for, but I was curious if I understood correctly how your softdevice works. This was outside the scope of BLE_GAP_EVT_CONNECTED. There lies the misunderstanding between us. Will the new version of the softdevice, which abandon the diversifier and start using the EDIV and RAND, be released shortly? Because I have to change my device manager than and I will release in a couple of weeks.

  • The new API is already released for S120 and the peripheral in S130 alpha, but will also be present in the S110 8.x.x series. I do not know the release dates, but it should come with proper and updated SDK examples. The only difference for your peripheral would be to lookup the LTK based on a master-prodivded ediv/rand combo. You are not required to update to the newest versions unless you need features from them. (If you are interested in the timelines and features, please contact our Sales department).

Related