## 5 Implementation and Simulation Setup
### Modifying Cooja to Support Multi-Interfaced Simulations  
For our simulations, we used Cooja [13], a Java-written network simulator. Each network node or Cooja \"mote\" executes a Contiki-NG binary through the Java Native Interface (JNI) [33]. As such, Cooja motes can manipulate certain variables, trigger all actions corresponding to one clock tick, and check memory for changes. Based on these interactions, each mode manages a set of more interfaces, which together represent the network node to the rest of the simulator. At the Contiki-NG end, the variables on which Cooja relies are manipulated primarily by the Cooja radio driver. At the Cooja end, a radio medium defines the behavior of the traffic exchanged between radios by implementing a propagation model. A radio is just a more interface. Thus, apart from modifying the Cooja radio driver, we: (1) wrote a new radio class and attached an instance of it to every mote; and (2) modified the UDGM and LogisticLoss radio mediums to work with dual-radio motes. For more details, we kindly refer you to the Supplementary Materials or to our Github repository. For the simulations described in Section 5.3, we opted to use the modified LogisticLoss medium, which is based on two assumptions. Firstly, it assumes that the probability of correctly receiving a single transmission over a direct path is related to the signal strength at the receiver by means of a logistic function (4). \[PDR(RSSI)=\frac{1}{1+e^{RSSI_{0\%}-RSSI}}\;, \tag{4}\]  
where: \begin{tabular}{l|l l} \(PDR\) & the packet delivery ratio & \([-]\) \\ \(RSSI\) & the received signal strength indicator & \([\text{dBm}]\) \\ \(RSSI_{50\%}\) & the RSSI for which \(PDR=0.5\) & \([\text{dBm}]\) \\ \(e\) & [PERSON]'s constant & \([-]\) \\ \end{tabular}   
Second, it assumes path loss relates to distance (between transmitter and receiver) by means of the log-distance path loss model with log-normal shadowing [34] (pp. 138-140) as given by (5). \[PL(d)=PL_{d_{ref}}+10\times\alpha\times\log_{10}\Bigl{(}d/d_{ref}\Bigr{)}+X_{ \sigma}\;, \tag{5}\]where: \begin{tabular}{l|l l} \(PL(d)\) & the path loss at distance \(d\) from the transmitter & \([\text{dBm}]\) \\ \(d\) & a given distance from the transmitter & \([\text{m}]\) \\ \(PL_{d_{ref}}\) & the path loss at distance \(d_{ref}\) from the transmitter & \([\text{dBm}]\) \\ \(d_{ref}\) & a close-in (far-field) reference distance from the transmitter & \([\text{m}]\) \\ \(\alpha\) & an empirically determined path loss exponent & \([-]\) \\ \(X_{\sigma}\) & random variable with Gaussian distribution, zero-mean, and & \([\text{dB}]\) \\ \(\sigma\) & standard deviation of Gaussian random variable & \([-]\) \\ \end{tabular}   
It is common practice to calculate the path loss at a close-in reference distance [34] (pp. 108-109) from the transmitter \(PL_{d_{ref}}\) according to (6), i.e., the free-space path loss model derived from the Friis transmission equation [34] (pp. 107-108). \[PL_{d_{ref}}=20\times log_{10}\bigg{(}4\pi\frac{f}{c}d_{ref}\bigg{)}-AG_{t}-AG _{r}\, \tag{6}\]  
where: \begin{tabular}{l|l l} \(f\) & operating frequency of the transmitter/receiver & \([\text{Hz}]\) \\ \(c\) & the speed of light assuming a vacuum & \([\text{m}/\text{s}]\) \\ \(AG_{t}\) & antenna gain of the transmitter & \([\text{dBi}]\) \\ \(AG_{r}\) & antenna gain of the receiver & \([\text{dBi}]\) \\ \end{tabular}   
Since the random variable \(X_{\sigma}\) has a zero-mean, we can use (5) to find the average path loss at the maximum transmission distance \(d_{max}\), also known as the transmission range. In addition, the average path loss at this distance equates to the signal transmit power \(P_{t}\) minus the receiver sensitivity \(S_{r}\), resulting in (7). \[\overline{PL(d_{max})} =P_{t}-S \tag{7}\] \[=PL_{d_{ref}}+10\times\alpha\times\log_{10}\Big{(}d_{max}/d_{ref} \Big{)}\,\]  
where: