Abstract
The recent advent of ambient intelligence is enabled by parallel technological advancements in sensing, context recognition, embedded systems and communications. This paper focuses on the communication issues of embedded systems, particularly the latency Quality of Service (QoS) metric and the multi-hop communications with Bluetooth standard, to examine the viability of communications of embedded systems in AmI environments and applications. Bluetooth is a worldwide radio license-free technology that enables the creation of low-power multi-hop networks interconnecting multiple devices. Bluetooth sets the procedure to establish piconets (point-to-point and point-to-multipoint links) and scatternets (multi-hop communications), and hence, Bluetooth nodes can be interconnected to form wireless networks. This paper presents research on multi-hop latency that was conducted using a custom-built test platform. Moreover, an empirical model is derived to calculate the latency over asynchronous links when links in scatternets are always active or in sniff mode. The designers of ambient intelligent devices and networks can take advantage of the model and the estimation of the delay in Bluetooth multi-hop networks presented in this paper.
Introduction
An Ambient Intelligence (AmI) system should offer an experience of quality to the user that is defined by the Quality of Service (QoS) of the network. The QoS of a communication network can be defined as a set of specific requirements that are provided by the system to the users and are necessary to achieve the required functionality of an application or service [16]. Communication networks can be classified depending on the transmission medium into wired or wireless networks. The installation costs and deployment flexibility of the wireless networks make them very attractive. However, several facts make an analysis of the performance of wireless networks very important [18]. First, the transmission medium in wireless communications is typically unreliable. Second, the use of wireless networks for constrained response time applications is increasing. Next, it is difficult to foresee the value of the communication delay because it exhibits non-negligible variability. Such variability derives, first, from the variable wait between the data delivery to the Host Controller Interface (HCI) interface and the radio transmission of these data and, second, from the random delay derived from the data retransmission whenever an error is detected in reception. Thus, latency is one of the most important metrics to define the QoS of a communication system. Hence, it is important to anticipate the latency of the data transportation network.
Several communication standards can implement wireless AmI networks [15]. Given that Bluetooth is a worldwide technology that allows for multi-hop networking with low energy consumption and no radio emission license cost, it has been chosen as one of the communication standards to build up multi-hop home networks for data transportation [27].
To perform tests to obtain the data required for developing the empirical model, a test platform based on commercially available off-the-shelf (COTS) products was developed. The platform included the implementation of several prototype nodes using Bluetooth modules. The nodes would be integrated into AmI products to provide connectivity to the digital content in the multi-hop home network. In addition, the middleware used to control the performance of the node at the HCI level of the radio module was built. The behavior of the nodes was configured using high-level commands. Thus, in the trials, the performance of Bluetooth gateways inside scatternets was analyzed when links are always active by measuring the end-to-end latency QoS metric. The trials were repeated many times, and the resulting data were analyzed statistically to limit the errors made in examining a finite set of samples.
The test platform was not only used in this research. The test platform was also the basis for deployments in the self-monitoring and health care fields [19]. In this application, the user had her/his vitals monitored by a portable device that was connected to a backbone network of access points. Problems such as the itinerancy of the mobile end-user device or the path selection to send a message to a specific user were solved by developing the appropriate routing algorithms.
However, in this research, a simple routing algorithm and network topology were considered so that the latency due to the communication tasks is not influenced by the complexity of the processing load of the routing algorithm in each node.
This paper presents an analysis and modeling of the contribution of the communication tasks of the data transportation network to the end-to-end latency in AmI environments when the Bluetooth communication standard is chosen. The analysis and model will be of benefit to the designers of AmI devices and wireless networks by providing them with a more precise estimation of the delay.
The paper is organized as follows. Section 2 presents details of the features of Bluetooth and its relationship with AmI environments. Section 3 provides details of the motivation of this research and the related work. The features of the test platform are presented in Section 4. Next, Section 5 describes the methodology of the tests. Section 6 provides the results of the tests, and a discussion of the results is presented in Section 7. Finally, the conclusions are presented in Section 8.
Intelligent environments
Intelligent environments can be found wherever the surroundings are able to recognize people, personalize to individual preferences, or even act on behalf of people [2,4]. More specifically, AmI refers to electronic systems that are sensitive and responsive to the presence of people [3]. Devices for personal healthcare or domestic appliances (such as lighting, vision, or sound appliances) are usually included in this paradigm to collaborate with one another.
AmI can take advantage of a large quantity of technological breakthroughs, such as content creation tools, ambient database systems, conversational interfaces, vision algorithms, ubiquitous communication technologies, wearable electronics, or wireless sensor systems [3]. Any AmI environment should provide the features of being embedded, adaptive, or anticipatory [1] and even the features of being sensitive, responsive, transparent, or ubiquitous [15].
Wireless AmI systems. Case study
This research considers the practical scenario of multi-hop network deployment for an AmI environment represented in Fig. 1. The network is composed of several wireless access nodes (AN i ) and many sensor nodes (SN ij ). The access nodes are deployed along a corridor to provide wireless network connectivity to the sensor nodes installed inside the rooms or carried by the users. The diagram represents only a part of a network deployment in a floor of a home for the elderly. Buildings that include homes for the elderly are usually not newly constructed houses, so the work required to install the access nodes of the network is annoying, complex, and even risky; these are some of the reasons to deploy a wireless network of access nodes instead of considering the wired solution. In addition, the costs of deploying a wireless network are much lower than the costs of the wired approach. Thus, the wireless network is deployed wherever the access nodes cannot be wired due to budget restrictions or other issues.
Furthermore, this deployment could also occur in hotels, hostels, student residences, foster homes, assisted living homes, or any other similar buildings. The scheme in Fig. 1 could also represent a corridor in any floor of these buildings. In such a deployment, the rooms would include some environmental sensors, for example, fire alarms or temperature sensors for the centralized air-conditioner system. These sensors would send measured data to a centralized data sink, where alarms and control commands would be generated after the processing of the data.

