Next Article in Journal
A Novel Robust Trilateration Method Applied to Ultra-Wide Bandwidth Location Systems
Next Article in Special Issue
Design and Implementation of an Intelligent Windowsill System Using Smart Handheld Device and Fuzzy Microcontroller
Previous Article in Journal
Recent Advances in Electrochemical Immunosensors
Previous Article in Special Issue
Activity Learning as a Foundation for Security Monitoring in Smart Homes
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Analysis and Tools for Improved Management of Connectionless and Connection-Oriented BLE Devices Coexistence

Dipartimento di Ingegneria dell’Informazione, Università Politecnica delle Marche, Via Brecce Bianche 12, Ancona 60131, Italy
*
Author to whom correspondence should be addressed.
Sensors 2017, 17(4), 792; https://doi.org/10.3390/s17040792
Submission received: 28 February 2017 / Revised: 30 March 2017 / Accepted: 31 March 2017 / Published: 7 April 2017
(This article belongs to the Special Issue Sensors for Home Automation and Security)

Abstract

:
With the introduction of low-power wireless technologies, like Bluetooth Low Energy (BLE), new applications are approaching the home automation, healthcare, fitness, automotive and consumer electronics markets. BLE devices are designed to maximize the battery life, i.e., to run for long time on a single coin-cell battery. In typical application scenarios of home automation and Ambient Assisted Living (AAL), the sensors that monitor relatively unpredictable and rare events should coexist with other sensors that continuously communicate health or environmental parameter measurements. The former usually work in connectionless mode, acting as advertisers, while the latter need a persistent connection, acting as slave nodes. The coexistence of connectionless and connection-oriented networks, that share the same central node, can be required to reduce the number of handling devices, thus keeping the network complexity low and limiting the packet’s traffic congestion. In this paper, the medium access management, operated by the central node, has been modeled, focusing on the scheduling procedure in both connectionless and connection-oriented communication. The models have been merged to provide a tool supporting the configuration design of BLE devices, during the network design phase that precedes the real implementation. The results highlight the suitability of the proposed tool: the ability to set the device parameters to allow us to keep a practical discovery latency for event-driven sensors and avoid undesired overlaps between scheduled scanning and connection phases due to bad management performed by the central node.

1. Introduction

Bluetooth Low Energy (BLE), marketed as Bluetooth Smart, is a subset of legacy Bluetooth (BT), sometimes referred to as classic Bluetooth (BT). It was introduced as a part of the Bluetooth 4.0 core specification [1]. While it inherits many features from the legacy BT, BLE is different in terms of all the functionalities regarding smart energy management. The BT radio is integrated into more than 8.2 billion products, produced by over 30,000 Bluetooth Special Interest Group (SIG) members [2], and this makes the BLE an ideal candidate for the wireless technology for Body Area Networks (BAN) and Internet of Things (IoT) markets, including automotive [3,4,5], smart cities [6], healthcare [7,8,9,10], fitness [11,12], consumer electronics [13], and building and home automation [14,15,16]. The advantages in the use of BLE include: (i) low power functionalities, operating for months or years on a coin-cell, (ii) small size and low cost, (iii) full compatibility with commonly-used devices such as mobile phones, tablets and computers. These properties make the BLE more favorable for many short-range communication applications. The classic Bluetooth has 79 channels, 1 MHz spaced, while the BLE splits the 2 . 4 GHz spectrum into 40 channels, each 2 MHz wide. Of these, 37 channels are used for data transmission, while the remaining 3 are used for connectionless communication, such as device discovery. In particular, the neighbour discovery has been designed according to a concise state-machine, aimed to simplify the operations and to minimize the power consumption. However, connectionless communication is also designed for generic broadcasting tasks, for example the transmission of state data, i.e., small and infrequent bits of data. This network architecture shall be referred to as the connectionless data model. It foresees the advertising devices, also called tags, which exchange tiny data with a scanning central device without synchronization, but at a reduced latency. It is the case for event-driven sensors, that need to send data only after event detection. Generally, these kinds of sensors are strongly energy-constrained and, for this reason, designed to keep the radio turned off for as long as possible. The BLE protocol recommends several parameter settings for connectionless and connection-oriented communications, and their proper tuning to balance and optimize the performance for a wide range of applications in terms of latency, energy consumption and throughput. Some application scenarios require that unconnected sensors that monitor relatively unpredictable and rare events, could operate in coexistence with sensors that are always connected, continuously communicating health or environmental data. The coexistence of connection-oriented and connectionless networks, sharing a single central/collector node can be required to reduce the number of handling devices, keeping the network complexity low and limiting the packet’s traffic congestion. The central device must be programmed in order to better schedule scanning and connection duty cycles, thus optimizing the use of the time division multiple access (TDMA) scheme. To the best of our knowledge, this is the first work that proposes a tool supporting the design and the configuration of BLE devices, allowing a single central node to manage either sensors working in connectionless mode, as advertisers, and other sensors, acting as slave nodes, in persistent connection. Models for both the connectionless and connection-oriented communications have been merged to obtain an algorithm that is able to estimate the discovery latency for event-driven sensors in relation to the loss of connected sensors data, caused by a bad central scheduling of communication operations. The paper is organized as follows: related works are presented in Section 2. An overview of BLE is provided in Section 3. In Section 4, first, a statistical-iterative model for discovery latency estimation is presented and, second, the tools to balance the performances of connectionless and connection-oriented devices, sharing a single central node, are provided. Section 5 presents the results obtained by the application of developed methods and provides an analysis of them. Finally, conclusions are given in Section 6.

2. Related Works

The related works section is divided into two parts: the former analyzes the literature focusing on the performance evaluation in device discovery, while the latter deals with connected devices issues.

2.1. Overview on Discovery Process Issues

Many works and several statistical and/or simulative approaches have been formalized to estimate the discovery latency in BLE networks.
In [17], the authors proposed an analytical model for a 3-channel-based neighbor discovery. Specifically, the model derives the discovery latency, not taking into account the collision amongst packets from homogeneous BLE devices as well as the interference with one or more channels. The model outcomes seem to match the simulation results for a scanning duty ratio greater than a certain value (0.3).
In [18] the authors propose an energy model for all the operating modes foreseen by the BLE protocol. Specifically, they provide a solution that is not closed-form, which estimates the mean discovery latency. The algorithm developed by the authors is at the basis of the model proposed herein and, for this reason some details will be provided below and a comparison among them discussed in Section 5.1.
In [19], an analytical model is developed to investigate the discovery probability. The authors have analyzed both the continuous and discontinuous scanning performed in active mode (i.e., with active exchange of scan request and scan response). According to the authors’ conclusion, the results, obtained via the proposed closed-form solution match the performed simulation experiments. The analysis of theoretical results appears to exhibit an exponential growth of device discovery delays, related to the increasing tags number. Despite this, the use of three advertising channels and tiny-sized frames has weak effects on the discovery latency.
In [20], starting from the model developed in [19], the authors present intensive simulations to investigate discovery probability and provide a quantitative examination of the influence of parameter settings on the discovery latency and the energy performance metric of the discovery process.
In [21], the authors propose a general model for analyzing the performance of neighbor discovery process in BLE networks. According to the Authors’ conclusion, the numerical results, produced by their model, meet the simulation outcomes for some parameter values specified by the standard.

