## 4 Cluster-Based Multipath Routing in WMSN
### Route Discovery  
We focus here in demonstrating the mechanism of establishing our proposed routing protocol, and in the next section we explain the process of securing the routing protocol. We are using two performance metrics: hop-count (as indication for distance from the sink and delay), and received signal strength (combined with SNR \(\&\) BER) as indication for link quality (interference and noise level) and distance from the sender. Two thresholds (upper, and lower) are used in SCMR to compare the signal strength value of the received packets, where the upper threshold is used to determine the 1 st-level cluster head and group member nodes (as described below) and the lower threshold is used to establish the links between cluster heads.  
In the initializing phase of our proposed routing protocol, the base station starts sending periodic broadcast messages, called BS-Msg, to the surrounding nodes. BS-Msg contains the identification number (ID) of the base station and the relevant security information to authenticate the communication with other nodes. The nodes that receive BS-Msg messages compare the received signal strength index (RSSI) with the upper threshold (Thr-High). If RSSI is greater than Thr-High, these nodes respond to the base station by sending back acknowledgment messages informing their joining the base station as their parent. Then, they start acting as 1 st-level cluster heads as shown in an example in Figure 2 and broadcast periodically control messages called CH-Msg to their neighboring nodes. CH-Msg contains the ID of the cluster head, number of hops between the cluster head and the base station in the current found path, IDs of the nodes joining this path up to the current cluster head, and the relevant security information. For each CH-Msg received by the surrounding nodes of the 1 st-level cluster-heads, RSSI is measured and compared with two thresholds, Thr-High and Thr-Low.  
If the signal strength of the received CH-Msg is greater than Thr-High, the receiving node will start behaving as a group member and sending back an acknowledgment message informing its joining to the corresponding cluster head. Receiving a CH-Msg with RSSI greater than Thr-High indicates that the sender (CH) is in near region, as seen from Equation 2, and the quality of the link is good and thus this CH can better serve the communication toward the base station. In case a node receives more than one message from different CHs with received signal strength larger than Thr-High, the node selects the cluster head of the highest signal strength value.  
The nodes that only receive messages with received signal strength between Thr-High and Thr-Low will start acting as new cluster heads, in this case 2 nd-level cluster heads, and respond back to the sender informing their selection of him as one of their possible parents toward the base station. New cluster heads may receive different CH-Msg from previous-level cluster heads. In this case new cluster heads consider these messages in order to construct multiple paths toward base station and sort these paths based on certain criteria (such as link quality, end-to-end delay, bandwidth, or number of hops in the path). Paths with good conditions, like high link quality, short end-to-end delay, enough bandwidth, or less number of hops, are reserved for multimedia communication that requires certain level of quality of service requirements. Other paths will be used for other types of data that does not require strict QoS requirements such as scalar data. If the signal strength is less than Thr-Low, the message is considered as lost or ignored. This process continues in the same manner to build the network until all nodes join the  
Figure 2: A Simple Example of Cluster-Based Multipath Network.  
network and determine their rules, _i.e._, cluster head or group member, and all possible paths are found. The main routing process can be outlined in the following pseudo-code (as shown in Figure 3).