# Smart Irrigation Systems from Cyber-Physical Perspective: State of Art and Future Directions
## 3 Problem Space
### IoT Layer Dimension
#### 3.1.3 Application Layer  
A smart irrigation system is a blend of hardware and software technologies. We have covered hardware in the perception layer. The application layer emphasizes the software side. Several protocols are widely employed in smart irrigation systems within the application layer, such as HTTP (Hypertext Transfer Protocol), MQTT (Message Queue Telemetry Transport), and CoAP (Constrained Application Protocol). Our study focuses on the MQTT and CoAP, which are widely used in typical IoT systems [70; 71]. MQTT is a protocol that leverages message publishing and message subscription between IoT devices and brokers to establish communication among devices and users [72]. The benefits of using MQTT include but are not limited to the following. (i) _Lightweight and Efficiency:_ In the initial design of MQTT, it targets the use of minimal battery loss and bandwidth usage when communicating with the satellite [73]. That is why it can be widely used in small microcontrollers. (ii) _Scalability:_ MQTT has built-in features that support communication for IoT devices because of its low energy consumption and minimizing data size during transmission. Hence, the MQTT protocol can be used to connect a large \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Range** & **Technology** & **Data Rate** & **Power Consumption** & **Distance Range** & **Security** \\ \hline Short & WiFi & High & High (1 W) & Up to 100 m & High (WPA2/WPA3) \\ \hline Short & Bluetooth & Medium (1–3 Mbps) & High (1 W) & Up to 100 m & Medium (AES-128) \\ \hline Short & Bluetooth LE & Medium (1 Mbps) & Low (10-500 mW) & Up to 100 m & Medium (AES-128) \\ \hline Short & ZigBee & Low (250 Kbps) & Low (1 mW) & Up to 20 m & Medium (AES-128) \\ \hline Short & RFID & Low (423 Kbps) & Low (1 mW) & Up to 1 m & Very Low (N/A) \\ \hline Long & LoRaWAN & \
\begin{tabular}{c} Very Low \\ (0.3–50 Kbps) \\ \end{tabular} & Low (up to 25 mW) & Up to 10 km & Medium (AES-128) \\ \hline Long & NB-IoT & Low (200 Kbps) & Low (up to 17 mW) & Up to 15 km & Medium (AES-128) \\ \hline Cellular & GPRS & Low (171–384 Kbps) & High (1–3 W) & Up to 26 km &
\begin{tabular}{c} Low \\ (A5/3/4) \\ \end{tabular} \\ \hline Cellular & 5G & High (20 Gbps) & High (1–5 W) & Up to 28 km & High (256-bit) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Wireless technology overview. number of devices, improving scalability. (iii) _Security:_ To secure IoT systems, MQTT makes it easy for developers to implement encryption mechanisms like OAuth, TLS1.3, Customer Managed Certificates, etc. (iv) _Robust_: Python and others widely support MQTT protocol implementation. It is also commonly used in open-source because of good MQTT maintenance. Figure 5 demonstrates how to send soil moisture value through MQTT in a typical irrigation system. Another prominent IoT protocol is CoAP [74]. While MQTT relies on message passing via an intermediary MQTT broker using a publish/subscribe model, CoAP facilitates state information transmission between a client and a server. CoAP is developed primarily for constrained devices. Constrained devices are characterized by their restricted resources, including limited memory, storage, computational capabilities, constrained battery power, and restricted bandwidth [75]. Using the soil moisture sensor data as an example, the message between clients and sensors via CoAP can be shown in Figure 6.  
Figure 5: MQTT flow of messages with soil moisture sensor.