2.2. Overview on Connection-Oriented Issues

In [22] the Author analyzes how the protocols BLE and Advanced and Adaptive Network Technology (ANT) may coexist on a single chip. Given that both ANT and BLE are low duty-cycle protocols, the cited work defines the general scheduling principles.
In [19] the authors investigate the impact of various critical parameters on the performances of BLE devices operating in connection mode. The paper provides experimental results that complement the theoretical and simulation findings, and indicates implementation constraints that may reduce the BLE performance.
In [8] the authors analyze a proof of concept of critical parameters setting in connection-oriented networks. The proposed system consists of two wearable BLE devices (smart shoes) that need to remain connected to a central node in order to stream data to it. The smartphone, often designated to be the central node in a piconet (i.e., connection-oriented network), is a commonly used device, that has sufficient capacity to jointly manage different radios (such as mobile radio, Bluetooth, WiFi, Near Field Communication (NFC), etc.) and/or a single radio serving sub-networks with different topologies and communication strategies. Starting from this key point, the following section will discuss how the central node can jointly manage BLE connected devices, and event-driven tags without a persisting connection.

3. Bluetooth Low Energy

The BLE radio operates in the 2 . 4 GHz to 2 . 4835 GHz frequency Industrial, Scientific and Medical (ISM) band, with Gaussian Frequency-Shift Keying (GFSK) modulation. It splits the spectrum into 40 channels, each 2 MHz wide, and runs Frequency-Hopping Spread Spectrum (FHSS) to avoid interference. Three of these channels are used for advertising, connection-initiating and data-transfer in connectionless communication, while the remaining 37 channels are used for data-transfer in connection-oriented communication. In BLE, each advertising node runs an advertising event once at the beginning of each advertising interval. This can be set per tag in the range of values from 20 ms to 10,240 ms in steps of 0 . 625 ms. The BLE protocol does not implement carrier sensing on the used channels, and, because of this, the advertiser sends the same advertising packet to all the dedicated three channels 37 (2402 MHz), 38 (2426 MHz), 39 (2480 MHz) at each advertising event in order to avoid repeated collisions. Figure 1 depicts the advertising event timeline. Moreover, each advertiser adds a random delay up to 10 ms to avoid a massive contention.
The advertising channels are between or outside the main frequencies used by IEEE 802.11 protocols, to prevent interference with the channels used by WiFi. In addition, the scanning devices run periodic operations, listening to advertisers during a scan window, once at the beginning of every scan interval. The scan interval and scan window can be set per scanner device. The scanner subsequently changes listening-channel at each scan window. The advertisers can operate in passive or active scanning. In passive mode, each node periodically broadcasts an advertisement message on the three channels. After sending, it can wait up to 10 ms before sending the same packet on the subsequent channel. The maximum payload per packet is 31 bytes long. The scanner does not reply to passive advertisers. On the contrary, in active mode, the scanner must reply immediately, unicasting the scan request message to the advertiser. The latter stops the messages exchange by broadcasting a scan response message (SCAN_RSP). Since the maximum payload of SCAN_RSP is 31 bytes, the advertiser doubles its transmission data capacity per advertising event. When a central device intends to initiate a connection with the advertiser, it sends a request (CONN_REQ) packet on the same channel used by the advertiser 150 µs after the reception of the advertisement message. The CONN_REQ payload contains the hopping map of channels that the connecting device must use in sequence during the connection. Thus, the advertiser immediately stops its advertising event, and jumps to the requested data channel to continue the connection sequence. Figure 2 depicts the connection procedure timeline.
Firstly, the two devices exchange information about the connection configuration. The master decides how often the slave has to wake up for incoming transmission (connection interval and slave latency). The choice depends on the slave and master availability and on the throughput requested by the particular application. After the initial configuration is completed, the devices can start the data transfer. In general, the slave can have multiple data transfers in a single connection event, with a maximum payload of 20 bytes.

4. Materials and Methods

Connectionless communication is mainly used to discover devices available for connection. As stated above, in some scenarios the advertisers might not require a connection, but can use the discovery procedure to exchange data with central devices without synchronization or acknowledgement mechanisms. The characterization of the time a sensor spends from the detection and transmission of an event to the successful delivery of a packet to the central node, boils down to the modeling of the discovery process. In the following discussion, the advertisers are indifferently referred to as tags. The main advantage of connectionless communication is the greater energy saving with respect to the connection-oriented communication, specifically in the case of few and unpredictable data to be exchanged. If an application requires that both the tags and the slaves share a single central node, proper parameters configuration is necessary to keep the discovery latency for tags low, while at the same time avoiding undesired overlaps between scanning and connection phases, due to a bad medium access management. Section 4.1 provides the description of the model for the discovery latency estimation; Section 4.2 formalizes the scheduling procedure the master implements to manage two slaves, and, finally, in Section 4.3 the connectionless and connection-oriented models are merged into an algorithm which aims to properly design the parameters configuration.

4.1. Connectionless Model

