# Reliable Link Level Routing Algorithm in Pipeline Monitoring Using Implicit Acknowledgements
## 3 Proposed Algorithm
### Algorithm Robustness  
A noisy link prevents the signal from being picked up by the receiving node and therefore the frame cannot be recovered and retransmitted to the next node. In 802.15.4 the unslotted mechanism may cause collisions. However, the unsynchronized behavior of the back off mechanism reduces the possibility of simultaneous transmissions, causing the Rx-to-Tx turnaround to be the main reason behind the collisions. The non-negligible Rx-to-Tx turnaround time in the unslotted mechanism may cause collisions between data frames [45]. The behavior of the node in noisy links will depend on whether it is a TXN, INTN, or RXN node. We present some examples that depict how our algorithm solves link problems. Consider the case where \(v_{i+2}\) does not retransmit the frame to \(v_{i+4}\) because it did not receive it or received it with errors. So, the \(v_{i}\) or \(v_{i+1}\) node will wait a given time for one of them to retransmit the frame to \(v_{i+2}\). The node \(v_{i+1}\) will wait a time given by \(timer_{int}\), as seen in Figure 6, to retransmit the unicast frame to \(v_{i+2}\), storing the frame in _buffer_\({}_{tx}\) and placing the node address \(v_{i+2}\) in the destination direction of the frame. The node \(v_{i+1}\) retransmits first, as \(timer_{tx}>timer_{int}\), to take advantage of the highest level of the signal that reaches the node \(v_{i+2}\). This retransmission will be heard by node \(v_{i}\) concluding that the frame it previously sent did not reach \(v_{i+2}\), and it will wait until node \(v_{i+2}\) retransmits the frame. Figure 4: iACK. Figure 5: Node \(v_{i}\) transmits to node \(v_{i+2}\). Additionally, when node \(v_{i+2}\) verifies that its address is in the destination address of the frame, it will understand that it is a retransmission made by the INTN node of the frame that TXN node sent to RXN node with broadcast address. When the frame sent by \(v_{i}\) does not reach \(v_{i+2}\) (Figure 7), \(v_{i}\) starts a \(timer_{tx}\) to retransmit the frame to \(v_{i+2}\). After this time, \(v_{i}\) will understand that its transmission to \(v_{i+2}\) was not successful, regardless of whether the node \(v_{i+1}\) retransmitted or not the frame to \(v_{i+2}\). Therefore, node \(v_{i}\) will retransmit the frame to \(v_{i+2}\) a maximum number of times (set by the _aMaxFrameRameRetries_ variable) using broadcast destination address in order to make information reach the nodes defined as INTN and RXN. If the maximum number of retransmissions is reached, node \(v_{i}\) will understand that node \(v_{i+2}\) could not retransmit the frame and consequently will proceed to execute the damaged node or link procedure: changes the _FailN_ variable to \"TRUE\" to indicate that the \(v_{i+2}\) node is failing and transmits a unicast frame to the node \(v_{i-1}\) indicating to act as a TXN node so it can transmit the information to node \(v_{i+1}\). In case node \(v_{i+1}\) also fails, \(v_{i-1}\) assigns the value \"TRUE\" to the _FailN_ variable and transmits the frame to the node \(v_{i-1}\). When the frame transmitted by \(v_{i}\) does not reach \(v_{i+1}\) but it reaches \(v_{i+2}\), \(v_{i+2}\) retransmits the frame to \(v_{i+4}\), so this frame is also received by \(v_{i+1}\). This node discards the frame because it has determined that the flow is \(Pr\) and that the transmitting node is \(v_{i+2}\), concluding that the frame goes from \(v_{i+2}\) to \(v_{i+4}\) with destination node \(v_{n+1}\). When the frame sent by node \(v_{i-2}\) reaches nodes \(v_{i}\), and the _FailN_ variable is \"TRUE\", it assumes that nodes \(v_{i+1}\) and \(v_{i+2}\) are damaged and notifies the control station using the opposite route (\(P_{i}\)), and assigns \"TRUE\" to the variable _ChangeF_. If the retransmitted frame by node \(v_{i+2}\) to node \(v_{i+4}\) does not reach \(v_{i}\) (the situation would be similar for \(v_{i+1}\)), \(v_{i}\) waits \(timer_{tx}\) and retransmits the frame.