# IoT Services for Monitoring Food Supply Chains
## 3 Methodology and Implementation
### Platform Architecture  
Monitoring temperature conditions during transport gained popularity in the business sector during the mid-2000s. This shift was marked by the widespread adoption of sophisticated data loggers and monitoring devices, which were integrated into shipments to mitigate risks associated with temperature variations. These technological advancements help ensure compliance with agreed-upon temperature ranges and provide a comprehensive history of temperature conditions throughout transit. The driving forces behind the evolution of temperature monitoring practices included a growing awareness of the potential risks associated with improper temperature management, increased regulatory requirements, and the demand for higher quality assurance standards. As a result, organisations have increasingly recognised the importance of implementing robust temperature monitoring systems to protect their valuable temperature-sensitive products during transportation [23]. This makes LoRa particularly suitable for applications in remote monitoring and IoT environments, where reliable data transmission is essential for effective decision-making and operational efficiency [24]. In addition to its role in data collection and transmission, the LoRa Gateway also facilitates two-way communication by receiving commands or instructions from the cloud server (Figure 1). These commands are then dispatched to the LoRa end nodes, allowing for remote control and configuration of devices within the network. This capability is crucial for applications requiring real-time adjustments or updates based on the collected data. The LoRa Gateway is the pivotal hub for establishing and managing the LoRa network infrastructure. Its primary function is to collect data transmitted by various LoRa nodes, which communicate wirelessly using the LoRa modulation technology. Once the gateway receives the collected data, it is responsible for relaying it to a cloud server through various forms of IP-based connectivity, including options such as Wi-Fi, Ethernet, or cellular networks. This seamless transfer of information ensures that data collected from the field is accessible in a centralised location for further processing and analysis. Moreover, it is common for multiple gateways to be deployed in a given area, which enhances the network's reliability and robustness. When a LoRa node transmits data, it can be picked up by multiple gateways simultaneously, ensuring redundancy in the data transmission process. This redundancy not only increases the likelihood of successful data delivery but also contributes to the overall resilience of the network, minimising the chances of data loss due to communication failures or interruptions. In essence, the LoRa Gateway plays a vital role in both the operation and stability of the LoRa network, enabling efficient data communication between end nodes and cloud-based applications [25]. Figure 1: Architecture of LoRaWAN network. Data collected by the sensor is transmitted wirelessly to a gateway, which forwards the information to a cloud server. The cloud-based server receives, processes, and stores data transmitted from LoRa Gateways. Users access the collected data from various platforms, offering high scalability. As the number of LoRa sensors increases, the server efficiently manages the influx of information, ensuring optimal performance while maintaining a broad operational range for the sensors. This setup enhances control over data streams, allowing for real-time monitoring and analysis, and empowers users to make informed decisions based on comprehensive insights derived from their sensor networks. To ensure redundancy and robustness in LoRa networks, several protocols and methods are employed to handle message retransmission, utilise multiple channels, and adapt to varying conditions. Automatic Repeat Request (ARQ) protocols, such as Stop-and-Wait, Go-Back-N, and Selective Repeat, help ensure data integrity by resending lost or corrupted packets when acknowledgements are not received [26].