In connectionless networks, the devices are generally battery-powered; therefore, limiting the duration of transmission is necessary to save energy. An important metric to consider is the discovery latency, which is the time the tag spends in active state, from the start of transmission to the successful delivery of data to the central node. High discovery latency leads to increased energy consumption; therefore, limiting it is good practice. The proposed model for discovery latency estimation is based on [18], but it differs for the ability to reduce the algorithm computational complexity, and for an extensive stochastic approach to the problem description. As mentioned above, the tag periodically sends a burst of three packets on channels 37, 38 and 39. This operation is called advertising event. The interval between two advertising events is labeled as advertising interval and denoted by T a d v . Asynchronously, the scanner duty-cycles between scan and idle phases with period T s i , that is the scan interval. The scan duration per period is called scan window and denoted by d s w . The scanner senses the 3 channels in a round-robin fashion. This implies that the duration of a complete scan is equal to 3 T s i . The advertising interval is the sum of two terms, as shown in Equation (1).
T a d v ( n ) = T a d v , 0 + ρ ( n )
T a d v , 0 is a settable parameter, while ρ is a dynamic additive term, chosen randomly up to 10 ms each n-th advertising event. It is produced by a Random Number Generator (RNG) and has a double aim:
(i)
reducing the probability of advertising packets collision,
(ii)
preventing a tag from missing consecutive scan events.
Given the Equation (1) and the scanner-advertiser timeline in Figure 3, the beginning of n-th advertising event can be modeled by Equation (2).
t a , n ( n , ϕ ) = ϕ + n · T a d v , 0 + i = 1 n ρ ( i )
where ϕ represents the offset between the beginning of the first scan event and the first advertising event. Setting out T s i and d s w for the scanner and T a d v , 0 for the tag, Algorithm 1 estimates the expected discovery latency, denoted by d e x p , by finding the couple of values ( n , k ) which verifies with high probability the condition expressed by Equation (3).
k · T s i - d e a r l y ( c h ) t a , n ( n , ϕ ) k · T s i + d s w - d l a t e ( c h )
where c h represents the listening channel of the k-th scan window, and is computed step by step as in Equation (4).
c h ( k ) = m o d ( k , 3 ) + 37
The durations d e a r l y ( c h ) and d l a t e ( c h ) represent the time before the beginning (the first) and the end (the second) of the k-th scan event that allows the n-th advertising event to fall within the k-th scan window; they are function of c h and, consequently, depend on k as shown in Table 1. It follows that the effective scan window d s w is shorter than d s w . More in detail, its value is ( d s w - d a ) , where d a denotes the time for sending an advertising packet on a single channel and listening to a possible response. The protocol foresees that this time must be up to 10 ms, but usually, the value is much lower, almost 1 ms for passive scanning. In the case of active scanning this value can be larger, but always limited to 10 ms. At each n-th advertising event the tag randomly chooses ρ ( n ) through a pseudo random-number generator (RNG). In terms of probability the random variable ρ can be modeled through the uniform distribution with boundaries 0 and 10 ms. The probability density function (pdf) f ( t a , n ) is computed as in Equation (2) taking into account that:
(i)
ϕ , i.e., the offset between the first scan event and the first advertising event anchor points, is modeled through the uniform distribution with boundaries 0 and ϕ m a x = 3 T s i ,
(ii)
( n · T a d v , 0 ) shifts f ( t a , n ) ,
(iii)
i = 1 n ρ ( i ) is the sum of n independent random variables ρ .
Algorithm 1 Discovery latency estimation. The function takes as input arguments the scan interval T s i , the scan window d s w and the advertising interval T a d v , 0 , and gives back the expected discovery latency d e x p .
1:
function d i s c o v e r y L a t e n c y ( T s i , d s w , T a d v , 0 )
2:
     ρ m a x ← 10 ms
3:
     ϕ m a x 3 T s i
4:
     ϵ 0 . 0001
5:
    n ← 0
6:
     p c M ← 1
7:
     d e x p ← 0
8:
    while ( p c M ) ϵ do
9:
         f ( t a , n ) p d f ( ϕ + n · T a d v , 0 + 1 n ρ )
10:
         μ f ϕ m a x 2 + n · T a d v , 0 + ρ m a x 2
11:
         h w f g e t S i g m a ( f ( t a , n ) )
12:
         k m i n f l o o r ( μ f - h w f T s i )
13:
         k m a x c e i l ( μ f + h w f T s i )
14:
         p h i t ← 0
15:
        for k = k m i n to k m a x do
16:
               c h m o d ( k , 3 ) + 37
17:
               ( d e a r l y , d l a t e ) g e t I n t e r v a l ( c h )
18:
               d a , e v t g e t A d v E v n t D u r a t i o n ( c h )
19:
               t k , s k · T s i - d e a r l y
20:
               t k , e k · T s i + d s w - d l a t e
21:
               p k - t k , e f ( t a , n ) - - t k , s f ( t a , n )
22:
               p h i t p h i t + p k
23:
               d e x p d e x p + p k · p c M · ( n · ( T a d v , 0 + ρ m a x 2 ) + d a , e v t )
24:
        end for
25:
         p c M p c M + ( 1 - p h i t )
26:
        n n + 1
27:
    end while
28:
    return d e x p
29:
end function
The pdf of the term (iii) is the convolution of n uniform distributions. For n = 1 the pdf is a uniform distribution with boundaries 0 and 10 ms. For n = 2 the pdf is a triangular distribution. In contrast, for n > 2 the Central Limit Theorem (CLT) can be applied with sufficient approximation, describing the pdf of (iii) as a Gaussian distribution. The latter, shifted by (ii), takes μ g = n × 5 ms as mean and σ g = n 12 × 10 ms as standard deviation. Finally, the pdf of t a , n isproduced by the convolution between the pdf of (i) + (ii) and the pdf of the random variable ϕ by (iii). Algorithm 1 for each advertising event n calculates the expected value μ f and the half-width h w f of the distribution function f ( t a , n ) , that is the half time interval width, which at least 99 % of f ( t a , n ) falls within. These are used to evaluate k m i n and k m a x , which are the lowest and highest indices of the scan events, that the n-th advertising event probabilistically overlaps with. The for-loop at each step, from k m i n to k m a x , updates the channel c h , and consequently the time d e a r l y ( c h ) , d l a t e ( c h ) of the k-th scan event and the current duration of the advertising event, denoted by d a , e v t ( c h ) and calculated as in Table 2. Then, the effective start and end time of the k-th scan event, t k , s and t k , e respectively are evaluated. Given those values, the algorithm calculates p k , i.e., the probability for the n-th advertising event being received successfully by the scanner, according to Equation (7), as the difference between the cumulative functions Equations (5) and (6).
F f ( t a , n ) ( t k , s ) = P ( f ( t a , n ) t k , s )
F f ( t a , n ) ( t k , e ) = P ( f ( t a , n ) t k , e )
p k = F f ( t a , n ) ( t k , e ) - F f ( t a , n ) ( t k , s ) = - t k , e f ( t a , n ) - - t k , s f ( t a , n )
For the calculation of d e x p , two other variables, p h i t and p c M , are required:
(i)
p h i t is the probability for a successful reception of the n-th advertising event, given that all previous events have not been received at the scanner,
(ii)
p c M is the cumulative miss probability that n advertising events do not lead to a successful reception.
The joint probability p c M · p k gives the probability that the n-th advertising event is needed to close the cumulative miss probability p c M to zero. The probability p c M is the stop condition of the while-loop. In fact, when p c M reaches a value under the given threshold ϵ , the algorithm outputs the final estimation of d e x p . The estimation accuracy depends on ϵ : the smaller ϵ , the better the accuracy, but the higher the computational cost. The value 0 . 0001 for ϵ allows a good accuracy.

4.2. Connection-Oriented Model

