Networking solutions for connecting bluetooth low energy devices - a comparison

. The Bluetooth Low Energy (BLE) is an attractive solution for implementing low-cost, low power consumption, short-range wireless transmission technology and high flexibility wireless products,which working on standard coin-cell batteries for years. The original design of BLE is restricted to star topology networking, which limits network coverage and scalability. In contrast, other competing technologies like Wi-Fi and ZigBee overcome those constraints by supporting different topologies such as the tree and mesh network topologies. This paper presents a part of the researchers' efforts in designing solutions to enable BLE mesh networks and implements a tree network topology which is not supported in the standard BLE specifications. In addition, it discusses the advantages and drawbacks of the existing BLE network solutions. During analyzing the existing solutions, we highlight currently open issues such as flooding-based and routing-based solutions to allow end-to-end data transmission in a BLE mesh network and connecting BLE devices to the internet to support the Internet of Things (IoT). The approach proposed in this paper combines the default BLE star topology with the flooding based mesh topology to create a new hybrid network topology. The proposed approach can extend the network coverage without using any routing protocol.


Introduction
Wireless sensor networks (WSNs) are a group of connected sensors used for collecting, recording and monitoring the physical parameters of the environment and sending the collected data to a central device. As Examples of the environmental conditions that can be measured using the WSNs are a person's heart rate, pollution levels, sounds, temperature, humidity, bicycle's tire pressure, wind and so on. Wireless sensor networks can be configured using several wireless technologies such as ANT, ZigBee, Nike+, Classic Bluetooth, Bluetooth Low Energy and other wireless technologies. The different aspects of those wireless technologies have been compared and evaluated in [1]. To implement a tree topology, three different nodes are designed: the root node, the intermediate node and the leaf node. In a mesh topology, devices communicate locally to form Pico-nets comprising of devices in master and slave roles. The Pico-nets connect via common devices and form a scatter-net [2].One of the main advantages of tree topology is its simplicity, but sending data directly to the other nodes on the same level of the tree is an impossible task, on the other hand, the main advantage of mesh topology is its ability in increasing the coverage area but mesh topology is very complex structure [3].
An important issue of research in wireless networks is to dynamically organize the nodes into a wireless network and route the data from the source to the destination. The former BLE based networks do not perform routing, but its devices broadcast packets through the network over BLE advertising channels which is called flooding techniques [4].
This paper presents different existing techniques for configuring BLE tree and BLE mesh networks. We provide taxonomy for BLE network solutions, whereby we have divided the identified solutions into two main categories, namely: tree network solutions and mesh network solutions. This paper has considered and analyzed some of recent existing BLE trees and mesh network proposals to the best of our knowledge.
In this paper, we propose a new approach based on merging the default Bluetooth Low Energy "BLE" star topology with the flooding based mesh topology. The new hybrid network topology makes use of the simplicity of creating BLE star topology with the power of broadcasting messages using the flooding based mesh topology without any routing technique. The last section of this paper discusses the importance of connecting BLE devices to the Internet to support the Internet of Things IoT networks and its products. This paper is organized as follows. Section II, an overview of Bluetooth Low Energy is presented, while section III explores the BLE based tree topology networks. Section IV discusses the BLE based mesh topology networks. In section V, a new hybrid network approach is proposed. Section VI discusses an IoT based system using BLE devices. Finally, section VII has the conclusions and possible future works.

