[nRF52833] IRK exchanged when Privacy is disabled

Hi,

I'm working on a legacy program using nRF52833 and nRF5 SDK using SoftDevice S113.

I have a question about the exchange of IRK during bonding, if Privacy is disabled.

I understand that privacy can be enabled (and IRK set) using the code below:

privacy_params.privacy_mode = BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY;
privacy_params.private_addr_type = BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE;
privacy_params.p_device_irk = &irk;
pm_privacy_set(&privacy_params);

Then, on subsequent Bonding, the IRK (set above using pm_privacy_set()) will be exchanged to the Central Host.

Is the same IRK still exchanged if Privacy is disabled after setting IRK, but before the Bonding occurs?

To clarify, this is the sequence of operations:

  1. Privacy is enabled and IRK set using pm_privacy_set() (see snippet above)
  2. Privacy is disabled with pm_privacy_set() BLE_GAP_PRIVACY_MODE_OFF
  3. Starts advertising (this advertising will use RandomStaticAddress since Privacy is disabled
  4. Central connects, Bonding starts
  5. IRK (set in step 1) is sent to Central as part of key exchange
  6. Bonding completes
  7. Peripheral disconnects
  8. Peripheral enables Privacy with pm_privacy_set() BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY,  BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE
  9. Peripheral enters connectable advertising (now using ResolvablePrivateAddr since Privacy is enabled)
  10. Central scans and is able to resolve the RPA (against the IRK exchanged in step 5) and is able to identity the peripheral is the same it's Bonded to, and connect to it

Can you confirm that step 5) is correct (the IRK will be sent to Central even if Privacy is disabled)? Or no IRK will be exchanged since Peripheral is advertising using RandomStaticAddr (with Privacy disabled)?

Thanks,

Marco

Parents
  • Can you confirm that step 5) is correct (the IRK will be sent to Central even if Privacy is disabled)? Or no IRK will be exchanged since Peripheral is advertising using RandomStaticAddr (with Privacy disabled)?

    I can confirm that when using the softdevice controller (which you are using), you can connect with privacy disabled. Exchange the IRK, and then enable privacy to reconnect. So your step 5) is correct. We are not sure if this is the same when using the Zephyr controller .

Reply
  • Can you confirm that step 5) is correct (the IRK will be sent to Central even if Privacy is disabled)? Or no IRK will be exchanged since Peripheral is advertising using RandomStaticAddr (with Privacy disabled)?

    I can confirm that when using the softdevice controller (which you are using), you can connect with privacy disabled. Exchange the IRK, and then enable privacy to reconnect. So your step 5) is correct. We are not sure if this is the same when using the Zephyr controller .

Children
No Data
Related