## 3 Farming Monitoring System Concepts and Methods
### LoRaWAN(r)-Based Communication Network  
As described in the previous subsection, the proposed system was developed based on LoRaWAN(r) wireless communication technology. The system consists of two main device types: the sensing unit, known as the end node (EN), and the central unit, known as the gateway (GW). Both units were developed based on either Semtech SX1272 or SX1301 LoRa chipsets, enabling the development of class A LoRaWAN devices. The EN is responsible for data collection and pre-processing. These pre-processed collected data are then be transmitted from these ENs wirelessly using the LoRa signal to the GW. The GW then forwards the collected data through an internet connection to the application server to be further processed and visualized by the end user. It should be noted that both the GW and ENs operated at the 915 MHz band. For simplicity and comparison purposes, these devices were configured at either LoRa mode 1, utilizing a 125 kHz bandwidth with an SF of 12, or LoRa mode 10, utilizing a 500 kHz bandwidth with SF7.  
Two types of GW were utilized throughout the development process, namely a single-channel GW and a multi-channel GW, to specify the most suitable type for the deployment area. These two types GWs mainly differ in terms of cost, packet transmission reliability, and the maximum supported ENs. For instance, the single-channel GW is known for its low cost, support of few ENs (maximum of 4 ENs in our case), and the capability of handling one LoRa mode at a time for all ENs in the network. However, the latter represents a disadvantage that would eventually result in reduced performance and high packet loss. In contrast, the multi-channel GW can simultaneously operate at multiple frequency channels (up to eight), supporting a larger network of connected ENs and an improved packet transmission reliability. In addition, the multi-channel GW supports ENs operating at different spreading factors by automatically adapting the network, enabling what is known as the adaptive data rate (ADR) mode. In this regard, during the measurements, we evaluated and compared the performances of both GWs in terms of packet delivery rate (PDR) under different SFs and transmission time intervals.  
One of the drawbacks of the utilized multi-channel GW is that it does not support operating in areas where internet access is difficult to secure, i.e., it does not support operating in offline mode. Accordingly, it was further developed to enable offline data  
Figure 4: A schematic of the position of the sensors on the considered farm.  
collection mode. This was achieved by using the same chipset of the multi-channel with a different hat design based on a Raspberry Pi and a second server was installed in the gateway to save the LoRa packet from the node locally. Thereby, it acts as a local storage device and a mini server that stores and pre-processes the data while in offline mode. The GW then pushes the data to the application server once an internet connection is available, in which the operation can be made by using a toggle switch on the gateway. Figures 5 and 6, respectively, show the block diagram and the components of the modified LoRaWAN(r) multi-channel GW, and Table 3 lists the technical specifications of the LoRa multi-channel GW.  
can perform link budget and coverage prediction by considering the surrounding effect. CloudRF(r) also offers configurable options to simulate the conditions and characteristics of real equipment by employing a high-resolution topographic graph. Further descriptions of simulation parameters and measurement methods are provided in related parts of Section 4.