Bluetooth Low Energy Overview
Bluetooth specifications can be classified into two main standard protocols, namely, classic Bluetooth and low-Energy (BLE) Bluetooth, also marketed as Bluetooth Smart. The classic Bluetooth, with its revised versions of the original Bluetooth standard, provide data rates up to 3 Mbps. Unlike classic Bluetooth, the BLE is targeted to enable a short range wireless communication with an emphasis on low-data rate energy constrained applications. In addition to low-power, the aim of BLE is to enable the design of low-cost and less complex radio transceivers for both cost and resources (i.e. Memory) sensitive applications [5].
The term of Bluetooth Low Energy (BLE) has been defined for the first time in 2010 by SIG (Bluetooth Special Interest Group)as a part of Bluetooth 4.0specification [6], since then, subsequently Bluetooth versions have been published such as, Bluetooth 4.1, Bluetooth 4.2, and Bluetooth 5.0 [7,8,9]. The following sections will describe the BLE's protocol stack and the main features of the BLE versions which have already been mentioned, emphasizing the support aspects related to different network topologies.
The classic Bluetooth and BLE have similar protocol stacks, where the Bluetooth Low Energy consists of two main components, the Controller and the Host as shown in Figure 1. The two components can reside on the same physical device or on different devices. The Controller is the logical entity that is responsible for the physical layer and the link layer, which performs the radio interference related tasks, while the Host implements the functionalities of the upper layers and support applications [10]. The physical layer Controls radio transmission/receiving where at The Physical layer, The BLE defines 40 Radio Frequency (RF) channels in the 2.4 GHz Industrial Scientific Medical (ISM) band. Three of them, the advertising channels, are assigned specifically for advertising and discovery services. The remaining 37 data channels are intended for bidirectional exchange of data between devices. Adaptive frequency hopping method is also used over data channels to minimize interference from other technologies (Bluetooth® and Wireless LAN) in the 2.4 GHz ISM Band. The data transmission rate is 1 Mbit/s [10].
The Link Layer is a hardware-firmware coimplementation. It's responsible for a variety of tasks such as managing the physical BLE connections between devices, defining packet structure, supporting all Link Layer states such as Advertising, Scanning, Initiating, and Connecting Master and Slave, figure. 2, in addition, providing link layer-level encryption [11]. L2CAP layer "Logical Link Control and Adaption Layer Protocol" works as an interface between the Host and Controller. It provides connection-oriented and connection-less data services to the upper layer protocols using segmentation, multiplexing and reassembly capabilities [11]. As we mentioned above, the Bluetooth Low Energy standard is limited to point-to-point simple one-level star topology, the problem with this topology is its lack of ability to extend the network's range. In the case of a star topology, the center node is the master and the nodes around it are slaves, figure. 3. The slave nodes can't communicate with each other directly, so the master can maintain multiple connections, while the slaves can't have more than one connection at a time [13]. Bluetooth 4.0 prevents a slave node from participating in multiple connections simultaneously with other masters. Thus, the star topology is the only allowed network topology in a BLE network based on the Bluetooth 4.0 specification [6].
The Bluetooth 4.1 specification was released in 2013. Bluetooth 4.1 has a fundamental change with regard to BLE mesh network support; a slave node is allowed to be simultaneously connected to more than one master device, regardless of its Link Layer role. It can run multiple Link Layer instances simultaneously without limitation. In addition, one device can act as a slave node at certain intervals and as a master node at others, keeping parallel communications with its neighbors. Those specifications opened the door for creating extended network topologies such as the mesh network topology and tree network topology. However, the architecture and mechanisms for the formation and operation of a BLE mesh network and tree network are not defined in the Bluetooth 4.1 specification [7].
In the standard BLE star topology V4.1 specification, a master can rule the timing and synchronization of all the network nodes. The time is divided into units called Connection Event (CE), where in each Connection Event a different channel can be used. Some issues are raised in the networks in which the slaves connect to multiple masters, it may happen that the Connection Events CEs assigned to the same slave by different masters, figure.4 [13]. Section 4.2.1 in this paper presents one of the researchers' effort in solving Connection Events overlap problem. The Bluetooth V4.2 specification was published in 2014. Bluetooth V4.2 does not provide further functionality to support BLE mesh networks. But this version of Bluetooth focused on increasing the possibilities of BLE technology for the IoT. So this version incorporated improvements mainly in three areas; Internet connectivity, improved security, and higher throughput [8].
The Bluetooth V5.0 specification was published in late 2016. Bluetooth V5.0 does not provide further functionality to support BLE mesh networks beyond those in Bluetooth V4.1. However, this new Bluetooth specification offered many improvements in terms of range, data rate, and advertising channel functionality [9].
In the last couple of years, several approaches have been proposed to overcome the BLE network topology limitations while maintaining the advantages of lowenergy and low-cost communications. The next section presents different researchers' efforts in designing solutions to implement a tree network topology and enable BLE mesh networks.