The following discussion looks into the case in which the central node handles up to 2 connected devices. The connection interval is the interval time between two consecutive connection events and is denoted by T c i . It must be set as multiple of 1250 µs. Within the connection phase, master and slave negotiate the connection parameters:
(i)
connection interval ( T c i ) from 7 . 5 ms to 4 s in steps of 1 . 25 ms,
(ii)
slave latency, that is the number of connection events the slave could skip in lack of packets to send,
(iii)
supervision timeout, maximum time the master must wait in the case of a lack of slave link before closing the connection.
Given one device, denoted by A, connected to the master, if a second slave, denoted by B, requests to establish a connection with the same master, the latter must properly space between A’s and B’s anchor points in order to avoid the two connections experiencing colliding transmissions. When choosing the offset δ A B (shown in Figure 4) the central node must take into account:
(i)
the slave request, i.e., a minimum and a maximum value of acceptable T c i ,
(ii)
the condition of no-time-coincidence, expressed by Equation (8).
g c d ( T c i , A , T c i , B ) + τ < ( 2 · g c d ( T c i , A , T c i , B ) - τ )
The first term in Equation (8) is the greatest common divisor (gcd) between the connection interval of A and B, τ is the sum of d c e and d c h : the former is the duration of a connection event (up to 10 ms) and the latter is the channel hop duration.
Whether the condition Equation (8) is verified, the master has just to choose δ A B within the interval shown in Equation (9), in order to avoid overlaps.
m · g c d ( T c i , A , T c i , B ) + τ < δ A B < ( m + 1 ) · g c d ( T c i , A , T c i , B )
where m is an integer. If δ A B does not fall within the interval given by Equation (9), overlaps will occur every T c i , A ( B ) / l c m ( T c i , A , T c i , B ) transmissions of slave A(B). Else if the condition Equation (8) was not verified, any δ A B the master would choose will result in collision. As a result, the master would not be able to handle two connections.

4.3. Coexistence Issues Modeling

The previous paragraph discussed the scheduling techniques the master must implement to avoid overlaps between two slaves transmissions. Here, we analyzed the coexistence of connectionless and connection-oriented devices interfacing a single central device. In this case, the central node should avoid not only the overlap of connection events, but also the coincidence between connection and scan events. In fact, if the central scheduled a connection event overlapping with a pre-scheduled scan event, the connection event would be skipped, with the resulting loss of the slave’s packet. It follows that an improper choice of scan parameters could result in an undesired loss of data from connected devices. The developed Algorithm 2 takes as input the connection intervals T c i , A and T c i , B , the advertising interval T a d v , 0 , and the percentage of packets p s u c c the master must guarantee to exchange with the slaves without overlaps, and gives back the scan interval T s i , the scan window d s w , and the derived expected discovery latency d e x p . Firstly, the algorithm checks the condition Equation (10). This is obtained from Equation (8) by adding the time necessary to switch from connection event to scan event and viceversa ( 2 · d c h ).
g c d ( T c i , A , T c i , B ) + τ + 2 · d c h < 2 · g c d ( T c i , A , T c i , B ) - ( τ + 2 · d c h )
If this is not verified, the algorithm exits without results, otherwise it goes to the following steps. The offset δ A B must be chosen as:
δ A B = g c d ( T c i , A , T c i , B ) + τ
Algorithm 2 Parameter designer tool. The function takes as input the connection intervals T c i , A and T c i , B , the advertising interval T a d v , 0 , and the percentage of packets p s u c c the master must guarantee to exchange with the slaves without overlaps, and gives back the scan interval T s i , the scan window d s w , and the derived expected discovery latency d e x p .
1:
function p a r a m e t e r D e s i g n e r ( T c i , A , T c i , B , T a d v , 0 , p s u c c , )
2:
     d c e ← 10 ms
3:
     d c h 150 μ s
4:
     τ d c e + d c h
5:
    if ( g c d ( T c i , A , T c i , B ) + τ + 2 · d c h ) < ( 2 · g c d ( T c i , A , T c i , B ) - ( t a u + 2 · d c h ) ) then
6:
         δ A B g c d ( T c i , A , T c i , B ) + τ
7:
        r l c m ( T c i , A , T c i , B ) / m i n ( T c i , A , T c i , B )
8:
         T s i m i n ( T c i , A , T c i , B )
9:
         t s t a r t δ A B
10:
         t k , s t a r t m a x ( T c i , A , T c i , B )
11:
        for k = 1 t o r do
12:
              if t k , s t a r t t s t a r t then
13:
                   t k , s t a r t t s t a r t / m a x ( T c i , A , T c i , B ) · m a x ( T c i , A , T c i , B )
14:
              end if
15:
              if ( t k , s t a r t - t s t a r t ) > m i n ( T c i , A , T c i , B ) then
16:
                   d s w ( k ) T S I - ( τ + d c h ) ;
17:
              else
18:
                   d s w ( k ) t k , s t a r t - ( t s t a r t + τ + d c h ) ;
19:
              end if
20:
               t s t a r t t s t a r t + T s i
21:
        end for
22:
         d s w S e l e c t S c a n W i n d o w ( d s w , p s u c c )
23:
         d e x p D i s c o v e r y L a t e n c y ( T s i , d s w , T a d v , 0 )
24:
        return T s i , d s w , d e x p
25:
    else
26:
        return n u l l
27:
    end if
28:
end function
Given that the A’s and B’s anchor points present a repetitive timeline pattern, for each r = l c m ( T c i , A , T c i , B ) / m i n ( T c i , A , T c i , B ) , the algorithm calculates T s i as the minimum value between A’s and B’s connection intervals. Later, it evaluates the r scan windows d s w , including them in the vector d s w . The function S e l e c t S c a n W i n d o w ( d s w , p s u c c ) finds the scan window duration that makes the master able to successfully receive at least the percentage p s u c c of packets exchanged with the slaves. Algorithm 2 can also be used fixing T c i , A and T c i , B , varying the value of T a d v , 0 . The way the algorithm is used depends on which parameters can be adjusted and on network design requirements for the particular application scenario. Some results are highlighted in the Section 5.

5. Results

This section is divided into two paragraphs: the former provides some results on discovery latency issue, approaching the Algorithm 1, while the latter shows how to use Algorithm 2 and understand its results, with the aim to balance and optimize the networks setting.

5.1. Connectionless Model Results

