# Collision Avoidance Geographic P2P-RPL in Multi-Hop Indoor Wireless Networks
## 3 Collision Avoidance Geographic Point-to-Point RPL
### Collision Avoidance Geographic P2P-RPL with Elastic Trickle Algorithm
A node in the black area has the first transmission priority. A node in the gray area has a second transmission priority. As \(d_{AN_{3}}\geq D_{TH}\) and \(\angle AN_{3}D\leq\theta_{TH}\), node \(N_{3}\) has the first transmission priority, with the value equal to 2. Node \(N_{1}\) only satisfies \(d_{AN_{1}}\geq D_{TH}\) and, thus, has the second transmission priority. In order to achieve this, the listen-only period is dynamically selected. The listening period is set to a variable length that is inversely proportional to the transmission priority. The node with the higher transmission priority has a shorter listen-only period. In the case where a node has the first transmission priority, the length of the listen-only period is equal to \(I/8\). Figure 5 shows the operations when node S attempts to find the P2P path to node D. The bold arrow indicates the shortest route, and the dotted arrow indicates an alternate route discovered by P2P-RPL. In (a) and (b), all nodes except \(N_{3}\) joined the P2P route discovery. The value of redundancy constant \(k\) was equal to 1. In Figure 5a, the length of the listen-only period was selected in an elastic manner. The value of s of \(N_{1}\) and \(N_{2}\) were equal to 2 and 1, respectively, and hence the lengths of the listen-only period of \(N_{1}\) and \(N_{2}\) were equal to \(I/8\) and \(I/4\), respectively. Node \(N_{1}\) had a higher probability to send a P2P-DIO in the current interval than that of node \(N_{2}\). This resulted in a considerably decreased latency for the route discovery procedure. Moreover, decreasing the listen-only period allows the node to contend in a wider interval size, lowering the probability of collisions. ```
FunctionInitialization(): \(I\gets I_{min}\) \(+s\gets 0\) FunctionStartNewInterval(): \(-t\gets random\Big{(}\frac{I}{2},I\Big{)}\) \(+t\gets random\Big{(}\frac{I}{2^{s+1}},I\Big{)}\) \(c\gets 0\) \(+s\gets 0\) FunctionReceivedTransmission(): \(+\)if\(d_{AN_{i}}\geq D_{TH}\)then \(+s\gets s+1\)  end if \(+\)if\(\angle AN_{i}D\leq\theta_{TH}\)then \(+s\gets s+1\)  end if ifReceivedConsistentTransmissionthen \(c\gets c+1\) elseifReceivedInconsistentTransmissionthen \(I\gets I_{min}\)  StartNewInterval()  end if FunctionTimerExpires(): if\(c<k\)then  TransmitDIO  else  SuppressDIO  end if FunctionIntervalEnds(): \(I\gets I\times 2\) if\(I>I_{max}\)then \(I\gets I_{max}\)  end if
```  
**Algorithm 1**Collision Avoidance Elastic Trickle Algorithm  
As shown in Figure 4(b),\(c\), when the standard trickle timer was used and the length of the listen-only period of two nodes were the same, the probabilities of the P2P-DIO sent in the current interval of \(N_{1}\) and \(N_{2}\) were the same. If \(N_{2}\) sends a P2P-DIO, a node \(N_{1}\) keeps silent in the current interval as the redundancy message counter \(c\) is greater than the redundancy constant \(k\). As node S can reach node D only through \(N_{1}\) inside the location-constrained forwarding zone, the latency to reach node D increases as much as the interval length \(N_{1}\) keeps silent. However, as shown in Figure 4(c), if all nodes in the network participate in P2P route discovery in P2P-RPL, node S can reach node D through an alternate relay node \(N_{2}\). Even though the path length of this route (i.e., \(S-N_{2}-N_{3}-D\)) is longer than the shortest route (i.e., \(S-N_{1}-D\)), the minimum interval length (\(I_{min}\)) is much longer than the transmission delay, and thus node S reaches node D faster.