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

Directed (fast) advertising timeout and scanning at low power

We have an nRF51822 peripheral device that is bonded with one and only one central. The central is always an iOS or Android phone running our app, which is scanning at "low power", whatever that means for each mobile platform.

For Android (at least 5.0 through 7.1), low power means:

private static final int SCAN_MODE_LOW_POWER_WINDOW_MS = 500;
private static final int SCAN_MODE_LOW_POWER_INTERVAL_MS = 5000;

(See: android.googlesource.com/.../ScanManager.java

(I'm not aware of the equivalent values for iOS, but perhaps someone can enlighten me)

So an Android central of ours will only have the radio on 10% of the time. And, as explained here (devzone.nordicsemi.com/.../) each scan is on a different one of three channels. So we would need to be advertising for 15s in order to be reasonably sure of a connection and have scanning coincide with advertising at least once on each channel. Am I right so far?

If so, it would seem that directed advertising (fast) in this situation is pretty much useless because it's so short. How long is it, actually? I know it's really intended for situations when you've just lost a connection and the central is in fact doing higher powered scanning. Just looking for confirmation I've got this right.

Parents
  • I would at least see if the minimum advertising interval (20 ms, but 25 ms averaged) with normal advertising is sufficient to fulfill the requirements of your use case. It seems you are tied to low power scanning (I'm not sure why), but with 500 ms scan window and 5000 ms scan interval, and with 20 ms advertising interval the central should receive 500/25 = 20 advertisments every 5 seconds. With an advertising interval of 60 ms (65 ms averaged) the central should receive 500/65 = 7.7 advertisments every 5 seconds. Here I assume that there is no packet loss or interference, which there always is. So the smaller the advertising interval the higher chance the central has of receiving a higher number of advertisments.

Reply
  • I would at least see if the minimum advertising interval (20 ms, but 25 ms averaged) with normal advertising is sufficient to fulfill the requirements of your use case. It seems you are tied to low power scanning (I'm not sure why), but with 500 ms scan window and 5000 ms scan interval, and with 20 ms advertising interval the central should receive 500/25 = 20 advertisments every 5 seconds. With an advertising interval of 60 ms (65 ms averaged) the central should receive 500/65 = 7.7 advertisments every 5 seconds. Here I assume that there is no packet loss or interference, which there always is. So the smaller the advertising interval the higher chance the central has of receiving a higher number of advertisments.

Children
No Data
Related