# Hybrid RF/VLC Network Architecture for the Internet of Things
## 6 Results and Discussion  
In order to verify the complete operation of the developed hybrid network, both a battery level and an accelerometer were used as sensor data inputs on the Waspmote development board with an information update period of two minutes. The produced data was sent through the corresponding interface established in the LoRaWAN network, reaching its final destination (The Things Network) through the LoRaWAN-Internet gateway. Thanks to the implementation carried out with TagoIO, this information flux could be viewed using a user-friendly interface. Figure 15 depicts the data on a dashboard built in the TagoIO service. Figure 16 shows the changes recorded by the accelerometer due to the movement of the sensor board, demonstrating both correct data acquisition and delivery by the hybrid network. Figure 14: Simulated coverage maps approximated using the Okumura–Hata model for LoRaWAN (blue), and the general urban path loss (GUPL) model for ZigBee (red). The estimations are overlaid to the environment’s satellite image. The transmitter locations are tentative. In order to assess the validity of the fragmentation procedure, a long-length phrase has been read from a text file, exceeding the maximum data size defined by the HNF, forcing the fragmentation of the information. On the VLC communication side, as a first test, a small set of characters were sent from \"The Things Network\" platform with the objective of visualizing the appropriate changes in the receiver. An example of the signal recorded in the oscilloscope can be observed in Figure 17.  
After assessing the proper functioning of the VLC interfaces, a more in-depth test was performed. One thousand VLC data frames (0x05 code in the purpose field of the HNF) with randomly generated characters were sent, as mentioned above. For simplicity, each HNF comprised a single character. No errors were detected on any packet within the coverage area of the testbed (Figure 17), suggesting a BER below \(1.25\times 10^{-4}\). Figure 16: Accelerometer data changes received by LoRaWAN. Figure 15: Sensors data received by LoRaWAN. Real-scenario experiments were performed on the complete system to validate error probabilities and propagation times. For verifying the correct functionality of the hybrid network, a series of tests were carried out. One of the performed tests consisted of sending several maximum-size packets between endpoints at different distances. In this test, segmentation was employed to send data without acknowledgment for the correct measurement of the packet loss rate. A total of 300 frames were sent at different distances in each test. The parameters employed for the LoRaWAN backbone were a bandwidth of 125 kHz and a spreading factor of 12. It is important to highlight that the tests were carried out in an urban area with a significant amount of buildings, and not in an open field without obstacles, which would have improved the obtained results (Figure 18). Moreover, the transmitter was located inside the laboratory, introducing an important indoor-to-outdoor additional loss. Figure 19 depicts the packet error rate (PER) versus the distance in this case. In an actual deployment in which the access point was anchored to a solar-powered LED luminaire, the SNR and hence the PER performance was considerably increased. Another performed test was related to measuring transfer times. Concretely, the measured times corresponded to the data collection in the cloud-side of the architecture. Three hundred packets were sent through the complete network from the final nodes of the cell. Table 4 shows the average times for different distances and spreading factors. Figure 17: VLC data response through the hybrid network. Vertical resolution: 2 volts/div; horizontal resolution: 500 \(\upmu\)s/div. Figure 18: Approximate height profile of the test environment. As can be observed, the transmission time decreases in proportion to the diminishing of the spreading factor.