# A New Association Scheme for Handling Node Mobility in Cluster-Tree Wireless Sensor Networks
## 3 System and Network Model
### Handover Mechanism  
Considering the IEEE 802.15.4 PAN's association and re-association mechanisms, we present some improvements considering multiple strategies. First, we use the FastA association of the IEEE 802.15.4e standard for the message exchange procedures. Secondly, we suppress the orphan scan step, as the proposed handover decision mechanism will be invoked before the link breakage. Thirdly, we reduce the number of channels in the scan operation, since the cluster-tree network is pre-set to operate in a single channel. Moreover, we propose the anticipation of the handover based on a proactive decision, and, finally, the adequate setup of the MAC layer parameters related to the association procedure is defined. Note that these improvements are backward compatible with IEEE 802.15.4 standard because they do not require any modification of the frames' structure. Then, it is not expected to have any impact upon data processing in the devices. The IEEE 802.15.4 standard does not specify a mechanism for the selection of an appropriate coordinator. However, the most commonly used parameter to trigger handover decisions is RSSI, as already shown in the state-of-the-art section. In beacon-enabled networks, the coordinator frequently sends a beacon to its child nodes. It allows nodes to synchronize with the parent coordinator and to exchange messages. Thus, this work considers a handover decision approach based on the average of the RSSI values from the consecutive beacons received at the MN from each coordinator. This RSSI average from each CH is obtained using a sliding window technique, which prevents possible outliers of the RSSI average value due to distance, interference, and packet collisions. Figure 5 shows the message exchange sequence for the enhanced association mechanism proposed in this work. This message exchange sequence improves the original association sequence defined in the IEEE 802.15.4 standard [2]. It illustrates that whenever a MN is activated in the network, it initiates the association process by listening for received beacons. When receiving beacons from a CH, the mobile node checks the beacon frame information, identifying cluster data, the active period, and RSSI value. Then, the MN prepares an association request and sends it to the candidate CH; then, it waits for an acknowledgment packet (ACK) and an association acknowledgment packet. The CH, upon receiving the join request of a mobile node, sends back an acknowledgment packet and evaluates whether there are adequate resources for the association. If the association is possible, the CH sends an association confirmation packet to the mobile node and the mobile node sends an acknowledgment packet to the CH. From this, the MN starts to send data packets during the active period of the associated CH. According to this proposal, a mobile node should maintain a table with the RSSI values obtained from nearby CHs, which will be used for handover decision-making. Each MN associated with a specific CH will store the three most recent values of RSSI. Whenever moving, the mobile node will listen for beacons from other CHs, checking if the RSSI is higher than the established RSSI threshold. For these experiments, the threshold value was set at \(-87\) dBm, which is considered to be an adequate threshold value [32]. If the average of the RSSI values of the received beacons is greater than this threshold, the MN checks if this value is greater than the average of the previously stored RSSI values. If this average is greater than the average RSSI values of the current CH, it requests an association with the new CH. If the association process is completed during the active period of the new CH, the MN synchronizes with the new CH and starts sending data packets in the active period of the new CH. Then, the CH generates a disassociation packet for the previous CH, which is sent during the active period. If the MN does not complete the association process, the MN will maintain the association with the previous CH.