## 4 Proposed Solution
### Selection of Wireless Communication Technology  
The requirements of the wireless network are: low power and long-range wireless technology for the WARM-specific WSN, and other wireless technology with higher bandwidth and with a low-power requirement for IoT connectivity. Cellular networks are constantly in transition, deploying newer generation technology such as 3G to LTE, or LTE to 5G. As the entire service provider still to deploy 5G with NB-IoT capability, 3G or LTE is a better option than any other technologies to connect the WSN with the IoT network wirelessly, depending on the bandwidth requirement and availability. However, all cellular networks need an infrastructure with considerably more power compared with SNs. Depending on the WSN dimensions and network topology, it may generate very little to moderate traffic for cellular data networks such as LTE and 3G. Moreover, to provide and maintain cellular coverage for all the water resources, which are mainly in rural areas for WARM, is not feasible either commercially or technologically due to a lack of accessibility. Therefore, we need a non-cellular wireless network for the WSN in some areas and the existing cellular network depending on its availability. Table 2 summarizes the basic features of Low-Power Wireless Area Network (LPWAN) technologies [50; 51; 52], such as LoRa, Sigfox, Dash7, Ingenu, ZigBee, 6 LoWPAN, Bluetooth, and Wi-Fi. Figure 2: A Wide-Area Remote Monitoring (WARM) application focusing the WQM with dynamic network configuration. Although NB-IoT is a cellular technology, it is included in Table 2 as it is designed for IoT connectivity for SNs. Among these LPWAN technologies, LoRa was chosen for its low-power, long-range connectivity, and performance evaluation in several recent works [51]. Table 2 shows that LoRa falls in the third position in terms of range and the second position in terms of data-rate. However, because of the requirement of the cellular infrastructure and the related high operational cost of NB-IoT, LoRa can be chosen for the WSN connectivity for WARM as a low-cost option. Unlike LoRaWAN, LoRa-PHY can be used to achieve more flexibility to configure the WSN topology as star, tree, or mesh by implementing a custom network layer on it. Moreover, LoRaWAN supports three types (A, B, and C) [53] of channel acquisition. In contrast, custom channel acquisition can be achieved using the proposed layer on top of LoRa-PHY; Figure 3a shows the protocol stack used with LoRa-PHY in this paper relating with the OSI layers. Figure 3b shows the LoRa-WAN stack compared with the proposed stack. The basic three layers are shown in this stack, which are the LoRa-PHY, proposed, and application layers. The proposed layer corresponds to the network, transport, and session layers of the OSI (Open Systems Interconnection) reference model. In the network layer, it uses the physical IDs of the SNs and the DS to select the logical route. In the session and transport layers, it forms the LoRa payload packet for the sensor data along with some headers to maintain the connectivity for the logical route. To keep the protocol lightweight for the SNs all these OSI layers are implemented together as a single function, as described in the following subsection.