This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

peer manager limit number of peers

How do I limit the number of peers that are stored in the peer manager? I don't see a configuration variable. I don't know the addresses of peers before hand, so I don't think the whitelist can help me on this front.

  • It is not a variable that you configure, you can decrease the number of flash pages dedicated to FDS (see this) But I don't recommend doing that. I would rather use pm_peer_count() and for example not allow pairing after a certain count. But what is that you want to achieve? What does whitelisting have to do with this?

  • I want to limit the number of peers that can be bonded to this device at any one time, but I want to allow pairing of more devices. Whitelisting was a way of disallowing the bonding, but I think I can just reinitialize the security params to disallow bonding after I reach my peer limit.

  • Thanks for the tip about pm_peer_count(), but I'm wondering where to place it? Ideally I reject any connection after pm_peer_count() = 1, but I understand pairing and connecting are two different things. So where in BLE events should I place this check in order to reject unwanted centrals as early as possible?

Related