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

Whitelisting one device

I'd like to apply bonding/whitelist so that once a peripheral device connects to a central, only that peripheral device can reconnect (until bonding/whitelist is cleared via button). 

So far, I just have a central and peripheral app automatically pairing using "Just Works" and scan name filtering.  The devices automatically pair without user input as desired...but must re-pair every time they boot.  I haven't been able to get them to bond via SDK calls thus far...though I can bond to the peripheral with the nRF Connect app on my phone.

A few questions:

1) Is peer manager the proper library to handle this, using SDK 15.2?  I've seen mention of peer manager being experimental, and I'm not familiar with all the libraries of the SDK yet.

2) Should the whitelist be done on the central or peripheral (or both) ?  It seems like there is mention of whitelisting in either type of device in the examples.

3) Is bonding required for whitelisting?  Thus far, I haven't been able to get devices automatically bonded, although SEC_PARAM_BOND is set to `1` for each app.

Parents
  • 1) Is peer manager the proper library to handle this, using SDK 15.2?  I've seen mention of peer manager being experimental, and I'm not familiar with all the libraries of the SDK yet.

     Yes, the peer manager is the right library to handle this, and it is not experimental anymore (For SDK's newer that version 11 I believe). You should be able to both bond and add a whitelist by using the Peer Manager

    2) Should the whitelist be done on the central or peripheral (or both) ?  It seems like there is mention of whitelisting in either type of device in the examples.

    Yes it is possible to set a whitelist on the central and the peripheral, as mentioned here. What to choose, depends on the needs of your application. If you want the central to connect and bond to one specific peripheral, but let the peripheral be able to receive scan requests from other central devices, then you should only add a whitelist to the central only. If you want both the central and peripheral to just see each other, then you should add a whitelist on both devices.

    3) Is bonding required for whitelisting?  Thus far, I haven't been able to get devices automatically bonded, although SEC_PARAM_BOND is set to `1` for each app.

     Yes it is possible to use whitelisting without bonding. See this case.

    If you have any more question regarding the implementation of bonding and whitelisting, please ask.

    Best regards,

    Simon

Reply
  • 1) Is peer manager the proper library to handle this, using SDK 15.2?  I've seen mention of peer manager being experimental, and I'm not familiar with all the libraries of the SDK yet.

     Yes, the peer manager is the right library to handle this, and it is not experimental anymore (For SDK's newer that version 11 I believe). You should be able to both bond and add a whitelist by using the Peer Manager

    2) Should the whitelist be done on the central or peripheral (or both) ?  It seems like there is mention of whitelisting in either type of device in the examples.

    Yes it is possible to set a whitelist on the central and the peripheral, as mentioned here. What to choose, depends on the needs of your application. If you want the central to connect and bond to one specific peripheral, but let the peripheral be able to receive scan requests from other central devices, then you should only add a whitelist to the central only. If you want both the central and peripheral to just see each other, then you should add a whitelist on both devices.

    3) Is bonding required for whitelisting?  Thus far, I haven't been able to get devices automatically bonded, although SEC_PARAM_BOND is set to `1` for each app.

     Yes it is possible to use whitelisting without bonding. See this case.

    If you have any more question regarding the implementation of bonding and whitelisting, please ask.

    Best regards,

    Simon

Children
Related