Example of multi-hop network deployment for the AmI environment inside a home for the elderly.
Overall, the devices in AmI environments are interconnected and form a network. Consequently, a communication standard must provide connectivity to AmI devices. Bluetooth [7] is a communication standard that satisfies these requirements.
The basis of Bluetooth networking capability is the piconet, the smallest network that can be achieved. When two or more Bluetooth systems share a radio channel, they form centralized networks called piconets. Piconets include a central node (master), which controls the communications, and up to seven active nodes (slaves). Figure 1 shows some piconets, such as the one shadowed in the middle part of the figure, where the access node AN
i
is the master and the access node
The Bluetooth standard encompasses the notion of a more complex network, i.e., the scatternet, but it does not specify how it has to be formed. A scatternet is helpful to extend the coverage area of Bluetooth devices as well as to increase the number of active nodes in a specific area. A Bluetooth device can play the role of slave in different piconets but can also be the master in at most one piconet. The interconnection of piconets is possible only if some nodes are gateways and operate in two or more piconets.
According to the roles that the nodes play in the piconets in which they participate, two types of gateways are defined: master-slave and slave-slave. The master-slave gateway offers less delay from end to end for inter-piconet traffic, i.e., the traffic that occurs between two adjacent piconets [31]. In many AmI applications, data usually go from a slave to any other node except those in the same piconet; thus, the main traffic in these network applications is the inter-piconet traffic. As a result, the master-slave gateway type was considered. The access nodes in Fig. 2 are some master-slave gateways interconnected in string topology. These gateways relay the data gathered from the sensors carried by the monitored users and the sensors in the rooms. The data are aggregated in the data sink (not depicted). There are many types of sensors attached to electronic devices with Bluetooth connectivity. For example, the environmental sensors in the room detect the presence of people, the temperature, or the presence of smoke, and the user-carried sensors measure the body temperature or vital signs of the user.

