## 3 Design and Implementation Details
### Derived System Formation
Node #A1 had its antenna and battery inside the plastic box enclosure, while #A2 had its antenna outside the box, and its battery was ready to be placed underground for reasons that will become apparent in Section 3.2. Both nodes incorporated deep sleep functionality, drawing inspiration and advice from the well-documented material provided by [PERSON] in [28] and by [PERSON] in [29]. The LoRa radio module was handled through adaptation of the routines provided by the RadioHead library [30]. Node #A1 and node #A2 were able to host one or more of the soil instruments of interest via female 3.5 mm plugs, with a typical equipment arrangement shown in Figure 4a. The sink/gateway node, which was necessary for collecting the data from node #A1 and node #A2, included a bare LoRa 32u4 board identical to the ones inside the #A1 and #A2 nodes, connected via USB to the main SBC module, namely, a Raspberry Pi unit (e.g., an RPi Model 3B+ unit). The selection of an RPi for implementing the sink/gateway functionality provided the necessary functionality and openness required by end users for efficient delivery and processing of soil-related information. Figure 3: (**a**) Box enclosure arrangements, antenna, and powering attachments for the prototype sensing node; (**b**) overview of the repetitive steps to be followed by the logic of the microcontroller for the periodic monitoring of the instruments connected to it. Data arriving via LoRa to the sink node were stored locally on a microSD card and were also posted to a cloud location (i.e., Google Drive storage space) for easy access and additional post-processing, and they were kept synchronized via the rclone service [31] installed on the RPi unit. Indeed, the measurement results arriving in the dedicated RPi folder were periodically compared with the contents of the corresponding Google Drive directory, which was updated correspondingly. The specific directory could be shared among the different users. The rclone service is designed to match the modern-trend equivalent of the rsync package [32]. According to the assumptions followed in this research, the RPi (sink/gateway) node gathering the peripheral data remained always on, was equipped with an RTC clock in order to provide accurate time stamping of the incoming data regardless of Internet availability, and had access to the cloud via a Wi-Fi access point and to the network infrastructures beyond it (e.g., via ADSL connection lines). A powering unit, including two 18,650 batteries and a charger, and an omnidirectional LoRa antenna completed the sink/gateway equipment set. The antenna had 50 \(\Omega\) output resistance, was vertically polarized, and was suitable for the 868/915 MHz bands; however, it was accompanied by a 3 m coaxial cable, thus losing in practice close to 1 dBi of its rated 5 dBi gain. The full arrangements for the sink/gateway node are shown in Figure 4b. Referring to the arrangements for soil data availability, the selection of the rclone application, along with the Google Drive one, was favored by the widespread use of the latter platform among the end users of the system (e.g., students, farmers, and scientists). In practice, a problem to be envisaged was the one-week duration of the Google security certificates, which were necessary for cooperation with the rclone service. Alternatively, and more traditionally, the data on the RPi were accessed from the end user's computer via the WinSCP tool [33], exploiting the transparent connectivity options provided by the Remote.It cloud service [34]. The software arrangements for remote data access in case the Remote.It and WinSCP combination is used are shown in Figure 5. The Remote.It method paves the way for utilizing a wide set of network tools from the basic SSH console configuration environment to graphical solutions (like the VNC one) and to suitable Web-based services. It is also interesting to mention that the RPi and the LoRa-capable 32u4 microcontroller combination, implementing the gateway, could be programmed remotely via these applications and services.