# HARE: Supporting Efficient Uplink Multi-Hop Communications in Self-Organizing LPWANs
## 6 Implementation
### Testbed #1: University Facilities  
Performance evaluation was performed in an ad hoc testbed located on the 2 nd floor, right wing of the Tanger building at Universitat Pompeu Fabra (UPF) facilities [46]. The testbed consisted of 13 ZolertiaTM RE-Mote nodes (one of them acting as a GW and connected to a PC) running the HARE protocol stack with different setups for 15 days in total. All tests, whose results are compiled in Section 7, were executed considering no mobility and with the same STAs' placement as in Figure 10. All STAs were powered by an 800 mAh battery except the GW, which was permanently powered by the PC. Results were directly obtained from the GW through the _statistics messages_ periodically sent by STAs as well as internal logs. These messages contain information about different metrics such as the number of packets sent and acknowledged, round-trip time (RTT) delays, as well as power profiles of the microprocessor and the radio module. Figure 10: Nodes’ placement and association diagram of Testbed #1 when each STA admits up to five children. \begin{table}
\begin{tabular}{l c} \hline \hline  & **ZolertiaTM RE-Mote** \\ \hline Microprocessor & ARM Cortex-M3 \\ Radio Module & TI CC1200 [45] \\ Frequency Band & 868/915 MHz \\ Modulation & 2-GFSK \\ Data rate & 50 kbps \\ Underlying communication standard & IEEE 802.15.4 g \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Main features of ZolertiaTM RE-Mote nodes. The calculation of total energy consumption \((E_{\rm{T}})\) is based on two power profiles: \(E_{\rm{HP}}\) and \(E_{\rm{RADIO}}\), for the microprocessor and the radio module, respectively, as shown in Equation (2). \(V_{\rm{DD}}\) is the supply voltage, while \(t\) and \(I\) are, respectively, the time and the current corresponding to the operational states of the microprocessor and the radio module of the employed hardware, whose values are summarized in Table 6. Notice that the \(I_{\rm{TX}}\) value of the radio module depends on the transmission power level:  
\[ \begin{split} E_{\rm{T}}=E_{\rm{HP}}+E_{\rm{RADIO}},\\ E_{\rm{HP}}=V_{\rm{DD}}\cdot\left(t_{\rm{CPU}}\cdot t_{\rm{CPU}}+t _{\rm{LPM}}\cdot t_{\rm{LPM}}\right),\\ E_{\rm{RADIO}}=V_{\rm{DD}}\cdot\left(t_{\rm{RX}}\cdot I_{\rm{RX}}+t _{\rm{TX}}\cdot I_{\rm{TX}}+t_{\rm{SL}}\cdot I_{\rm{SL}}\right).\end{split}  \tag{2}\]  
In addition, different network configurations were applied. Firstly, two different RDC sublayers inherent to Contiki OS were tested: NullRDC and X-MAC [48]. While NullRDC maintains STAs continuously awake during _active_ periods, X-MAC combines the introduction of sleeping periods for receivers with the use of strobed preambles for senders. Secondly, and always over the same node deployment, two different network topologies were tested: single-hop and multi-hop. In the first case, all nodes were directly connected to the GW, as in a traditional single-hop LPWAN, while, in the second case, STAs were free to establish their own routes to the GW with the single limitation of having five children per STA. Thirdly, the whole system was altered with the arbitrarily introduction of a certain error probability when sending both _application packets_ and their corresponding ACKs (it is worth noting here that neither messages implied in the association process nor _statistics packets_ were affected by arbitrary generated errors to not artificially disturb the network setup nor the collection of operation information). Errors were generated through a uniformly distributed random variable according to mean error values from four different error configurations (see Table 7). Before sending a message, STAs computed this value and discarded messages accordingly. The addressing system followed the Rime format [49] consisting of two 8-bit numbers. Similarly to IP addressing, the use of netmasks leads to flexible subnetting configurations with up to \(2^{16}\)-2 STAs.