BLE Based Tree Topology Networks
Tree topology is considered one of the simplest solutions that can still be used to extend the coverage area of the network. Any tree based network consists of three different types of nodes: root node, intermediate nodes and leaf nodes. Figure 5 illustrates an example of a tree network topology consisting of different specified nodes. Where each node in any tree based network has different characteristics [2]: • Root node: This node is the central device according to the definition of the BLE specifications. It is the main node in the tree network, and all other nodes expand from this node. This node receives and manages all the data in the network and relays them to the external or other connected networks [2]. • Intermediate node: This node connects two or more nodes located at higher and lower positions in the hierarchy of a tree network. This node consists of both a central device and a peripheral device which are connected together internally [2]. • Leaf nodes: this node connects to only one node higher up in the hierarchy of the tree network; it is always set to be a peripheral device. It transmits the measured data from the sensor node to the upper node [2].

Fig. 5. Tree Network Realized with BLE [2]
Nodes addressing is the main step in configuring any tree network, where each node has a unique identity number ( Figure 6). This identity number is stored as a variable "N-Bytes variable". Using node addressing and to transmit data from the lower sensors to the central root node, the data is passed wirelessly from lower hierarchy nodes on up to higher hierarchy nodes and so on towards the root node. The routing path is determined by extracting the address pattern, where the relationship between parent and child can be determined by the ID number [3]. Depending on the size of the identity number network levels can be determined. For example, if the size of the stored identity number is 2 Bytes and If the root node is considered to be level 0, then the tree network can expand up to 5 levels and then the maximum number of nodes in each level is 7 nodes. Thus the network size which is considered an important parameter to determine the coverage area for WSN is limited by the size of the variable which is used for addressing [2].
The objective of the proposed approach in [2] is creating a tree network with uniquely addressable nodes to read different combinations of sensors, so the proposed network is suitable for collecting data in a BLE based Wireless Sensor Networks (WSN).
other parameters like communication range, power consumption and latency are tested using the proposed approach in [2]. It found that the communication range between two nodes using the designed hardware is around 8 meters. The node life based on power consumption measurements were carried out for both devices and which are powered by an individual battery of 250 mAh during the performing of different activities of BLE protocol such as advertising, scanning, and empty connection events is 202 days for peripheral devices and 60 days for central devices (connected to three peripherals) [2].
Latency in the proposed network [2] can be referred to as the time it takes for sensor data from any node to reach the root node. There is no exact measurement for this parameter because of the different node positions in the tree hierarchy. The main drawback of the proposed network in [2] is that, the network size is constrained by the two byte variable which is used for nodes addressing.
Another solution for constructing Tree based networks was published in 2015 [3]; the work in paper [3] proposes a method to implement the tree topology network using the BLE devices. The proposed method suggests switching the Central and Peripheral modeof the BLE module in each network node according to a time similar to the Time Division Duplex system, the main feature of the proposed method in [3] is to extend the communication coverage between the nodes at the different layers of the tree topology.
BLE Mode Switching using a Time Division Duplex (TDD) system: In the tree topology, the data communication between the nodes in the same layer does not happen. Instead, all the communication is done between the nodes in the adjacent layers, which are parent or child nodes. However, if the nodes in the adjacent layers are in the same mode (master/slave), the communication between them is impossible. The nodes within a tree topology should be able to support both operational modes (master/slave) simultaneously. Especially, in case of the intermediate nodes which may communicate with both the parent and child nodes while maintaining the double connections to them [3].
Switching the operation mode of the nodes in the adjacent layers is synchronized by the synchronization algorithm using the timing Information that is delivered through Beacon packet. As shown in figure 7 the root node and the intermediate nodes transmit Beacon to notify the TX cycle begin. Since the transmitted Beacon contains all the timing information to switch the operating mode, the child node that receives this Beacon can synchronize their switching time of operation mode to their parent nodes [3]. Figure 8 shows the detailed algorithm to deliver data, where each node in the Peripheral mode uses an Advertisement packet to transfer data. If nodes in the Peripheral mode at the Level 2 transmit advertisement packets at a given time, the node in the Central mode in the adjacent layer receives the data. When the data is received, the receiving node checks the ID of data to identify from where the data came from. If the data came from the child node, it prepares to retransmit to their parent node. After a certain time period, Transceiving cycle, if the operation mode of the node at Level 1 is changed to the Peripheral mode, then it retransmits data from their child to their parent.  The main drawback of the proposed network [3] is that, the coverage area of the proposed network still limited to node identifier size. In addition to, sending data directly to the other nodes on the same level is impossible task.

