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

Enforce order of connection to centrals

I have peripheral BLE device which can have several centrals in its whitelist. It should be able to connect to central with higher priority first, for example: device have 3 centrals in whitelist with A having highest priority, B second highest and C lowest, when device is powered up and all centrals available it should always connect to A, if A is not available - to B and so on.

So my questions is:

  1. Can it be implemented on nrf52?
  2. If 1 is doable: Can it be done not to slow(compared to normal connection time)? Thanks!
Parents
  • It is not possible to block B and C if A is available. Either the devices are in the whitelist or not.

    The only way I can think of is using a timer. When the device is powered up you whitelist with A for x ms, then after x ms you put in B and then after x ms you put in C.

    Yes, this would make the connection to C slower if only C is available, but what is too slow I can't say for your application. You can tune it by selecting how long you want to wait before you put more devices into the whitelist.

    Will this work for you?

Reply
  • It is not possible to block B and C if A is available. Either the devices are in the whitelist or not.

    The only way I can think of is using a timer. When the device is powered up you whitelist with A for x ms, then after x ms you put in B and then after x ms you put in C.

    Yes, this would make the connection to C slower if only C is available, but what is too slow I can't say for your application. You can tune it by selecting how long you want to wait before you put more devices into the whitelist.

    Will this work for you?

Children
No Data
Related