# Opportunistic Multipath Routing in Long-Hop Wireless Sensor Networks
## 3 Energy-Efficient Reliable Multipath Routing Protocol Using Opportunistic Routing
### Exception Handling  
As opportunistic routing is only aimed at the probabilistic increase of the link reliability by giving an opportunity to all of the neighbor nodes, all nodes may fail to transmit the packet or else a sufficient number of paths cannot be constructed. In this case, the packet delivery ratio is degraded. To complement this problem, we exploit a characteristic of the opportunistic routing called overhearing. We present an exception handling process (Algorithm 3). When the intermediate node broadcasts the packet to its neighbor nodes, the intermediate node starts a timer to overhear the transmission of the neighbor nodes and counts the number of transmissions (lines 6-10). Similar to the competition process (Algorithm 2), the exception handling process is divided into three cases: (1) all of the paths are successfully constructed, (2) no paths are constructed, or (3) only some paths are constructed. **Case 1 (lines 11-13):** If the intermediate node \(i\) received the same number of transmissions \(h\) as the number of paths \(n\) (Line line 11), the intermediate node realizes that a sufficient number of paths are constructed that satisfy \(R_{req}\). In this case, the exception handling process is terminated without any handling because a sufficient number of paths have already been created (line 12). **Case 2 (lines 17-19):** On the other hand, the intermediate node \(i\) cannot receive any packet \(p_{j}\) (line 17). This phenomenon means that all of the neighbor nodes fail to receive the packet \(p_{i}\) from the intermediate node \(i\). Thus, the intermediate node \(i\) retransmits the packet \(p_{i}\) to the neighbor nodes to construct paths (line 18). **Case 3 (Line lines 20-23):** Similarly, in the case in which the intermediate node \(i\) overhears a lesser number \(h\) of transmissions than the number of calculated paths \(n\) (line 20), the intermediate node \(i\) judges that an insufficient number of paths has been constructed. The intermediate node \(i\) calculates the required number of paths \(n-h\) to construct \(n\) paths and inserts \(n-h\) into the packet \(p^{\prime}\) (line 21). The intermediate node \(i\) then transmits the packet \(p^{\prime}\) to the neighbor nodes (line 22). The modified packet includes the number of modified paths \(h-n\) and modified \(P_{req}\). For example, suppose that three paths are required to satisfy \(P_{exp}\) and the intermediate node overhears only one transmission. In this case, the intermediate node modifies the packet, the number of paths is reduced from 3 to 2, and the distributed \(P_{req}\) is also reduced. Through this process, the proposed scheme can prevent the degradation of the packet delivery ratio by a failure of the transmission based on the opportunistic routing. Figure 3: An example of the bifurcation transmission process and \(P_{req}\) distribution. ```
1:\(n\leftarrow\) number of paths \(\triangleright\) number of paths calculated by Algorithm 1
2:\(p_{i}\leftarrow\) original packet to construct the number of paths at node \(i\)
3:\(p^{\prime}\leftarrow\) modified packet to handle the exception
4:\(p_{j}\leftarrow\) received packet from the neighbor node \(j\)
5:\(h\leftarrow\) number of overhearings (default = 0)
6:
7:StartTimer(\(T\)) \(\triangleright\) when this timer expires, the timer of all neighbors is considered to have expired
8:while\(T.\)expired() == FALSE do\(\triangleright\) overhearing the transmission of the neighbors
9:if Receive(\(p_{j}\)) == TRUE then\(\triangleright\) when receiving the packet \(p_{j}\) from the neighbor nodes
10:\(h=h+1\)
11:if\(h=n\)then\(\triangleright\) a sufficient paths are constructed
12: Exit()\(\triangleright\) quit the exception handling process
13:endif
14:endif
15:endwhile
16:
17:if\(h=0\)then\(\triangleright\) no paths were constructed
18: Send(\(p_{i}\))
19:endif
20:if\(h<n\)then\(\triangleright\) Some paths were constructed and the number of paths is insufficient by \(n-h\).