BLE Based Mesh Topology Networks
A wireless mesh network is a network topology in which each smart device (e.g., Smartphone, tablet, wearable, and laptop) can transfer the data for the network. Some or all the devices in the network cooperate in sharing the data in the network. A mesh networking solution can be used to overcome the limitations of short range and restricted BLE star topology. To implement a mesh network topology, devices communicate locally to form Pico-nets comprising of devices in master and slave roles. The Pico-nets are connected via common devices to form a scatter-net [2]. A mesh networks use flooding and routing techniques for relaying the data (Figure 9). Table 1 presents a set of BLE mesh network solutions which have been proposed in the last few years and its mesh paradigm and intended applications. We will discuss some of them in this paper and present the main advantages and disadvantage of each one.

BLE Flooding Based Solutions:
Flooding-based solution (which uses advertising channels) is the simplest way to send data from node to node within the network, since it requires neither any routing protocol nor defining the relation (Parent and Childs) between the different nodes. In the last few years, many BLE flooding based solutions have been proposed such as CSRmesh protocol [15], BLEmesh protocol [16], Silvair solution [17], Estimote solution [18] and Mindtree Bluetooth Mesh solutions [19].
Cambridge Silicon Radio (CSR) mesh protocol has been released on Feb. 2014; CSR mesh is a flooding mesh protocol that uses BLE's non connectable advertisements to send data to individual devices, groups, sub-groups or all devices. CSRmesh protocol has a simple mechanism of flooding mesh, scalable up to 64,000 devices or groups per network; CSRmesh's setup time is close to zero. In addition, it does not need to maintain a routing table [15].
BLEmesh is a Bounded flooding technique which utilizes the broadcasting capability of wireless transmissions. Bounded flooding technique restricts the process of rebroadcasting in intermediate nodes by only allowing a subset of these to participate in broadcasting operations [16]. BLEmesh protocol has been compared with the other conventional routing method and the flood method and the experiments approved that BLEmesh increases overall energy efficiency of a network [16].
The main advantage of using the flooding techniques is its simplicity, in addition to; it does not require any routing protocol, which increases memory consumption due to routing tables and their maintenance, and therefore flooding techniques avoiding delay due to route creation. Flooding technique is very noisy technique where it consumes an inefficient number of messages to achieve end-to-end communication between two devices [4].

BLE Routing Based Solutions:
Routing is the process of transferring the packets from one network node to another one. Routing-based solution is one of the most important issues in studying communication between nodes within any BLE network. It uses advertising channels to send routing protocol messages but use data channels for data transmission [28,29]. Routing-based solutions for BLE networks can be divided in two parts, static routing based solutions and dynamic routing based solutions Increasing network scalability, solving Connection Event overlap problem and finding the shortest route between nodes to maintain network energy consumption and speed up data transmission are the main challenges of routing-based solutions. The routing technique consumes lesser power than flooding technique. One of the main drawbacks of routing-based solutions is creating routing tables for each node in the network which require greater memory [4].