Example of interconnection of piconets through master-slave gateways to form a scatternet.
On the other hand, the information between Bluetooth nodes can be transmitted synchronous and asynchronously. The Synchronous Connection-Oriented (SCO) link is used for voice communications in real time inside a piconet. The Asynchronous Connectionless Link (ACL) is required when the designers prioritize the integrity of delivery of data, so the received data are retransmitted whenever they contain errors. Then, as multi-hop communications can only occur asynchronously, this research considers ACL links.
However, even if the data are transmitted asynchronously in multi-hop communications, every slave must be synchronized with the master of the piconet so that hops occur simultaneously from one frequency to another during the communication. The fact is that Bluetooth uses frequency hopping spread spectrum signal modulation (FHSS) to increase the robustness of the signal to interference, as it must cope with many unpredictable sources of interference. Bluetooth devices are likely to experience interference from other sources of transmission while working in the Industrial, Scientific and Medical (ISM) radio spectrum frequency band, which is a license-free band. The synchronism in each piconet is obtained by adding an offset to the native clock of the slave, so that it equals to the native clock of the master and follows its hops.
Moreover, the data are transmitted under the time division duplex (TDD) scheme. The channel is divided into intervals of 625 µs, called slots, where a different hop frequency is used for each slot. Subsequent frames, i.e., one, three, or five subsequent slots, are alternately used for transmitting and receiving, and they may use Forward Error Correction (FEC) scheme to control errors in the transmission of data.
The TDD scheme includes a central polling scheme to eliminate collisions among the transmissions of data from the slave devices. The master in each piconet manages the time slots, so the slave is only allowed to send data in the slave-to-master slot when it has been addressed in the preceding master-to-slave slot. Even if there are no data to transfer to the slave, the master node periodically polls the slave nodes in the piconet, every Tpoll interval.
When operating in a scatternet, each master-slave gateway node has at least two open links: 1) a link in which it acts as a master and uses its native clock to determine the frequency hops and 2) another link in which it acts as a slave and follows, due to the offset, the hops determined by the native clock of the master node of that link. Figure 3 shows a gateway access node (AN
i
) participating in two piconets. Piconet i consists of AN
i
node as master M(i), and SNi1, SNi2 and Synchronization between the native clocks of two piconets.
When two nodes establish a link, they synchronize their clocks. In addition, they negotiate the moments of activity in the piconet and the intervals in which each slave will be listening. In this manner, a node can take advantage of the intervals of inactivity in the piconet, where it has the role of slave, to attend to the other piconet, where it has the role of master, ensuring that it can attend to both of the links. The master node can also abandon the piconet during the period of no activity and move to being slave in the other piconet. In this case, it has to add an offset (positive or negative) to its native clock to synchronize with the master of that piconet. If a node in a piconet becomes aware of the absence of the other node, it closes the link. The node must reestablish the link later, when it sends information to the other node. As a result, a piconet change involves a resynchronization in the clock of the gateway node, so the latency is increased.
On the other hand, the standard [7] defines the states in which the links of the radio modules can be found. The links can be active or in one of the low-power modes, i.e., in sniff, park, or hold mode. When the node with the role of slave operates in sniff mode, its periods of absence in the piconet are configured such that the slave node agrees with the master to periodically listen to its transmissions. The sniff low-power mode is configured at the HCI level and is defined by some parameters: Tsniff, Nsniff_attempt and Nsniff_timeout. A device in sniff mode listens to incoming data periodically with an interval of Tsniff and with the duration specified by the other two parameters. Nsniff_attempt defines the amount of receive timeslots the device will listen to, and Nsniff_timeout describes how many receive timeslots it will listen to after the latest received packet. The sniff mode parameters cannot be altered while in sniff mode. Furthermore, while the links are in one of the low-power modes, the Bluetooth device can be performing other radio tasks. Thus, the sniff mode appears to be suitable for AmI applications. This paper focuses on sniff link power mode applied to AmI environments and compares it with the active power mode.
Some performance differences among the releases of the Bluetooth standard [43] exist. For example, the delay values in a piconet communication are much smaller in the results obtained using the Bluetooth 2.0 [7] module compared with those obtained using the Bluetooth 1.1 [9] module. The main changes that Bluetooth 2.0 brought to the state of the art in relation to Bluetooth 1.1 focused on improving the data transmission rate between nodes. However, the last release of the standard did not significantly change the data transmission procedure. Bluetooth 4.1 [8] is not compatible with earlier versions. Bluetooth 4.1 has an entirely new protocol stack, enhances the energy management (providing an even lower power consumption of nodes), and constitutes a single-hop solution. Thus, though it is not the last release of the standard, Bluetooth 2.0 remains on the cutting edge of the technology in terms of scatternet transmission time performance. Furthermore, there is a considerable amount of literature regarding point-to-point transmission using the Bluetooth standard; however, the literature features a gap relative to the analysis of the latency in multi-hop networks.
Even if there are still open issues [25,29], it is possible to create scatternets with Bluetooth. This type of multi-hop network can manage more than seven active nodes at the same time as well as cover a greater area, such as those indoor areas that include the entire floor or some levels of a building, where the signal is usually absorbed by many undesired obstacles. Bluetooth is a worldwide standard that shares the spectrum with other sources of radiation and is therefore robust against interferences. Although data packets are usually small, the data transmission is highly flexible because it can transmit data grouped in several packet sizes. Bluetooth devices can operate in low-power modes and can interact with mobiles and computers to perform user functions and the tasks of configuration and maintenance of the network. Overall, this research not only proves the viability of Bluetooth multi-hop networks for AmI applications but also analyzes the influence of the radio-link mode of operation on the delay of the multi-hop communication.
As a consequence of the research effort on applications of the Bluetooth standard, considerable literature in this area is already available. Such literature is focused on the analysis of different aspects of Bluetooth networking, such as the scatternets formation procedure [42,44] or the routing of data along scatternets [5]. Moreover, because efficient communication in Bluetooth scatternets requires the design of intra- and inter-piconet scheduling algorithms, many algorithms have been proposed [35,45,47]. However, numerous electronics manufacturers, such as the one selected to provide equipment for the test platform, implement simple scheduling policies in their COTS products, such as the Round Robin scheduling policy [40]. Moreover, Bluetooth has been already included in the data transportation networks of many proposals for AmI systems [24], of which some focused on security issues [21] and others focused on the power consumption of the network [39].
The performance of scatternets is usually evaluated using metrics. The metrics can be traffic dependent or traffic independent [44]. Traffic-dependent measures require the specification of the traffic profile, definition of the source and destination of packets, and consideration of the packet flows. These requirements make evaluation difficult using traffic-dependent measures. Thus, traffic-independent performance measures are frequently used, such as the bit error rate (BER), the throughput, and the latency. These measures have been analyzed and modeled by several authors. For example, Roh [41] evaluated the impacts of impulsive noise, co-channel interference due to other piconets, and Nakagami fading on the bit error rate (BER) and throughput performance in scatternets. In addition, Zanella [46] provided a mathematical model for the analysis of the performance of a Bluetooth data link, i.e., a piconet, in terms of goodput, delay, energy efficiency and system lifetime. However, neither analysis was validated in a hardware test platform that approximates real world experience; this limitation is addressed in this research.
In the same way, the latency in Bluetooth network communications was studied in both piconets and scatternets. The studies were performed at different levels of approach, i.e., analytical, simulation based, or empirical. Some of them were analytical approaches to describe the performance of piconets that were validated using simulation engines [14,32,38,46,48], which are far removed from the research on scatternets and the real world that are described in this paper.
Some empirical research on latency in scatternets has already been performed [13] by measuring the delay in master-to-slave and slave-to-master communications in a three-node scatternet formed by two master nodes (terminal nodes) and a slave-slave gateway; the authors indicated that master-to-slave and slave-to-master communications involve different latency values. Nonetheless a more realistic scenario should include more hops in the network.
There is, however, some research on the practicality of Bluetooth networks in real-world deployments. The viability of the use of Bluetooth within both hard and soft real-time control systems was analyzed in [14]. The Bluetooth protocols were found to have significant potential to support deterministic behavior, i.e., real-time, asynchronous communication.
Designers of real-world applications require models of the main wireless network metrics to set the range of applications of Bluetooth networks. The latency is one of these metrics. A few models on latency in Bluetooth networks have already been obtained both analytically and empirically.
Some authors have studied and modeled several issues regarding piconets, such as the performance under bursty traffic and finite buffer sizes [33], the scheduling policies [30], the end-to-end packet delay [34], and the throughput at the L2CAP level [23]. These works obtained analytical expressions for piconet communication and validated them via simulation engines, which remain far from this empirical research on scatternets.
A few authors have suggested theoretical models and validated them empirically in actual hardware platforms. For example, the transmission delay in asynchronous (ACL) traffic in Bluetooth piconets was analyzed in [37]. There was another proposal of a theoretical model for piconet communications that included the impact of the overhead and the segmentation imposed by the protocols in the transmission process in addition to the waiting time due to the polling process in the piconet [36]. The model was empirically validated on an actual Bluetooth piconet. In addition, an analytical model to compute the minimum delay of Bluetooth 2.0 transmissions optimized for connections using the serial port profile was empirically evaluated in a real piconet in [28]. Moreover, empirical equations to define the file transfer delay (FTD) in a piconet were introduced without theoretical support in [22]. The FTD included the packet’s time delay, encapsulation/de-encapsulation delay, signal propagation delay and retransmission delay. The hardware test platform included a piconet composed of two computers plus USB dongles.
In summary, the performance of Bluetooth networks has already been widely studied when only one hop is considered, i.e., when the Bluetooth nodes form a piconet. However, when gateway nodes are included, scatternets are established, and the effect of the transition of the gateway from one piconet to another must be considered. This effect is not negligible, and as discussed below, it is important in the end-to-end latency in scatternets.
Furthermore, the real-world issues (e.g., the unreliability of the transmission medium in wireless communications) are difficult to consider in both theoretical calculations and simulation engines. As a result, models are necessary to include these issues in the performance studies [26], and they should rest on an empirical basis to be close as possible to the real world performance. Thus, because Bluetooth does not support synchronous links in scatternets, an empirical model for the latency in scatternets with ACL links is required.
Test platform
Some proprietary nodes based on this technology were developed to analyze the delay time in Bluetooth multi-hop communications. Next, the test platform was deployed.
The wireless nodes were based on Bluegiga’s [6] Bluetooth 2.0 modules, more specifically, the WT-11 chipset, which included Bluecore 04 of Cambridge Silicon Radio (CSR) [10]. The nodes were built with the radio module in addition to various general-purpose input and output components and test pins. Figure 4 shows one of the implemented nodes. Proprietary firmware was designed using BlueLab [11], the tool for developing embedded software offered by CSR, to program the nodes at the HCI level. HCI is the lowest level that the firmware can access in the Bluetooth protocol stack. The processing tasks were built-in in the firmware. These tasks were limited to the most basic operations and included processes for the data packets to initialize the communications, to route data to other nodes and to present the operation state through the test pins.
Photograph of one of the implemented Bluetooth nodes, in which the WT-11 radio module from Bluegiga is shown.
The test platform consisted of several nodes (of the type shown in Fig. 4) that were interconnected to form a wireless multi-hop network. The nodes were positioned in the most realistic scenario available, as shown in Fig. 5. Each pair of nodes created a piconet, so the multi-hop network exhibited a string topology. Furthermore, the test platform was deployed indoors, and the mains were easily accessible to the nodes. A battery was added to the nodes to recover from failures in the mains. Because the energy consumption of the network was outside the scope of this research, the functions to configure the nodes in the low-power modes were excluded, so no additional middleware for energy management was included in the nodes.
Representation of the test platform.
In the tests, the distances among nodes are not constant. Hence, before performing any latency analysis in the test platform, the distance was verified to have no meaningful influence in the latency of the end-to-end communication. Specifically, the medium range distances, i.e., up to 25 meters, that were considered in the following tests were checked. The good channel quality led to a reading of the Receiving Signal Strength Indicator (RSSI) equal to zero for most of the cases, i.e., the received signal strength in the link was within the Golden Receive Power Range. This power range for the receiving node is usually approximately 20 dBm wide. For the other cases, the RSSI readings were up to 15 dBm below the Golden Range. However, the latency did not exhibit significant variations.
Subsequently, the methodology used to analyze the gateways in scatternets described in [20] was applied to analyze the behavior of the Bluetooth master-slave gateways in scatternets. Thus, the test platform consisted of the interconnection of a variable number of wireless nodes. The nodes were arranged in string-shaped indoor communications network. Even if the network topology considered is one of the simplest topologies, it is the best topology to study the behavior of the Bluetooth gateway nodes when they change from one piconet to another. The nodes were configured as masters of the piconet formed with the next node and as slaves with the previous node, i.e., they were configured as master-slave gateways. Moreover, a laptop connected to the first and the last nodes of the network simplified the monitoring process.
Figure 6 shows the scheme of interconnection of nodes for the analysis of the latency of the network from end-to-end. The network tester functionality sent ping type data packets to the last node of the wireless test network. The halfway nodes included in the test platform received the data packets, processed them, and then resent them towards the addressed node. The addressed node emulation functionality of the computer received the ping packet, logged the moment of reception, and then sent the answer packet while logging the moment of transmission. The answer consisted of a pingback type data packet. Both packets, the ping and pingback packets, fit in a time slot defined in the Bluetooth standard. Next, the pingback packet flowed along the network, going from the slaves to the masters of the piconets. Finally, the packet reached the computer connected to the first node of the string. The data sink functionality included in the computer logged the moment of reception of the pingback packet. The differences between the logs in both ends of the network determined the latency for both cases: the ping data packets (master-to-slave communication) and the pingback data packets (slave-to-master communication).
Interconnection scheme for the nodes in the methodology for the analysis of the latency (δ) of the network from end-to-end for the case of three hops.
Hence, each ping packet passed through the network to the destination node, and subsequently, the pingback packet returned to the source node of the ping packet. Therefore, the ping packets were randomly sent after the pingback returned from the destination node. Thus, the sending interval was determined by the latency of the network, which was not constant and exhibited some deviation in the tests.
All of the functionalities previously mentioned, i.e., the network tester, the data sink and the addressed node emulation, were synchronized because they shared the computer. Thus, the time that the data packets required to go from the master to the slave nodes while hopping through several piconets can be measured and the time required to go from the slave to the master nodes.
However, because a series of external factors that may influence the Bluetooth communication will also appear in a real deployment, they have been considered and controlled in the tests. These factors include the presence of other equipment that occupies the same frequency spectrum, the resolution of the instrumentation and the operating system in the computer (because the computer runs more processes than the monitoring ones).
The latency in the communications of Bluetooth multi-hop networks was analyzed. The previously explained methodology was considered to measure the time required for the ping type data packets to go from the first to the last node and the time required for the pingback data packets to return. Moreover, the number of hops (N) in the network was changed, and the time that each hop added was calculated. Two link policy cases were considered: the active mode and the sniff low power mode. In the second case, several periods of inactivity (Tsniff) were tested while the parameter Nsniff_attempt was set to one slot and Nsniff_timeout to eight slots.
The average values of the results of the latency tests for the active power mode are compiled in Table 1, where the confidence intervals and the standard deviation of the tests are also included. Table 2 summarizes the results for the sniff power mode, where the inactivity period (Tsniff) is also included.
Average values, confidence intervals and standard deviation of the results of the latency tests for the active power mode. Time is expressed in seconds
Average values, confidence intervals and standard deviation of the results of the latency tests for the active power mode. Time is expressed in seconds
Average values, confidence intervals and standard deviation of the results of the latency tests for the sniff power mode. Time is expressed in seconds
The graphical representation of the average values in Table 1 is shown in Fig. 7. The figure indicates that the communication from master to slave (ping packets, Tup) is faster than the communication from slave to master (pingback packets, Tdown). This fact is derived from the TDD scheme managed by the master node.
Average values of the end-to-end latency (time is expressed in seconds) for the ping (Tup) and pingback (Tdown) type data packets when the links are always active vs. the number of hops.
The results in Fig. 7 reveal that the latency from end-to-end in a Bluetooth multi-hop wireless communication system exhibits a slightly quadratic dependence with the number of hops when the links are always active. This phenomenon occurs both in the master-to-slave communication and in the slave-to-master communication.
There are many reasons that increase the latency and may be expected from theoretical calculations. For instance, gateway nodes with active links in a pair of piconets attend to them alternately. If one of the slave nodes in Piconet(i) in Fig. 3, i.e. nodes ANi−1, SNi1 or SNi2, tries to send data to the gateway node AN i when the gateway is busy attending to the link in Piconet(i+1), the node (ANi−1, SNi1 or SNi2) must wait and retry later the data delivery. However, when the links in the scatternet are in sniff mode, the nodes reach the next node towards the destination of the message when they previously negotiated, so that no additional delay happens in the data transfer.
Besides, the radio communications in the ISM band must cope with interferences and their effect might not be negligible. In this research, when the links in the scatternet are in sniff mode, the main sources of interference are other nearby active Wi-Fi devices, which are moved away or switched off when possible. On the contrary, when the links in the scatternet are active, the main sources of interference are not only other nearby active Wi-Fi devices but also nearby active Bluetooth devices. Then, the probability of retransmission, and hence the latency, increases as there are more interfering devices active.
The results of the latency tests when links are in the sniff low-power mode are represented graphically in Fig. 8, which shows the average values summarized in Table 2 for the periods of inactivity (Tsniff) considered in the tests, i.e., 0.1 s, 0.5 s, 1 s and 2 s.
Average values of the latency (time is expressed in seconds) for the ping (Tup) and pingback (Tdown) type data packets when the links are always in sniff mode vs. the number of hops.
The results in Fig. 8 reveal that the end-to-end latency in a Bluetooth multi-hop network exhibits a linear dependence with the number of hops when the links are in sniff mode. This behavior occurs both in the master-to-slave communications (ping packets, Tup) and in the slave-to-master communications (pingback packets, Tdown). In addition, there is no significant difference between the latency of the ping and the pingback data packets in each case of the inactivity period, different from the case of working with active links.
When the links in a piconet are in sniff mode, the periods of absence in the piconet of each node are configured. Thus, the slave node periodically listens to the transmissions of the master node.
In summary, Figs 7 and 8 show that any increase in the period of inactivity increases the global delay in the communications with a linear relationship versus the number of hops for the sniff mode and a quadratic relationship versus the number of hops for the active mode. In fact, the shortest delay was not obtained in the active mode but in an aggressive sniff mode, i.e., the sniff mode with a period of 100 ms. Thus, the greater probability of having interferences while working in active mode makes the active power mode slower than the aggressive sniff modes, regardless of the number of hops that the communication requires.
The models introduced in this section describe the latency in Bluetooth networks. The following equations model the performance of the multi-hop network in the test platform and anticipate the latency in Bluetooth networks of string topology.
As a rule, each hop can be divided into communication and data processing time. In the tests, the first hop was found to only include the communication time (tC1), i.e., there was no processing in the first hop. In contrast, the subsequent hops included not only tC1 but also the processing time.
Figure 7 indicates that the latency when links are always active exhibits a quadratic dependence with the number of hops in the communication. Thus, the end-to-end latency can be defined as in Eq. (1), which includes the number of hops (N), the minimum hop latency (
Figure 8 shows a linear dependence of the latency with the number of hops and the inactivity period when links are always in sniff mode. Thus, the end-to-end latency in a Bluetooth multi-hop communication network can be defined as in Eq. (2), where no extra latency addition occurs in each hop. Equation (2) considers the number of hops (N), the minimum hop latency (
The values for the coefficients in Eqs (1) and (2), were calculated using linear regression to define the curve that best fits to a series of data points, i.e., the results of the measures summarized in Figs 7 and 8. The regression analysis [17] estimates the conditional expectation of the dependent variable (δsniff) given the independent variables (N, Tsniff, Nsniff_attempt, Nsniff_timeout, …).
The performance of master-to-slave communications when the links are always active can be modeled using Eq. (1) and the coefficients in Table 3. In the same way, the performance of the communications from master to slave when the links are always in sniff mode can be modeled using Eq. (2) and the coefficients summarized in Table 4.
Coefficients of the model to define the latency when the links are always active (δUP(ACTIVE) and δDOWN(ACTIVE)). Time is expressed in milliseconds
Coefficients of the model to define the latency when the links are always active (δUP(ACTIVE) and δDOWN(ACTIVE)). Time is expressed in milliseconds
Coefficients of the model to define the latency when the links are always in sniff mode (δUP(SNIFF) and δDOWN(SNIFF)). Time is expressed in milliseconds
After obtaining the values of the coefficients of Eqs (1) and (2), the models for the cases when working with active links and with links in sniff mode were validated using the
The value of
In addition, to observe graphically the quality of the equations of the model, Fig. 9 shows the master-to-slave data traffic model (line) and the measures obtained in the test platform (dots). In a similar way, Fig. 10 shows the slave-to-master data traffic model and the measures.
The value of

Graphic validation of the model (line) for δUP(ACTIVE) and the measures (dots) obtained in the tests platform. [X-axis: number of hops; Y-axis: latency expressed in milliseconds].

Graphic validation of the model (line) for δDOWN(ACTIVE) and the measures (dots) obtained in the tests platform. [X-axis: number of hops; Y-axis: latency expressed in milliseconds].
The graphic validation of the model for the sniff mode can be observed in Figs 11 and 12. Figure 11 is a multi-diagram figure that shows the master-to-slave data traffic model (line) and the measures obtained in the test platform (dots). Similarly, Fig. 12, which is also multi-diagram, shows the slave-to-master traffic model and the measures.
Graphic validation of the model (line) for δUP(SNIFF) and the measures (dots) obtained in the tests platform. a) Tsniff = 0.1 s; b) Tsniff = 0.5 s; c) Tsniff = 1.0 s; d) Tsniff = 2.0 s. [X-axis: number of hops; Y-axis: latency expressed in milliseconds]. Graphic validation of the model (line) for δDOWN(SNIFF) and the measures (dots) obtained in the tests platform. a) Tsniff = 0.1 s; b) Tsniff = 0.5 s; c) Tsniff = 1.0 s; d) Tsniff = 2.0 s. [X-axis: number of hops; Y-axis: latency expressed in milliseconds].

