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.

  • When I set SEC_PARAM_BOND to 0, project fall.

    Regarding pm_peer_rank_highest(). I have got this project from colleague. And I really want to know for why he call this function. And if I comment it? Whithout call this function it will be work like with?

    Tell me a best way. I need connect my code to another smartfone. Possible connect again with same smartfone. Possible change smartfone to another. And connect to him. If I leave bond settings, bond info will be storage in PM? Is it normal? Or does it have some limit of bonded information?

Reply
  • When I set SEC_PARAM_BOND to 0, project fall.

    Regarding pm_peer_rank_highest(). I have got this project from colleague. And I really want to know for why he call this function. And if I comment it? Whithout call this function it will be work like with?

    Tell me a best way. I need connect my code to another smartfone. Possible connect again with same smartfone. Possible change smartfone to another. And connect to him. If I leave bond settings, bond info will be storage in PM? Is it normal? Or does it have some limit of bonded information?

Children
No Data
Related