# Energy and Distance-Aware Hopping Sensor
## 2 The Proposed Protocol to Relocate Hopping Sensors
### Components and Brief Descriptions of the Proposed Protocol
* type: ADVsrc: The address of the cluster header that sends the ADV  
dst: Broadcast
* **ADV-ACK message**: The member sensor node that received the ADV sends its ADV-ACK including its position and the currently available number of hops to its cluster header. The relay node does not transmit ADV-ACK. type: ADV-ACK  
src: The address of the member sensor node that transmits the ADV-ACK  
dst: src of ACK message received  
mGPS: Location information of member sensor node  
hopCnt: The number of currently available hops (i.e., the residual energy which can be used for moving)
* **MOVE message**: The cluster header that receives the ADV-ACKs selects the movable nodes by referring to 1) currently available hops (residual energy) and 2) the geographical distance between the member sensor node and the cluster header where the sensing hole occurs. The header sends MOVE to the selected member sensor nodes. The member sensor node receiving the MOVE is relocated to the cluster zone where the sensing hole occurs. type: MOVE  
src: The address of the header that sends the MOVE  
dst: The address of the member sensor node selected for relocating  
hGPS: Location information of the sensing hole  
holeAddr: The address of the header where the sensing hole occurred  
* **NEW message**: The member sensor node that moved to neighboring cluster zone sends the NEW message to a new cluster header. Upon receiving the HELLO message after a predetermined time (helloMsgTimer), the relocated member sensor node can determine whether it is a relay node by initializing its header nodes. type: NEW  
src: The address of the member sensor node sending the NEW message  
dst: The holeAddr of the MOVE message received  
The cluster header periodically communicates with its members in its cluster to determine the status of member sensor nodes. For example, if the number of answers to the HELLO message is less than a certain level, it is possible for the cluster header to recognize that its cluster zone could be a sensing hole. Also, the member sensor nodes keep their headers' information by grasping the header IDs. If a sensor node has more than two header IDs, the node is a relay node. A relay node could maintain the maximum transmission distance by jumping. In Figure 4, we assume that the cluster header CH2 has determined that its zone is a sensing hole as the number of member sensor nodes becomes below certain number. 1. The cluster header CH2 sends RELAY message to the relay nodes (R1, R2) to select the relay node to forward the message. 2. Each relay node sends a reply message RELAY-ACK to the cluster header CH2 to indicate that it is possible to forward the request to the other cluster headers (CH1, CH3). In Figure 2, it is assumed that the RELAY-ACK of the node R1 first arrived at CH2. Therefore, another RELAY-ACK from the R2 node is ignored. 3. The cluster header CH2 receives the response message RELAY-ACK from R1 and then requests at the node R1 that one sensor node is needed. At this time, the location information of the cluster header CH2 is included in the REQ message. 4. Relay node R1 forwards the REQ, including the required number of hopping sensor nodes requested by CH2, to another cluster header CH1. 5. The cluster header CH1 sends an ADV message to select the nodes to move from its zone to the neighbor cluster zone. 6. Each member sensor node sends its location information and energy information, which are able to be used for moving, to its cluster header CH1. 7. The header CH1 receives the response message from each member sensor node and then selects the movable member considering the position information of the cluster header CH2 and the information (location and energy) of the respective members. At this time, the energy of each member and the distance between a member and the neighboring cluster zone can be considered concurrently. Specifically, the cluster header obtains the value of the following function (1) \(f\) (_node_i,w_) for each member sensor node. The member having the maximum value will be selected as the node to be moved.