Static Routing-Based Solutions:
Static routing is known as non-adaptive routing because when sending data from node to another one within the network, the router will always use a static path which has been predefined by the network administrator. The following few paragraphs will present different researchers efforts in constructing solutions to enable BLE networks using static routing techniques.
The work in [13] presents a real-time protocol for industrial wireless mesh networks that is designed over Bluetooth 4.1 to increase the BLE network scalability while providing real-time support for data packets. The proposed approach in [13] is considered a clear example of the static routing based solution. The proposed protocol uses a Time Division Multiple Access (TDMA) approach with an optimized transmission allocation that provides data packets with real time support.
The RT-BLE protocol proposed in paper [13] proposes a solution for Connection Events CEs overlap problem and enables the creation of meshed networks. The main idea to achieve this result is to create multiple networks (here called sub-networks), each one is coordinated by a master. The sub-networks can share one or multiple slave that acts as "bridges" between the sub-networks ( Figure.10).   Fig. 10. Example of RT-BLE network topology [13].
Two rules must be followed in configuring the proposed network to avoid Connection Event Overlap on bridge nodes: 1) A node not acting as a master can establish a connection with up to two masters. 2) A node acting as a master can establish a connection with at most another master (B). In this connection, the node A shall play the slave role. To avoid CE overlap and Enable a slave node to be on the right sub-network at the right time, the Connection Intervals "CI" of the different sub-networks have to be the same, by calculating the connection interval for each sub-network. Then the CI for any subnetwork (called CI*) is chosen equal to the maximum of the CImin values among all the sub-networks.
One of the main drawbacks of the proposed approach in [13] is that, the network is configured offline (no dynamic configuration for this network). However, the proposed solution is considered one of the best solutions for construction BLE mesh network and solving the CEs overlapping problem up till now.

Dynamic Routing-Based Solutions:
Dynamic routing allows the routers to learn and adapt automatically to network changes and even system failures. Dynamic routing is preferred over static routing in solving the problem of link/node failure. The following paragraphs present one of the proposed solutions to enable BLE networks using dynamic routing techniques.
The work in [30] proposes a mesh network for mobile (non-static) devices using BLE version 4.1specifications, where a BLE device can be a master in one network and can act as a slave in another network, thus allowing the possibility for the formation of a mesh network. It suggests a method for developing a prototype of the BLE mesh network (BMN) using the Android operating system.
The proposed approach in [30] uses many messages for constructing the BMN formation as shown in figure. 11. When the system is switched on, all devices start broadcasting DAG information Solicitation (DIS) messages over the BLE advertisement channels for collecting the Directed Acyclic Graph information (DAG). Next, the user selects any node as a root node, then the root node starts broadcasting the DAG information Object (DIO) messages as a response message to a DIS request received. The DIO message of a node has the rank of the node which contains some information about this node such as the residual energy, degree, and hop counts of the node. When a node receives DIO messages and if it is not part of the BMN, the node waits for some time for collecting more DIO messages and selects a node which has the lowest rank as a parent. Fig. 11. BMN formation [30] The major contributions of the work in [30] are as follows: The proposed BMN architecture does not require any modification in the existing BLE stack and it developed an algorithm using Direct Acyclic Graph (DAG) in order to allow all nodes in the network to have nearly equal hop count distances from the root. In addition to, it uses the weight balancing technique to reduce the energy consumption and delay and increase the throughput.
The proposed BMN is suitable for mobile or static BLE devices. It also assumes that the any BLE device can act as a root node. In a DAG, a network is not suitable if the distance between the root and leaf nodes is high. The technique proposes a procedure for balancing the tree with reference to the root called weight balancing procedure.
The main advantages of the proposed approach in [30] are that, the proposed BMN does not require any modification in the existing Android operating system and BLE stack. In addition to, nodes in the proposed mesh network are able to use alternative parent to form mesh network and use the shortest routing path for data transfer. The main drawback of the proposed network is that, root node is assigned statically by user besides it is not a complete mesh network structure.