Algorithm 1, proposed in this paper, estimates the discovery latency of a tag in advertising phase, not taking into account the collision amongst homogeneous BLE devices, the interference to one or more channels and the reception of corrupted packets. As widely explained in Section 4, it uses an iterative-probabilistic model which simplifies the one presented in [18]. In the following, we provide an example of a possible scenario, in order to discuss Algorithm 1 results, also comparing them to those of [18]. Table 3 summarizes the scanner and tag parameters designed if a tag self-advertises while one scanner is in listening mode. The Figure 5 compares the results obtained by the application of the model in [18] and Algorithm 1.
The solid line represents the expected discovery latency d e x p produced by the former, while the triangle-pointed line represents the mean discovery latency, denoted by d ¯ m e a n , obtained by the model in [18]. The simulations are performed for the following configuration: T s i = 100 ms, d s w = 25 ms, d a = 10 ms.
As visible in Figure 5, the amplitude of d ¯ m e a n periodically becomes very high, giving rise to noticeable peaks for T a d v , 0 close to multiples of T s i and d s w . It is important to clarify that the algorithm in [18] estimates the discovery latency averaging the delays obtained by varying the offset ϕ from 0 to 3 T s i . For T a d v , 0 close to multiples of T s i or d s w , the discovery latency drastically increases, but only for a few values of ϕ . The average d ¯ m e a n is strongly affected by these few but high values. Algorithm 1 generalizes the description of the discovery latency, not using any kind of average, but directly inserting ϕ in the probabilistic model. As a result, the solid line shows a linear relationship between T a d v , 0 and d e x p estimated by Algorithm 1. This result produces a manageable representation of d e x p trend that is easier to integrate in more complex models.

5.2. Coexistence Model Results

When two devices request to establish a connection link to a central node, the latter must assign proper connection intervals to them and space their anchor points in order to manage the data exchanges without overlaps. In fact, assuming the master was previously connected to the slave A with connection interval T c i , A , it must properly design the configuration for B for the incoming connection. The choice is constrained by the presence of one already active connection, and must fit the condition Equation (8). If the central node also has to listen to advertising devices, it must properly set the connection interval of the second device B and fit the condition Equation (10) in order to better schedule both the slaves and tags. Fixing T c i , A and T a d v , 0 , Algorithm 2 gives back the values of T c i , B that reach the right balance between a limited d e x p and a high percentage p s u c c of successful connection events. The histogram in Equation (6) depicts the results produced from Algorithm 2, fixing T c i , A and T a d v , 0 equal to the typically used value 100 ms and varying T c i , B in the interval [ 50 ÷ 600 ] ms with steps of 50 ms. It shows T c i , B and d e x p on the x- and y- axis, respectively. There are three bars per each couple of values ( T c i , B , d e x p ) : black for p s u c c = 100 % , grey for p s u c c = 80 % , white for p s u c c = 50 % . Some observations can be derived:
(i)
because of the condition of no-time-coincidence expressed by Equation (10) the master can accept only values of T c i , B multiple of g c d ( T c i , A , T c i , B ) ; indeed, the histogram depicts bars only for values of T c i , B multiple of 50 ms,
(ii)
the black bar is usually higher (or equal) than the grey one, and the latter greater (or equal) than the white one; this depends on the percentage p s u c c that must be guaranteed,
(iii)
for some values of T c i , B the bars have similar height; in these cases the discovery latency d e x p is not sensitive to p s u c c , at least above a certain percentage threshold, e.g., for T c i , B = 100 ms the value of d e x p is equal to 38 . 47 ms independently of p s u c c from 50 % to 100 % .
The Table 4 gives the values of T s i and d s w that produce the results shown in Figure 6. Notice that when T c i , B and T c i , A are multiples, the scanning duty cycle systematically overtakes the 50 % , keeping d e x p at low values. This fact points up that choosing the connection intervals equal or multiple to each other is a good practice to maximize the scanning duty cycle and, consequently, to limit the discovery latency.
Algorithm 2 can also be used by fixing T c i , A and T c i , B and varying T a d v , 0 . For example, assigning to the parameters T c i , A and T c i , B the values 100 ms and 50 ms respectively, the algorithm gives back the discovery latencies d e x p related to ascending values of T a d v , 0 in the range [ 20 ÷ 1000 ] ms, for given percentages of p s u c c . For these settings the scan parameters are easily evaluated: T s i = 50 ms, d s w = 29 . 55 ms for p s u c c { 100 % , 80 % } and d s w = 39 . 70 ms for p s u c c = 50 % . The histogram in Figure 7 shows the advertising interval T a d v , 0 on the x-axis and the discovery latency d e x p on the y-axis. There are three bars per each couple of values ( T a d v , 0 , d e x p ) : black for p s u c c = 100 % , grey for p s u c c = 80 % , white for p s u c c = 50 % . As it can be seen, for fixed value of scan interval and scan window the discovery latency linearly rises by increasing the advertising interval, according to the results discussed in the previous paragraph. This implies that tags which transmit very frequently are able to minimize the discovery latency, particularly when the scan window is tiny compared to the scan interval, i.e., for a low receiver duty cycle.

5.3. Application in Home Automation and AAL Context

When using BLE in wireless Home Automation and AAL applications, the number of devices becomes a limitation as BLE implements a star topology and the central node can manage only a few devices in persistent connection. Due to the TDMA technique, the number of time slots available for connected devices is further limited id the application requires short connection intervals. The connectionless topology allows us to increase the number of sensors while reducing the connected nodes. On the other hand, the central node should run heavier scheduling operations to handle both the types of communications.
The presented tool is aimed at supporting the design and the configuration for these use cases. A possible scenario architecture is represented by the co-existence of the network systems presented in [8,23]. In the former, two wearable devices (smart shoes) are connected to a central node, while the latter shows a platform for assistive home technologies based on the Message Queuing Telemetry Transport (MQTT) protocol, which also foresees a gateway, acting as central node for BLE sensors. Different types of event-driven sensors installed in the house are in charge of detecting the events of interest, specifically:
  • magnetic sensors placed on the entry door and on the windows, to detect opening and closing events;
  • a Passive Infrared (PIR) sensor to be installed in the bathroom, to detect the user’s presence;
  • a bed sensor placed under the mattress.
These sensors do not need persistent connection. For this reason, a connectionless communication is recommended. If the two cited networks require to share the central node, properly tuning some critical BLE parameters becomes necessary. As highligthed in [8], the smart shoes need to have the connection intervals equals to 100 ms and slave latencies equal to 7 connection intervals. As shown in Table 4, for T c i , A and T c i , B equal to 100 ms, the suggested values of scanning parameters, produced by Algorithm 2, are: T s i = 100 ms and d s w = 79 . 55 ms. For these settings:
(i)
the percentage p s u c c of connection events successfully run up to all those scheduled reaches the 100 % ;
(ii)
the expected discovery latency will be 38 . 47 ms for sensors with advertising interval T a d v , 0 equal to 100 ms.
The tiny value of the obtained expected discovery latency, quantitatively proves the suitability of this possible configuration and demonstrates that equal settings of slaves connection parameters maximize the time available for scanning operations. The increase in the number of the slaves makes d s w collapse. In an extended scenario, considering the example of more than a pair of smart shoes, that require persistent connection with an interval of 100 ms, the master could manage at most 4 pairs of devices at the same time, with the minimum offset δ A B being equal to 10 . 150 ms, according to the condition Equation (11). In this case, the central node can use a maximum scan window of 17 . 650 ms to perform the discovery process. For this d s w , Algorithm 1 estimates a value of discovery latency equal to 1015 . 4 ms for T a d v , 0 = 100 ms, and 3860 . 4 ms for T a d v , 0 = 400 ms. The former value of expected discovery latency implies the sensor is expected to self-advertise for almost 4 s, from the event detection to the successful delivery of data. This condition would cause a noticeable delay in the sensor feedback and an increased power consumption for the transmitting node.
With respect to slaves’ data reliability, the full compliance with the condition in Equation (11) and the adoption of the obtained scan window are enough to guarantee that p s u c c will reach 100%. Thus, in the case of slaves with equal connection intervals, the connection events will never overlap with scan events.