A comparison of the equations that model the latency for both cases in the active links mode, the master-to-slave communication (up) and the slave-to-master communication (down) reveals that tC1a increases to 58 ms when the communication is started by the slave node and the data packets go from the slave to the master node. When the communication is started by the master node, the value of tC1a, the communication time for the first hop when the link is active, is 26 ms. The difference is related to the average waiting time of the slave node to establish the communication, which is a consequence of the polling intervals (Tpoll) of the master nodes inside their piconets, i.e., 40 Bluetooth slots or 25 ms.
In the same way, the minimum hop latency (
Furthermore, the empirical model states that the latency addition in each hop (
In comparing the equations that model the latency for both cases in the sniff mode (upwards and downwards), tC1s, the communication time for the first hop, is found to increase 12.5 ms when the communication is started by the slave node and the data packets go from the slave to the master node. When the communication is started by the master node, the value of tC1s is practically 50% of Tsniff because the data packets fit in one slot and both nodes must wait until they awaken. The difference between the values of tC1s for the up and down cases is the 50% of the average waiting time of the slave to establish the communication, i.e., Tpoll. Similarly,
Moreover, the empirical model states that the ratio of the inactivity period affecting the latency (α) is nearly 50% because it is the average value of the Gaussian distribution of the random waiting time for the end of the inactivity intervals.
The designers of ambient intelligent devices and networks can take advantage of the model and the estimation of the delay in Bluetooth multi-hop networks presented in this paper. For instance, if they consider the application represented in the scheme in Fig. 13, they would deploy the gateway nodes forming a Bluetooth six-hop network to cover an indoor area of

Disposition of the nodes in the example of application of the models for the latency in multi-hop communications with Bluetooth gateway devices.
In addition, if there are no power restrictions and it is possible to connect the nodes to the mains, they can consider having the links of the network always active. In this case, taking into account Eq. (1) and Table 3, the response time is about 1 s, and below 1.5 s for each one of the directions of the communication (master-to-slave and slave-to-master). In case the data processing in the end node has more complexity than in the tests in this research, i.e. the minimum complexity to route the data packets, this additional delay has to be considered and limited to less than 7 s.
However, if there are power restrictions in the network, they can consider the sniff low power mode of Bluetooth. Depending on the inactivity period of the nodes, the power saving of the nodes would be greater and, therefore, the lifetime of the nodes. Then, taking into account Eq. (2) and Table 4, the requirement of the response time of the system limits the inactivity period of the nodes to 1 s, so that the communication delay in the network is below 4 s for both directions of the communication. This way, there are more than 2 s left for some extra processing of data in the end node and to deal with some other eventuality in the communication.
AmI environments usually include interconnected devices that form a network. Therefore, a communication standard must provide connectivity to the AmI devices. Bluetooth is a communication standard that satisfies these requirements. Bluetooth is a worldwide technology with no radio emission license cost that provides the creation of low power multi-hop networks.
Multi-hop networking is helpful to extend the coverage area of wireless devices as well as to increase the number of active nodes in a specific area. One of the main problems in multi-hop networks is the latency in data transmission. The latency depends on many factors. This paper studies the dependence on the main ones, i.e., the number of hops, the power mode of the nodes and the operations to be performed at each node.
A test platform was established to perform the study, and the equations that define the latency when the wireless links of the multi-hop network are active were extracted from the tests. In addition, the equations that define the latency when the wireless links of the network are in sniff mode were also extracted. Additionally, the effect on the latency of the inactivity period when links are in sniff mode (Tsniff) was studied in this paper, as well as the difference in latency between the upward and downward data traffic.
This paper sets the mathematical expression to predict the latency in scatternets over ACL links when the links are active or in sniff mode. This empirical model represents the first approach to model the performance of Bluetooth multi-hop wireless networks in terms of latency. The model sets the basis for future approaches, where more complexity to the processing stage of the nodes would be added. Furthermore, these approaches could be placed in more complex scenarios. This model is of benefit to the designers of AmI devices and wireless networks because it provides them a more precise estimation of the delay that every hop of the communication adds, for example, when setting a network of access points for AmI environment in homes for the elderly, hotels, hostels, student residences, foster homes, assisted livings, or any other similar buildings.
AmI electronic systems are usually embedded, adaptive, anticipatory, sensitive and responsive to the presence of people, so that the technology becomes non-obtrusively integrated into environments. Because the Bluetooth standard was initially focused on substituting for cables of electronic devices, it provides AmI products with the capability of interconnection via a low latency connection to a computer using multi-hop networks.
Finally, although energy management is beyond the scope of this research, future work includes the use of devices of the very last release of Bluetooth standard to provide a model that extends the topology (mesh), the scenario of applicability of the network (outside a house), and the lifetime of the batteries in the devices. In addition, other Bluetooth low power modes can be considered.
Footnotes
Acknowledgement
The research described in this paper was financially supported by the Basque Government (ETORTEK, AIRHEM III).
