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

How to make bonding work in this scenario

Hi,

I plan to have my device without any forms of external user input, like buttons serial ports, and similar. You can only replace the battery, that's it.

I'd also like to bond my device with a single master only. Once the bonding is made, other devices should not be able to discover or connect to it.

  1. Well, I need to understand how to achieve this. I guess I need to change the advertising mode depending on whether the device is bonded or not. I see both a discovery mode and filter policy in the API, which of these do I need to use, and do I need both?

However, what happens if I loose the master...

  1. I then need a way to clear the bonding and make the device discoverable and available again. The only thing I can think of is to have a button that will enable me to clear the bonding. But due to the environment the device will be exposed to, I'd like to avoid the button. So are any of you having another way of doing this - like putting the device into the freezer and measure if the temperature goes below -30, register that the battery is re-inserted (don't know how to do that), using a hall effect sensor and a magnet, or similar "cunning" and "clever" ways to register that the device needs to reset the bonding?

AFAIK I could also bond with two or more masters, but if the user only bonds with 1 master, how can I then avoid that another master (like a foreign master) bonds with the device.

  1. If I wrote a key on the device, could I then use it to protect it from foreign masters trying to bond with it. Well, it's not that I require a very secure device, it's just to avoid complete openness and confusion with other peoples devices. So if I wrote the address (or IRK) of the device, I could maybe have the device not responding to scans, but require that the key is used when trying to reach the device and make a new bond. Is that possible?
Parents
  • This might be a little late as your original post was a year ago- but one possibility to clear out bonding information would be to add a NFC chip in your device. Then you could just hold your device near a smart phone equipped with NFC, or some other device with NFC. Your device could then when it detects the NFC erase bonding information.

    NFC can also be used for bonding, if your application allows that your device (peripheral) and the Central can be placed near each other when you wish to bond. This method is sometimes used to avoid the MITM.

Reply
  • This might be a little late as your original post was a year ago- but one possibility to clear out bonding information would be to add a NFC chip in your device. Then you could just hold your device near a smart phone equipped with NFC, or some other device with NFC. Your device could then when it detects the NFC erase bonding information.

    NFC can also be used for bonding, if your application allows that your device (peripheral) and the Central can be placed near each other when you wish to bond. This method is sometimes used to avoid the MITM.

Children
No Data
Related