6. Conclusions

This paper proposed a tool aimed to support the design and the configuration of Bluetooth Low Energy devices, allowing a single central node to manage both the connected and the asynchronous sensors and/or actuators. The medium access management of the central node has been modeled, focusing on the scheduling procedure in both connectionless and connection-oriented communication. The developed models were then merged into a single tool. The results highlight the suitability of the proposed tool for a proper design of the device parameters, maintaining, for example, useful timing for discovery process of event-driven sensors and avoiding undesired overlaps between advertising events and connection events, due to inaccurate scanning and connection parameters configuration. The model of coexistence, proposed in this paper, considered only two devices in persistent connection. Future developments will be focused on the extension of the tool to a greater number of connected devices to verify how many different devices can be jointly supported by this kind of configuration.

Acknowledgments

The work presented in this paper was partly supported by the Italian National Technology Cluster project SHELL (Shared interoperable Home Ecosystems for a green, comfortabLe and safe Living), project code: CTN01 00128 111357.

Author Contributions

A.D.C was responsible for the design and implementation of the algorithms presented in the manuscript and for the manuscript editing; L.C. contributed to algorithms implementation; S.S. and E.G. were involved in the manuscript editing and coordinated the research project development.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A. Table of Symbols

Models Parameters
SymbolUnitDescription
T a d v , 0 [s]Static advertising interval, settable for the advertisers in the range from 20 ms to 10,240 ms in steps of 0.625 ms
ρ ( n ) [s]Dynamic additive delay up to 10 ms added to T a d v , 0 for the n-th advertising event
T a d v ( n ) [s]Advertising interval value of the n-th advertising event, equal to T a d v , 0 + ρ ( n )
ϕ [s]Offset between the beginning of the first scan event and the first advertising event
T s i [s]Interval between two consecutive scan events, settable for the scanners in the range from 0 to 10,240 ms
d s w [s]Duration of active scanning for scan event, settable for the scanners in the range from 0 to T s i
c h -Advertising channel number: 37, 38, 39
d e a r l y ( c h ) [s]Time before the beginning of the k-th scan event that allows the n-th advertising event to fall within the k-th scan window; depends on c h
d l a t e ( c h ) [s]Time before the end of the k-th scan event that allows the n-th advertising event to fall within the k-th scan window; depends on c h
d a [s]Time for sending an advertising packet on a single channel and listening to a possible response, up to 10 ms
d a , e v t [s]Current portion of the k-th advertising event which the advertiser has already run.
d s w [s]Effective scan window, equal to ( d s w - d a )
t a , n ( n , ϕ ) [s]Anchor point of the n-th advertising event; also depends on ϕ
f ( t a , n ) -Probability distribution function of t a , n ( n , ϕ )
ϕ m a x [s]Model boundary for ϕ equal to 3 T s i
μ X -Expected value of X probability density function
σ X -Standard deviation of X probability density function
h w X -Half time interval width, which at least the 99 % of f ( t a , n ) falls within
k m i n -Lowest index of the scan events the n-th advertising event probabilistically overlaps with
k m a x -Highest index of the scan events the n-th advertising event probabilistically overlaps with
t k , s [s]Start time of the k-th scan event with duration d s w
t k , s [s]End time of the k-th scan event with duration d s w
F X ( X ) -Cumulative distribution function of a random variable X, representing the probability that the random variable X takes on a value less than or equal to X
p k -Probability for an advertising event being received in the k-th scan event
p h i t -Probability for a successful reception of the n-th advertising event, given that all previous events have not been received at the scanner
ϵ Model parameter representing the upper bound of p c M
p c M -Cumulative miss probability that n advertising events do not lead to a successful reception.
d e x p [s]Expected discovery latency for given T s i , d s w and T a d v , 0
d ¯ m e a n [s]Mean discovery latency calculated by the algorithm in [18]
T c i [s]Interval between two consecutive connection events, settable in the range from 7 . 5 to 4000 ms in steps of 1 . 25 ms
d c e [s]Duration of a connection event, up to 10 ms
d c h [s]Duration of the time used for channel hopping
τ [s]Sum of d c e and d c h
δ A B [s]Offset between A’s and B’s first anchor points
P s u c c [%]Percentage of connection events successfully run up to all those scheduled
g c d ( a , b ) -Greatest common divisor of a and b
l c m ( a , b ) -Least common multiple of a and b
m i n ( a , b ) -Minimum value between a and b
m a x ( a , b ) -Maximum value between a and b

Abbreviations

The following abbreviations are used in this manuscript:
AALAmbient Assisted Living
ANTAdvanced and Adaptive Network Technology
BANBody Area Network
BLEBluetooth Low Energy
BTClassic Bluetooth
CLTCentral Limit Theorem
FHSSFrequency Hopping Spread Spectrum
GFSKGaussian Frequency-shift keying
IEEEInstitute of Electrical and Electronics Engineers
IoTInternet of Things
ISMIndustrial, Scientific and Medical
MQTTMessage Queuing Telemetry Transport
NFCNear Field Communication
PIRPassive Infra-Red
RNGRandom Number Generator
SIGSpecial Interest Group
TDMATime Division Multiple Access
WiFiWireless Fidelity

