The performance of the BLE discovery process, and particularly the tradeoff between discovery capabilities versus energy consumption of the scanner, greatly depends on the selected scanner parameter settings ( and values), in addition to the advertising interval and the advertising PDU size. Once a scanning interval value is set in the scanner, its energy consumption decreases as long as the decreases, whereas the non-detection probability increases. Nevertheless, we have fixed , because the goal is to detect the highest number of BLE devices in the shortest time interval. Firstly, the analysis, simulations and experiments are done in almost ideal conditions. Experiments are configured in controlled conditions, without the presence of interferences and low channel losses. After verifying that the simulation and the mathematical model meet the results obtained in the experimental tests, both the model and the simulation tool allow us to extend the analysis to a higher number of devices and several channel/interference conditions. Concerning the advertisers, in this section we analyze the impact of real peculiarities of the BLE chipsets on the discovery capacities, and the impact of and ADV_NONCONN_IND/ADV_SCAN_IND PDUs sizes.
Results
We developed a simulator in C++ that fully reproduces (without any simplification) both the advertising process in according with BLE specification and the real scanner configurations according to the peculiarities described
Section 3. In order to obtain the performance statistics, we averaged up to 10,000 coverage time intervals. Errors due to interference or channel loss conditions can be considered. However, to reproduce the experimental conditions, results are obtained in ideal conditions (i.e., BLER = 0%). As mentioned above, the experimental testbed was configured in controlled conditions to make these effects negligible. Specifically, the advertising BLEs transmit with a power level of 4 dBm. In a scenario with only one advertising BLE, we verified that with 4 dBm and with a power transmission level of −40 dBm, the non-detection probability corresponds to
and
, respectively. Thus, the BLER effects are almost negligible and the assumption of ideal conditions is suitable. In a real operating scenario, the time interval where an advertiser and the scanner are under mutual coverage may vary from one advertiser to another, as there may be times when the link is obstructed by obstacles (for example, a runner may be obstructed by other runners). It is important that the scanner is placed in a position with a good view of the entire area to be covered. In addition, our study considered the worst-case scenario, in which any overlap between two received packets results in the loss of both. In practice, there would be a capture effect, so that a good number of collisions would allow correct decoding of one of the packets. In any case, all this affects all discovery methods, not only the one proposed in this paper, and in no way is our proposal more affected by these situations. The most important parameters used in the evaluation are summarized in
Table 3.
Figure 7 shows the non-detection probabilities of ADV_SCAN_IND (
) and SCAN_RSP (
), when a continuous scannable undirected advertising event involving SCAN_REQ and SCAN_RSP is considered. The aim was to compare the simulation results (Sim) and the mathematical model results (Model), obtained when real scanning devices are assumed (types 1 and 2 scanning devices are denoted as types 1 and 2, respectively), with the experimental measurement results (Exp), as the number of advertisers increases from 2 to 18. Results are obtained for
176 μs,
152 μs with
100 ms and
10 ms. We can see that the experimental results are in perfect agreement with the mathematical model and the simulations. Thus, we can assume that the scanner is well characterized, and the mathematical model is accurate. Note that the analytical model and both the simulation and experimental results for type 1 scanning devices do not implement the backoff algorithm. Nevertheless, for type 2 scanning devices,
Figure 7 includes experimental and simulation results taking into account the backoff algorithm (denoted by B in the
Figure 7), in addition to the results obtained by simulation and by the analytical model without backoff implementation. We note that results are analogous because the backoff effect is almost negligible when the number of devices involved in the scenario is low.
By comparing the results of both ADV_SCAN_IND and SCAN_RSP non-detection probabilities, we can observe that differences between the actual implementations are quite significant and have to be considered. In this case, and considering the ADV_SCAN_IND non-detection probability, the type 1 scanner has a better performance than the type 2 up to eight advertisers, with the type 2 device being better for higher values. Nevertheless, the advantages of the type 2 real device in terms of ADV_SCAN_IND non-detection probability are not maintained when SCAN_RSP is considered. As we explained above, in type 2 scanning devices, if a periodic gap is planned between the reception of the ADV_SCAN_IND and the time the scanner expects to finish the reception of the SCAN_RSP, the scanner interrupts its operation until the time the periodic gap is planned, and then executes the periodic gap. This results in higher SCAN_REQ and SCAN_RSP non-detection probabilities, when the number of BLE advertisers is low. However, as shown in
Figure 8, the weight of this effect decreases as the number of advertisers grows, and type 2 scanner is a better choice for these parameter settings when a large number of advertisers coexist.
Figure 8 extends the comparison performed in
Figure 7 for a higher number of advertisers,
up to 200. ADV_SCAN_IND, SCAN_REQ and SCAN_RSP non-detection probabilities results, obtained by simulation, for the scannable undirected advertising with backoff (denoted by ADV/RSP/REQ Backoff) and without backoff implementation (denoted as ADV/RSP/REQ No backoff), are compared with the ADV_NONCONN_IND non-detection probability for non-connectable advertising events (denoted as NonConn). The comparison is performed for ideal (a), type 1 (b) and type 2 (c), assuming the same configuration (
176 μs,
152 μs with
100 ms and
10 ms). The analytical model results for scannable undirected advertising without backoff are also included. Firstly, we notice that the analytical model nearly matches with the results of the simulations for the whole range of devices when no backoff implementation is considered. If we narrow the focus of the analysis to scannable undirected advertising, it is evident that the differences between actual devices and the ideal implementation cannot be ignored. As already mentioned, for a higher number of advertisers, if no backoff implementation is considered, type 2 scanning devices offer better results than type 1 in terms of SCAN_REQ non-detection probabilities, even though this advantage is not as significant as when ADV_SCAN_IND is compared. If backoff implementation is included, we realize the negative and highly limiting impact of this mechanism in all cases. Note that, as we explained in
Section 3, backoff is only present in type 2 scanning devices, but it has been included in type 1 devices for comparison purposes. In this case, SCAN_REQ and SCAN_RSP non-detection probabilities grow, because SCAN_REQ are actually prevented from being transmitted (collisions between PDUs grow and thus
upperLimit of the backoff algorithm is doubled until it reaches its maximum, 256, on many occasions). Accordingly, ADV_SCAN_IND non-detection probabilities for the scannable undirected advertising converge to values similar to those obtained with non-connectable advertising events, as the number of SCAN_REQ tends to zero in scenarios with a high number of devices. The backoff mechanism is not really required in a scenario with only one scanner, but the mandatory implementation unnecessarily degrades the discovering capacities for a larger number of devices, if the SCAN_REQ reception is considered as criterion. In fact, when backoff is used and the number of advertisers exceeds a value of about 100 (for the set of parameters defined), the discovering capacities of scannable undirected and non-connectable advertising event will be very similar, from a ADV_SCAN_IND or ADV_NONCONN_IND reception perspective. Nevertheless, the use of a scannable undirected advertising scheme makes no sense, given that it does not work as it should. Thus, potential enhancements could include better-adapted designs of the backoff process, or even deactivation under certain conditions. In the end, type 1 scanning devices, even though it seems that they do not meet the standard recommendations (i.e., do not implement backoff), offer the best results.
In any case, and as expected, if we compare the schemes only from the advertising packet non-detection probability perspective, it is clear that the standard continuous scannable undirected advertising offers lower discovery capacities than the non-connectable option. So, we extend the analysis to the proposed adapted version of scannable undirected advertising.
In order to do that,
Figure 9 extends the comparison performed in
Figure 8 to the average time required to discover all the devices based on SCAN_REQ for the scannable undirected advertising event and ADV_NONCONN_IND reception for non-connectable advertising event. The comparison is not fair, because SCAN_REQ reception is a criterion more restrictive than ADV_SCAN_IND reception, but we consider that the reception of SCAN_REQ is a valuable indicator in the new scheme. Once a SCAN_REQ has been received by an advertiser, we can be assured that both the advertiser and the scanner realize that the device has been discovered. If only ADV_SCAN_IND reception is used, the device has been discovered, but the advertiser is not aware. Now, simulation and analytical model results are obtained for the continuous advertising event with SCAN_REQ and SCAN_RSP, whereas only the simulation is shown for the schemes when the advertiser interrupts the advertising process (denoted as INT) after correctly receiving an SCAN_REQ and when non-connectable advertising events with only ADV_NONCONN_IND are considered. We see that the upper bound (derived analytically) for the average time required to discover all the devices closely matches the simulation results, both for the interrupted and continuous version of the scannable undirected advertising events. The backoff implementation has a severe impact on SCAN_REQ reception. For example, results show that the interrupted version without backoff clearly offers better results than the non-connectable advertising scheme, previously analyzed in [
13], when real devices are considered, particularly for type 1 devices. In the ideal implementation, differences are almost negligible from the mean delay point of view. Thus, it is clear that real chipset implementation needs to be considered in any evaluation. Until now, the adapted scannable indirect scheme not only reduces the time required but also the energy consumption of advertisers. On the other hand, advertisers are aware that they have been discovered.
The same analysis, based on a fairer discovery indicator (the ADV_SCAN_IND or ADV_NONCONN_IND) reception for both scannable undirected and non-connectable advertising events) is performed in
Figure 10. We see that the interrupted version without backoff clearly offers the best results in all cases, with type 2 devices (without backoff) being the more attractive option. On the other hand, although we have excluded the backoff implementation, the interrupted version with backoff offers similar results to non-connectable advertising events for scenarios with a very high number of devices. Nevertheless, in order to compare the proposals, not only the average time required to discover all the devices, but also the distribution, is important. Therefore, we compute the probability that not all the devices are detected before a time threshold (
). Note that discovery capacity depends on
, so it should be evaluated for each desired application by considering the appropriate value for
.
Figure 11, connected with the analysis performed in
Figure 9, shows the probability of not detecting all the advertising devices and aware of being detected by the scanner (in scannable undirected advertising schemes) when
is set to 5 s. Note that, when only ADV_NONCONN_IND and type 1 real devices are considered, the probability of not detecting all the advertisers when
is around 0.1%, whereas in the interrupted version all devices are detected when ideal, types 1 and 2 scanning devices are considered. On the other hand, if ADV_SCAN_IND is used as the detection indicator in the interrupted version of the scannable undirected advertising event, the probability that all the devices are detected is 100%.
In order to better illustrate the analysis and the differences for the two more attractive options (the interrupted version of the scannable undirected advertising events and the non-connectable advertising scheme),
Figure 12 depicts the cumulative density function (CDF) of the time required to discover all the devices when
NBLE = 200 advertisers are considered. We can see that the variance is higher when the non-connectable advertising scheme is considered. In fact, as a more restrictive value for
DTH is considered, the higher the advantages of the interrupted version are. For instance, if
DTH is set to 2 s, none of devices are discovered when a type 1 scanning device is considered in a non-connectable advertising scheme, compared to 90% if a type 2 scanning device is used. For its part, the interrupted version guarantees that all the devices are discovered, regardless of whether ideal, type 1 or type 2 scanning devices are considered.
Figure 13 extends the comparison performed in
Figure 8 for several
TadvIND values (176 µs and 376 µs) and for different
TadvInterval (100 ms and 500 ms).
In contrast to
Figure 8, in
Figure 13, we focus the analysis on implementations without backoff and non-connectable advertising events. In this case, results are only shown for SCAN_REQ and ADV_NONCONN_IND non-detection probabilities in continuous event configurations.
Figure 13a–c shows that mathematical results for SCAN_REQ practically match with the simulation curves when no backoff implementation is considered. Differences between actual devices are significant.
Connected with
Figure 13,
Figure 14 shows the average time required to discover all the devices in seconds (
Figure 14a–c) and the probability of detecting all the devices in
DTH =5s (
Figure 14d–f) for the interrupted version of scannable undirected (INT) and non-connectable advertising scheme (NonConn). Note that upper bounds for the average delay can be obtained (they result in staircase functions) but they are not included in order to facilitate visualization of the comparison.
Firstly, we see that the differences between actual devices and ideal implementation are significant. On the other hand, the type 2 scanning device offers a better performance than type 1 when the non-connectable option is considered.
Nevertheless, if we focus on the interrupted version of scannable undirected advertising events, we see that the best results are obtained when
TadvInterval = 100 ms both for types 1 and 2 devices, although the general conclusions obtained for
TadvInterval = 500 ms differ from
TadvInterval = 100 ms, no matter the
TadvIND values. As we concluded above, type 2 scanning devices offer the best results when
TadvInterval = 100 ms. However, real type 1 devices are clearly a better option when
TadvInterval = 500 ms. In this case, they not only provide a low average time required to discover all the devices (based on SCAN_REQ reception), but also ensure that the probability that all the devices are detected within
DTH = 5 s is 1. Note that for
TadvInterval = 500 ms, ADV_NONCONN_IND and SCAN_REQ non-detection probabilities for type 2 scanners are lower than for type 1 when the number of advertisers is high, but differences are not very significant. On the other hand, as long as the number of devices decreases, the non-detection probabilities are more significant than in type 1 devices due to
scanning gaps. Thus, if we consider a scenario of, for example,
NBLE, in the first
TadvInterval +
TDelayMax interval a higher number of devices are discovered by a type 2 scanner, but as the number of devices remaining to be discovered is reduced, the time required to discover them is higher than when type 1 is considered. At the end, the time required by type 2 is higher. Finally, when comparing the non-connectable advertising option and the adapted version of the scannable undirected advertising option, the latter clearly outperforms the non-connectable advertising option for ideal and type 1 devices for all parameter settings. In fact, the probability that all devices are detected in
DTH = 5 s is significantly lower in the non-connectable option. Concerning type 2, the results are clearly better for
TadvInterval = 100 ms and
TadvInterval = 500 ms with
TadvIND = 376 μs. However, for
TadvInterval = 500 ms and
TadvIND = 176 μs, the results are not so evident. If SCAN_RSP reception is used as a reference, non-connectable advertising events seem to be more attractive. Nevertheless, in a more fair comparison based on ADV_SCAN_IND reception (see
Figure 15), we prove that the performance of type 2 is similar to non-connectable in terms of average delay
TadvInterval = 500 ms and
TadvIND = 176 μs. On the other hand, it is better in terms of the probability that all devices are detected in
DTH = 5 s (100% of devices are detected). Finally, the comparison of all the schemes based on a fairer discovery indicator (the ADV_SCAN_IND and ADV_NONCONN_IND reception for both scannable undirected and non-connectable advertising events), illustrated in
Figure 15, emphasizes the advantages of the proposed method.
In general, we can conclude that effects of parameter settings over different chipset implementations need to be considered. However, it seems clear that the interrupted version of scannable undirected advertising events outperforms results obtained with non-connectable advertising events. On the other hand, the differences between the actual implementations are quite significant and need to be taken into account. Type 1 scanning devices permit the discovery of at least 200 devices in a short period of time, even considering
TadvInterval of up to 500 ms and the highest size of ADV_SCAN_IND PDUs. However, the best results are obtained when
TadvInterval = 500 ms, both for types 1 and 2 scanning devices. The implementation of the backoff process may severely and unnecessarily degrade the discovery capacities. Thus, it needs to be carefully designed or even deactivated in the intended scenarios. In this sense, although both techniques proposed in [
14,
15] and mentioned in
Section 2.2 would probably work better than the one initially proposed by the standard, in that the advertiser would take less time to receive a SCAN_REQ PDU and, therefore, to find out that it has been discovered, in our scenario, where there is only one scanner, these backoff algorithms would still provide worse performance than the use of no backoff algorithm. In any case, an exhaustive analysis of these algorithms is outside the scope of this article, in which our objective is to demonstrate the improvement when implementing the present proposal compared to previous ones, even considering that a backoff algorithm will diminish the attainable benefits because the advertiser is going to take longer to find out that it has been discovered. Any backoff algorithm that reduces this time, as is the case of those proposed in [
14,
15], will improve the performance of our proposal with respect to the results obtained with the backoff algorithm initially suggested by the standard.