# Design and Analysis of Adaptive Hierarchical Low-Power Long-Range Networks
## 2 A Hierarchical Communication Scheme
### Network Monitoring Mechanism  
As it was described in the previous section, an important aspect of the operation of the self-organization protocol is the ability of each device to detect the local topology of the network. The purpose for detecting the topology is twofold--first, to update the network structure as devices change their state between active/inactive due to the duty-cycling mechanism; second, to discover devices that change their position due to active/passive mobility or due to failures. Given the changes detected, the self-organization protocol will accordingly adjust the sub-network structures to maintain proper connectivity in the network.  
Network monitoring relies on the very effective technique for detecting the local topology of wireless networks, which is _beaconing_. Beaconing [7, 32] is based on the period transmission of a special message that signifies the presence of a device also informing nearby nodes about the current view of the device on the sub-network structure. In particular, a beacon message includes the unique identifier of the device (e.g., based on the ID provided by the MAC (Medium Access Control) protocol of the network interface) along with a list of IDs of all nearby devices, that is, all the devices from which a beacon is received regularly. These beacon messages, unlike the HELLO messages of [33], contain additional quantitative metrics to help the devices estimate the quality of the communication channel and classify devices based on the trustworthiness of these channels.  
In this work, an adaptive sub-network detection mechanism is used that avoids constant periodic beacon exchanges [20]. The main idea is to adapt the beacon broadcast period to reduce unnecessary message exchanges when the network is adequately stable. Each device adapts its beaconing interval independently, based on its local perception of the network. The rating for the status of the network is based on the changes detected by the device in its vicinity. The rule used is the following: as long as a device does not detect any changes on its sub-network, the status of the network is characterized as _consistent_. While the network is consistent, the beaconing interval is doubled until a _maximum period_. When a significant alteration is detected in the network (i.e., the quality of a communication channel is changed, a new node is detected or lost), the network is _inconsistent_. When the network becomes inconsistent, the beaconing interval is reduced to a predefined _minimum interval_. The network monitoring mechanism is presented in more detail in Section 3.  
The adaptive sub-network detection mechanism used here also eliminates the possibility of two neighbors operating in complementary intervals (as in the case depicted in Figure 2). Since the interval of each device is modified during the execution of the network in a way independent from the other devices, neighboring devices will eventually find a period of time where both are active to guarantee a proper message exchange (see Figure 3).  
Figure 3: Adaptive sub-network detection mechanism: Device 1 broadcasts beacons on variable intervals to detect devices with complementary schedules (white arrows).