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

SDK13, S132, peripherial mode. How bonding does work? In HRS example

Hi all! I write for nRF52 but I can't to understand it. There are two cases:

first- I want bound my peripherial with central. And in future I want connect only between those 2 devices. How should I do? Use whitelist on the central? And when first time connected central to periperial, this connection writed to memory of whitelist? Next on the central side I should set usewhitelist = 1? And at this case I always will connect only first connected device? Right?

Second case- I need only connect by peripherial to any device like smartfone. Without bonding. How should I do it? Which one settings should set in HRS ex.? What does it mean SEC_PARAM_BOND? In HRS set 1. I suppose, in this example, connect set with bonding?

Explain, pls.

Parents
  • You can use whitelist on either the peripheral or the central.

    Using it on the peripheral will filter out scan requests and/or connections requests from devices that are not in the whitelist.

    Using it on the central will filter out advertisments from devices that are not in the whitelist.

    If you don't want to pair call pm_sec_params_set() with NULL, if you don't want to bond call pm_sec_params_set() with bond set to 0, i.e. set SEC_PARAM_BOND 0.

Reply
  • You can use whitelist on either the peripheral or the central.

    Using it on the peripheral will filter out scan requests and/or connections requests from devices that are not in the whitelist.

    Using it on the central will filter out advertisments from devices that are not in the whitelist.

    If you don't want to pair call pm_sec_params_set() with NULL, if you don't want to bond call pm_sec_params_set() with bond set to 0, i.e. set SEC_PARAM_BOND 0.

Children
Related