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

nRF52840 - SDK16 - Bonding

Hi everyone,

I am interacting with the ble_app_hrs in order to learn about bonding. I am using nRF52840 DK as a peripheral and donggle (nRF52840) as central along with the nRF Connect for Desktop.

I can perform pairing and bonding with success. However I've noticed that when I select "Delete bond information" then I am not able neither to pair nor to bond anymore and the Error "BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP" is appeard on the log menu. 

In order to work around this issue I have delete bonds from peripheral's side by pressing Button 2 during resetting .. Why I have to do this? I mean, this is the case when central deletes bond information (the peripheral must delete too)? How can I automate this procedure (my future application won't have any button to erase bonds)?

Thanks in advance 

Nick

  • Hi Einar and thank you for your responce,

    I'm a bit confused, to my understanding the higher security is provided by denying repairing (and this is the default value In SDK)

    allow_repairing = false;

    But if I do not accept repairing and the peer delete bond information, how it will repair again with the peripheral?

    You said that in this case the peripheral must delete the bonding information

    Yes, if you do not allow repairing the only way is to delete the bonding information before you can bond again with the same peer

    But then you said that this does not provide better security.

    This does not provide better security, as the security issue with allowing repairing is that an attacker can spoof a peered device and that way replace it's bond. This would also be the case here.

    So, is there any safe (securiy enhanced) elegant method to work around this issue?

    Nick

  • Hi Nick,

    Nikosant03 said:
    But if I do not accept repairing and the peer delete bond information, how it will repair again with the peripheral?

    Effectively the same thing happens in these two approaches. The old bond is removed and replaced by the new bond with the same device.

    Nikosant03 said:
    You said that in this case the peripheral must delete the bonding information

    One possible approach which is to for instance allow repairing (or delete bonds) after a button press, or other method. That way the user explicitly allows this this to happen.

    Nikosant03 said:
    So, is there any safe (securiy enhanced) elegant method to work around this issue?

    Not other than requiring active and conscious action from the user. As explained, the problem with allowing repairing is that an attacker can cause the existing bond to be deleted. But that is often not a big concern, and in any case it is a risk you have to be willing to take if you need to support repairing without any fuss. I mentioned the security aspect because this is a reason why repairing is disallowed by default. It doesn't mean that allowing repairing is always a bad idea, as requirements (including security) differ vastly from product to product.

    Einar

  • Hello Mr. Einar,

    I am trying to solve the static passkey problem with nRF SDK v17 with nrf 52840 evaluation board. However, I can not bond my peripheral in my first attempt. In my second attempt I can bond the peripheral (by using the bond option from nRF connect app).

    I am looking for your possible suggestions to solve this issue. Also, is there any other method to start bonding without pressing button 2? I can add the code if you want to look at it. Any help would be greatly appreciated.

Related