References

  1. Specification of the Bluetooth System: Covered Core Package, version 4.0; Bluetooth SIG (Hrsg.): Kirkland, WA, USA, 2010.
  2. Discover Bluetooth. Available online: https://www.bluetooth.com/what-is-bluetooth-technology/discover-bluetooth (accessed on 20 Feburary 2017).
  3. Bronzi, W.; Frank, R.; Castignani, G.; Engel, T. Bluetooth Low Energy performance and robustness analysis for Inter-Vehicular Communications. Ad Hoc Netw. 2016, 37, 76–86. [Google Scholar] [CrossRef]
  4. Xia, K.; Wang, H.; Wang, N.; Yu, W.; Zhou, T. Design of automobile intelligence control platform based on Bluetooth low energy. In Proceedings of the 2016 IEEE Region 10 Conference (TENCON), Singapore, 22–25 November 2016; pp. 2801–2805. [Google Scholar]
  5. Caballero-Gil, C.; Caballero-Gil, P.; Molina-Gil, J. Cellular Automata-Based Application for Driver Assistance in Indoor Parking Areas. Sensors 2016, 16, 1921. [Google Scholar] [CrossRef] [PubMed]
  6. Cerruela García, G.; Luque Ruiz, I.; Gómez-Nieto, M.A. State of the Art, Trends and Future of Bluetooth Low Energy, Near Field Communication and Visible Light Communication in the Development of Smart Cities. Sensors 2016, 16, 1968. [Google Scholar] [CrossRef] [PubMed]
  7. Miranda, J.; Memon, M.; Cabral, J.; Ravelo, B.; Wagner, S.R.; Pedersen, C.F.; Mathiesen, M.; Nielsen, C. Eye on Patient Care: Continuous Health Monitoring: Design and Implementation of a Wireless Platform for Healthcare Applications. IEEE Microw. Mag. 2017, 18, 83–94. [Google Scholar] [CrossRef]
  8. Del Campo, A.; Montanini, L.; Perla, D.; Gambi, E.; Spinsante, S. BLE analysis and experimental evaluation in a walking monitoring device for elderly. In Proceedings of the 2016 IEEE 27th Annual International Symposium on Personal, Indoor, and Mobile Radio Communications (PIMRC), Valencia, Spain, 4–8 September 2016; pp. 1–6. [Google Scholar]
  9. Wang, Y.; Doleschel, S.; Wunderlich, R.; Heinen, S. Evaluation of Digital Compressed Sensing for Real-Time Wireless ECG System with Bluetooth low Energy. J. Med. Syst. 2016, 40, 170. [Google Scholar] [CrossRef] [PubMed]
  10. Miao, F.; Cheng, Y.; He, Y.; He, Q.; Li, Y. A Wearable Context-Aware ECG Monitoring System Integrated with Built-in Kinematic Sensors of the Smartphone. Sensors 2015, 15, 11465–11484. [Google Scholar] [CrossRef] [PubMed]
  11. Blank, P.; Hofmann, S.; Kulessa, M.; Eskofier, B.M. miPod 2: A New Hardware Platform for Embedded Real-time Processing in Sports and Fitness Applications. In Proceedings of the 2016 ACM International Joint Conference on Pervasive and Ubiquitous Computing, Heidelberg, Germany, 12–16 September 2016; ACM: New York, NY, USA, 2016; pp. 881–884. [Google Scholar]
  12. Imani, S.; Bandodkar, A.J.; Mohan, A.M.V.; Kumar, R.; Yu, S.; Wang, J.; Mercier, P.P. A wearable chemical–electrophysiological hybrid biosensing system for real-time health and fitness monitoring. Nat. Commun. 2016, 7, 11650. [Google Scholar] [CrossRef] [PubMed]
  13. Aguilar, S.; Vidal, R.; Gomez, C. Opportunistic Sensor Data Collection with Bluetooth Low Energy. Sensors 2017, 17, 159. [Google Scholar] [CrossRef] [PubMed]
  14. Hortelano, D.; Olivares, T.; Ruiz, M.C.; Garrido-Hidalgo, C.; López, V. From Sensor Networks to Internet of Things. Bluetooth Low Energy, a Standard for This Evolution. Sensors 2017, 17, 372. [Google Scholar] [CrossRef] [PubMed]
  15. Collotta, M.; Pau, G. A Novel Energy Management Approach for Smart Homes Using Bluetooth Low Energy. IEEE J. Sel. Areas Commun. 2015, 33, 2988–2996. [Google Scholar] [CrossRef]
  16. Zhuang, Y.; Yang, J.; Li, Y.; Qi, L.; El-Sheimy, N. Smartphone-Based Indoor Localization with Bluetooth Low Energy Beacons. Sensors 2016, 16, 596. [Google Scholar] [CrossRef] [PubMed]
  17. Liu, J.; Chen, C.; Ma, Y. Modeling Neighbor Discovery in Bluetooth Low Energy Networks. IEEE Commun. Lett. 2012, 16, 1439–1441. [Google Scholar] [CrossRef]
  18. Kindt, P.; Yunge, D.; Diemer, R.; Chakraborty, S. Precise Energy Modeling for the Bluetooth Low Energy Protocol. ArXiv.org, 2014; arXiv:1403.2919. [Google Scholar]
  19. Gomez, C.; Oller, J.; Paradells, J. Overview and Evaluation of Bluetooth Low Energy: An Emerging Low-Power Wireless Technology. Sensors 2012, 12, 11734–11753. [Google Scholar] [CrossRef]
  20. Cho, K.; Park, G.; Cho, W.; Seo, J.; Han, K. Performance analysis of device discovery of Bluetooth Low Energy (BLE) networks. Comput. Commun. 2016, 81, 72–85. [Google Scholar] [CrossRef]
  21. Jeon, W.S.; Dwijaksara, M.H.; Jeong, D.G. Performance Analysis of Neighbor Discovery Process in Bluetooth Low-Energy Networks. IEEE Trans. Veh. Technol. 2017, 66, 1865–1871. [Google Scholar] [CrossRef]
  22. Østhus, P.M. Concurrent Operation of Bluetooth Low Energy and ANT Wireless Protocols with an Embedded Controller. Master’s Thesis, Norwegian University of Science and Technology, Trondheim, Norway, 2011. [Google Scholar]
  23. Campo, A.D.; Gambi, E.; Montanini, L.; Perla, D.; Raffaeli, L.; Spinsante, S. MQTT in AAL systems for home monitoring of people with dementia. In Proceedings of the 2016 IEEE 27th Annual International Symposium on Personal, Indoor, and Mobile Radio Communications (PIMRC), Valencia, Spain, 4–8 September 2016; pp. 1–6. [Google Scholar]
