# From Sensor Networks to Internet of Things. Bluetooth Low Energy, a Standard for This Evolution
## 4 Materials and Methods
### Mesh Topologies in BLE Standard  
Future industrial networks will enable a wide range of devices and services to be connected. So that there will be a need to collect as much real-time relevant data as possible. It is estimated that the quantity of connected devices will double or triple [45]. Then, the challenge will be connecting this large number of devices at the field level in a simple cost-efficient way. Of course demanding requirements for performance and reliability will still need to be met. Perhaps future networks with high numbers of devices should be hierarchical to simplify network management and operation. The star topologies have some advantages, such as lower latency and higher reliability, but also disadvantages mainly the failure of a central device will disconnect all attached devices. Thus, the use of more complex structures, such as extensively meshed network topologies, will increase. With the adoption of new protocols, these networks will need less management efforts and will offer quick network reconfiguration and service assurance [45].  
As mentioned above, mesh network topology is not yet implemented in the BLE standard. Nevertheless, there are some initiatives which implement this topology over BLE. To explain in detail how this topology is implemented, we have focused on CSR mesh, because their devices use BLE version 4.1, which allows us to combine the different BLE roles.  
CSR proposes the following mesh topology, built on BLE protocol, which uses three different BLE roles simultaneously:  
* _Broadcaster_: CSR devices transmit data packets as broadcasters. These packets are coded and have a format which does not follow completely the BLE standard. To ensure that the packets arrive at the target device, the same packet is sent 3 times, the source device repeats 3 times the packet sending.
* _Observer_: using BLE version 4.1, CSR combines broadcast role with observer role. Thus, devices can receive packets from other devices at any time, even while they are transmitting their own packets. If received packets have the correct format and comply specific conditions, then they are repeated in broadcast again. This action increases the global coverage of the source device, and the network traffic.
* _Advertiser_: this role enables other devices to establish a master-slave connection. Being a partially closed protocol, CSR introduces new devices in their mesh using a direct connection to one of its nodes, which will work as a bridge between the new device and the rest of the mesh, it means, repeating the original data with the proper format.  
Thus, mesh topology created by CSR uses a flood mesh protocol. Nevertheless, the main problem of this routing protocol is the high number of retransmissions [49], which we will try to reduce. For this aim, now we need to define two parameter which we will use in our study:  
* Time To Live (TTL): one byte of the packet indicates the maximum number of times this packet can be retransmitted, or the maximum number of hops among devices possible. Each time a device receives and retransmit a packet, this number is decremented, discarding the packet if this byte is 0.
* Package ID: each of the packets transmitted by a device has an identifier, which will be the same while the packet remains in the network. This identifier allows devices to discard packets that have previously retransmitted, checking only this field.