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

iOS and NRF51822 pairing after erasing bonding info problem.

We have problem that after deleting bonding info on the NRF51822 the iOS APP doesn't know its bonding info have been removed and try-s to connect whitout asking for pairing key but the connection doesnt suceed. The only fix we found is that the user removes bonding info on the iOS from the settings menu himself , after that iOS ask for paring key again and the connection is sucssesfully established.

The problem is that ther is no way to force iOS (CoreBluetooth) to remove bonding info or to ask for pairing key programmatically evrything is managed by the CoreBluetooth and is not exposed so i can not do anything about that , so i was wondering if there is any way that the NRF51822 can report to the iOS that the bonding info was removed so that the iOS knows that it has to ask for new pairing key or is there any other way around this problem?

BR

  • Hi,

    This is the behavior that is intended form the phone side. See this and this post:

    Yes this behaviour is expected. If you remove the bond on the peripheral side, it means it forgets the bonding keys.

    From a security point, how would iOS know that it's really you who have deleted the bonding keys and that it is not someone else impersonating the same Bluetooth device address with another hardware, if it accepted the connection anyway? If iOS is bonded to a device it means that upon each connection iOS will try to set up to use encryption using the previously established keys. If the peripheral has forgotten the keys, you need to manually remove the pairing in iOS settings.

    If you remove the bonding information on the peripheral only, the bonding keys will be deleted.
    When iOS tries to reconnect, it will try to set up an encrypted connection using the previously established keys.
    If the peripheral no longes have those keys, you need to manually remove the bonding information on the iOS side as well.
    You can do that in the bluetooth settings on your iOS device.

Related