# Measurement and Analysis of RSS Using Bluetooth Mesh Network for Localization Applications
## 4 Bluetooth Mesh Network for Experimental Studies of RSS Measurements
### RSS Measurement System Using Bluetooth Mesh Network  
To conduct experimental study of the BLE channel characteristics, in this research, we developed a measurement system based on the 2.4 GHz wireless development board ESP32-DevKitC-32U [24, 25], which features a system-on-chip ESP32 microcontroller module with a U.FL connector for external antenna as shown in Figure 2a. A different ESP32 development board with the onboard PCB antenna, as shown in Figure 2b, is also used for comparison. The ESP32 series employ a Tensilica Xtensa LX6 microprocessor and have the built-in RF front-end modules. The ESP32 module can be programmed as a Wi-Fi, Bluetooth, or BLE device, and it is designed for a wide variety of applications related to sensor networks, IoT, and wearable devices among many others.  
To enable simultaneous measurements with multiple antennas and multiple devices, we programmed the application layer of the measurement system based on the ESP Bluetooth mesh networking framework [25], which is built on top of the Zephyr Bluetooth mesh stack [26]. Bluetooth mesh network was introduced as an addition to the Bluetooth standard in 2017 [22, 26]. Bluetooth mesh builds on top of BLE, and it supports the many-to-many multi-hop mesh networking topology, where BLE devices can send messages to each other even when the devices are not in direct radio communication range [25]. BLE devices operate in two states, including the advertising/scanning and connection states. Bluetooth mesh uses only the advertising/scanning state of BLE devices. Devices in Bluetooth mesh  
Figure 1: BLE and Wi-Fi channels at the unlicensed 2.4 GHz ISM band.  
network do not connect to each other as what the traditional BLE devices do. Instead, devices relay information to each other using advertising packets.  
As shown in Figure 3, our RSS measurement mesh network system contains three types of nodes, including beacon node, scanner node, and gateway node. Beacon nodes broadcast beacon packets at advertising events that occur periodically. Scanner nodes scan the three advertising channels and collect RSS measurements from the received advertising packets. Gateway node serves as an interface between mesh network and control station. Control station is used to broadcast or unicast commands to mesh network. For example, control station initiates data collection by broadcasting a command to scanner nodes. Control station is also used to dynamically configure the advertising interval of beacon nodes. Due to the multi-hop wireless mesh networking nature of our measurement system, it is especially convenient to set up a measurement scenario with multiple beacon nodes and multiple scanner nodes to cover a large space with different topologies. In addition, such a system can be easily converted to a Bluetooth mesh network-based localization system, where beacon nodes are configured as reference nodes and scanner nodes are the ones that need to be located or tracked. Architectures and other technical details of wireless localization and tracking systems can be found in the references [6, 7, 9, 10, 27].