Star -Mesh Hybird Flooding Based Topology
The proposed approach uses hybrid network topology which is one of the popular network topologies. The proposed approach tries to merge the default BLE star topology with the flooding based mesh topology to create a new hybrid network topology, which can benefit from the advantages of each topology and at the same time, can reduce the limitations and the disadvantages of each one. Figure 12 presents the layout of the proposed hybrid network. As illustrated in the figure 12, each subnetwork is based on the default star topology (Master and slave nodes), to connect each sub network and transform data between them, we propose a simple flooding based mesh topology which does not require any routing protocol, or relationship (Master and slave) between the different master nodes therefore there is no central device in the main flooding based network.
Master nodes are responsible for sending or receive data to their slave nodes if the message is related to their subnetwork "Local Message" and sending or receiving data to other master nodes in broadcasting operations if the message is related to another subnetwork group "Global Message". Master nodes can detect the type of the incoming or outcoming message easily by checking the network packet header of the message. Nodes in different subnetworks can be in sleep modes if there is no internal or external messages.
The proposed hybrid network is very reliable, network expansion and modification can be done easily, easy to detect, remove and maintenance faults to improve network performance but it has a complex design and very expensive. Security is a major problem because master nodes have access to all other traffics.

IoT-based Systems using Bluetooth Low Energy
The next wave driving the expansion of the Internet will come from connecting Bluetooth Low Energy devices to the Internet. To connect those devices to the internet, it must use IPv6 protocols, where the capability to run IPv6 over BLE devices opens new doors to the IoT devices and BLE devices toward new application areas [31].
The Internet of Things (IoT) is a network of physical devices embedded with sensors, actuators and electronics which enables things (cars with built-in sensors, heart monitoring implants, cameras streaming live feeds of wild animals in coastal waters or others ( Figure. 13)) To connect and exchange data [32]. The IoT allows objects to be sensed, measured, or controlled remotely across existing network infrastructure [33]. Fig. 13. Central and Peripheral devices in IoT-Based BLE network topology [34] A basic IoT-based system includes four main modules: Sensing (capturing physical variables), processing (embedded systems interfacing and processing), Data Communication (connectivity), and Data Analysis (getting insights). Many fields in our life can benefit from using IoT technology, such as, health, home automation, logistics, military, agriculture, industry and others [35]. Location-based services (LBS) are one of the most successful fields to use IoT technology. Indoor positioning systems using IoT technology can solve the limitation of the other similar technologies such as, Global Navigation Satellite System (GNSS)and Radio Frequency Identification (RFID) technologies [36,37],where GPS stops working on indoor environments while RFID does not have enough bandwidth for large-scale LBS [35].

Conclusion & Future work
In this paper, different networking solutions for connecting Bluetooth Low Energy devices which are embedded in wireless sensor networks and mobile devices have been discussed. The objective was to present and compare a part of the researchers' efforts in designing and building tree network topology and mesh network topology based on Bluetooth 4.0 and Bluetooth 4.1 technologies. The original design of BLE specifications is limited to star topology networking, which limit network coverage and scalability. According to the researchers solutions, tree and mesh topologies can be used for the purpose of increasing the Bluetooth Low Energy network range extension. It is expected that the proposed approach in this paper consumes less power and extend the network coverage without switching the operation mode of the BLE nodes or using any routing protocols. Finally, connecting BLE devices to the internet opens new doors to the IoT-based BLE devices toward new application areas.
Future work could be done to create a tree and a mesh BLE network topology and study the behavior of each one. Range coverage and power consumption are two important factors must be studied using different topologies and diverse environments in building BLE networks. Intelligent routing techniques and connecting BLE networks to IoT devices will be the key to many future researches. In addition, Security is currently a big