## 4 WEAMR Overview
### Multipath Discovery Process  
The multipath discovery process of WEAMR is based on AODV's route discovery process [1]. Please note that, our topology is cluster-based and the gateway acts as the cluster head. All the gateways are connected via high speed hotlines. Therefore, in the path discovery process the sender is actually finding a path to the gateway (intra-cluster communication). In other words, the communication pattern would be sender-gateway-gateway-destination. The destination gateway is most likely to be aware of the destination node, if not; the destination gateway would trigger the path discovery for the destination. We have slightly modified the route discovery process. The format of the proposed RREQ message is shown in Figure 3. When a node needs to communicate with another node it first checks its routing table; if it does not find the destination it initiates the route discovery process. The node broadcasts the RREQ message containing an additional field of its energy level. This energy level will be used later to assess the quality of the path. Each RREQ packet has a unique identifier that is used by the intermediate nodes to detect and drop the duplicate RREQ messages. The destination sequence number in the RREQ message is used to find out the freshness of the packet. Upon receiving the RREQ message the intermediate node checks its routing table to see if it is familiar with the destination, and if it has the route to the destination it will reply with the RREP message and set the energy value in RREP by comparing the energy value of route path with energy value in RREQ message. The lower of these is set in the RREP message. Otherwise, it needs to set the reverse path, by recording the address of the RREQ sender, in its routing table. Then the intermediate node rebroadcasts the RREQ. Please note that the energy value will represent the lowest value of the path. Once a gateway receives the RREQ message it checks with its routing table if it has the destination. If a match is not found, it forwards the request to the destination associated gateway via hotline. The destination associated gateway would most likely know the destination and would already have established the multipath with the destination node, so it would reply with a RREP message. Otherwise, it will rebroadcast RREQ message to its associated cluster. Figure 3: Proposed RREQ message format. REQ messages carry the path's energy information as well. Once the destination, in this case the sender associated gateway node, will receive the RREQ messages it will calculate the cost of each path and will decide to choose two best paths depending upon the minimum cost. The cost is calculated based on three factors: hop count, energy level and latency. The latency value is calculated based upon the mechanism suggested in [5]. The cost calculation is shown later in the equation. Please note that only the destination node and the gateway nodes do not discard the duplicate RREQ messages. Once the destination receives the RREQ message, it waits for at least one more RREQ message to be received from the neighboring nodes. It then analyzes the RREQ messages and calculates and compares the cost. It then chooses two paths with minimum costs and unicasts the RREP message on the selected minimum cost paths. The proposed RREP message format is shown in Figure 4.  
The RREP message also contains the calculated cost. The source upon receiving the first RREP makes an entry in its routing table and for the second RREP message it makes another in its routing table along with the associated cost. The route with the minimum cost is used as the primary path whereas the other path is used as the backup path. Similarly, if the intermediate nodes receive two RREP messages it makes entries in to their routing tables. With this mechanism, the source has established two reliable paths with the destination. The process is shown in Figure 5. The cost calculation is given by the following equation:  
Figure 4: Proposed RREP message format.