Figure 1. Timeline of an advertising event. It consists of three advertisements over channels 37, 38, and 39. After sending the advertisement message, the device remains on the channel for a random time up to 10 ms, listening to a connection request or a scan request for more data.
Figure 1. Timeline of an advertising event. It consists of three advertisements over channels 37, 38, and 39. After sending the advertisement message, the device remains on the channel for a random time up to 10 ms, listening to a connection request or a scan request for more data.
Sensors 17 00792 g001
Figure 2. Timeline of connection procedure. After receiving the advertisement message, the central device, that intends to connect the advertiser, waits the inter-frame time 150 µs and, then, sends the connection request packet (CONN_REQ) on the same channel. After the CONN_REQ, the central, acting now as master, and the advertiser, acting now as slave, wait for a minimum of 1 . 25 ms before continuing at a data channel.
Figure 2. Timeline of connection procedure. After receiving the advertisement message, the central device, that intends to connect the advertiser, waits the inter-frame time 150 µs and, then, sends the connection request packet (CONN_REQ) on the same channel. After the CONN_REQ, the central, acting now as master, and the advertiser, acting now as slave, wait for a minimum of 1 . 25 ms before continuing at a data channel.
Sensors 17 00792 g002
Figure 3. Timeline of the scanner-advertiser in the discovery procedure. The scanner duty-cycles transition from scanning phase to idle phase, listening to tag messages on the channel 37, 38 or 39. The tag (or advertiser) sends a burst of three packets on the three advertising channels in round-robin fashion. The advertising interval is composed of a static term T a d v , 0 and a random additive term ρ ( n ) .
Figure 3. Timeline of the scanner-advertiser in the discovery procedure. The scanner duty-cycles transition from scanning phase to idle phase, listening to tag messages on the channel 37, 38 or 39. The tag (or advertiser) sends a burst of three packets on the three advertising channels in round-robin fashion. The advertising interval is composed of a static term T a d v , 0 and a random additive term ρ ( n ) .
Sensors 17 00792 g003
Figure 4. Master scheduling of slaves. The slaves A and B have connection intervals T c i , A and T c i , B . In order to avoid connection events overlaps, the master must properly choose the initial time distance of B’s anchor point from A’s anchor point.
Figure 4. Master scheduling of slaves. The slaves A and B have connection intervals T c i , A and T c i , B . In order to avoid connection events overlaps, the master must properly choose the initial time distance of B’s anchor point from A’s anchor point.
Sensors 17 00792 g004
Figure 5. Comparison of models outcomes. The triangle-pointed line represents the mean discovery latency d ¯ m e a n obtained by the model in [18]; the solid line represents the expected discovery latency d e x p produced by Algorithm 1 for T s i = 100 ms, d s w = 25 ms, d a = 10 ms.
Figure 5. Comparison of models outcomes. The triangle-pointed line represents the mean discovery latency d ¯ m e a n obtained by the model in [18]; the solid line represents the expected discovery latency d e x p produced by Algorithm 1 for T s i = 100 ms, d s w = 25 ms, d a = 10 ms.
Sensors 17 00792 g005
Figure 6. Results of the first parameters design. The histogram depicts T c i , B and d e x p on the x- and y-axis, respectively. There are three bars per each couple of values ( T c i , B , d e x p ) : black for p s u c c = 100 % , grey for p s u c c = 80 % , white for p s u c c = 50 % .
Figure 6. Results of the first parameters design. The histogram depicts T c i , B and d e x p on the x- and y-axis, respectively. There are three bars per each couple of values ( T c i , B , d e x p ) : black for p s u c c = 100 % , grey for p s u c c = 80 % , white for p s u c c = 50 % .
Sensors 17 00792 g006
Figure 7. Results of the second parameters design. The histogram shows the advertising interval T a d v , 0 on the x-axis and the discovery latency d e x p on the y-axis. There are three bars per each couple of values ( T a d v , 0 , d e x p ) : black for p s u c c = 100 % , grey for p s u c c = 80 % , white for p s u c c = 50 % .
Figure 7. Results of the second parameters design. The histogram shows the advertising interval T a d v , 0 on the x-axis and the discovery latency d e x p on the y-axis. There are three bars per each couple of values ( T a d v , 0 , d e x p ) : black for p s u c c = 100 % , grey for p s u c c = 80 % , white for p s u c c = 50 % .
Sensors 17 00792 g007
Table 1. Effective scan window parameters. The duration d e a r l y ( c h ) and d l a t e ( c h ) are functions of c h and represent the time before the beginning (the first) and the end (the second) of the scan event, that allows the advertising event to fall within the scan window. d s w represents the effective scan window, which is shorter than d s w .
Table 1. Effective scan window parameters. The duration d e a r l y ( c h ) and d l a t e ( c h ) are functions of c h and represent the time before the beginning (the first) and the end (the second) of the scan event, that allows the advertising event to fall within the scan window. d s w represents the effective scan window, which is shorter than d s w .
Channel d early d late d sw
370 d a d s w + d a
38 d a + d c h 2 d a + d c h d s w + d a
39 2 d a + 2 d c h 3 d a + 2 d c h d s w + d a
Table 2. Current advertising event duration. It depends on c h and represents the current part of the k-th advertising event which the advertiser has already run.
Table 2. Current advertising event duration. It depends on c h and represents the current part of the k-th advertising event which the advertiser has already run.
Channel d a , e v t
37 d a
38 2 d a + d c h
39 3 d a + 2 d c h
Table 3. Scanning and Advertising configuration used for the example scenario.
Table 3. Scanning and Advertising configuration used for the example scenario.
ParameterValue [ms]
T s i 100
d s w 25
T a d v , 0 [ 20 ÷ 425 ]
Table 4. Configuration for example scenario. The Table shows the values of T s i and d s w produced by Algorithm 2 for T c i , A and T a d v , 0 equal to 100 ms and varying T c i , B in the interval [ 50 ÷ 600 ] ms with steps of 50 ms.
Table 4. Configuration for example scenario. The Table shows the values of T s i and d s w produced by Algorithm 2 for T c i , A and T a d v , 0 equal to 100 ms and varying T c i , B in the interval [ 50 ÷ 600 ] ms with steps of 50 ms.
ParameterValue [ms]
T c i , B 50.00100.00150.00200.00250.00300.00350.00400.00450.00500.00550.00600.00
T s i 50.00100.00100.00100.00100.00100.00100.00100.00100.00100.00100.00100.00
d s w , p s u c c = 100 % 29.5579.5529.5579.5529.5579.5529.5579.5529.5579.5529.5579.55
d s w , p s u c c = 80 % 29.5579.5529.5579.5579.5579.5579.5579.5579.5589.7089.7089.70
d s w , p s u c c = 50 % 39.7079.5579.5589.7089.7089.7089.7089.7089.7089.7089.7089.70

Share and Cite

MDPI and ACS Style

Del Campo, A.; Cintioni, L.; Spinsante, S.; Gambi, E. Analysis and Tools for Improved Management of Connectionless and Connection-Oriented BLE Devices Coexistence. Sensors 2017, 17, 792. https://doi.org/10.3390/s17040792

AMA Style

Del Campo A, Cintioni L, Spinsante S, Gambi E. Analysis and Tools for Improved Management of Connectionless and Connection-Oriented BLE Devices Coexistence. Sensors. 2017; 17(4):792. https://doi.org/10.3390/s17040792

Chicago/Turabian Style

Del Campo, Antonio, Lorenzo Cintioni, Susanna Spinsante, and Ennio Gambi. 2017. "Analysis and Tools for Improved Management of Connectionless and Connection-Oriented BLE Devices Coexistence" Sensors 17, no. 4: 792. https://doi.org/10.3390/s17040792

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop