# IoT-Enabled Precision Agriculture: Developing an Ecosystem for Optimized Crop Management
## 3 Overview of Precision Agriculture
### Communications Protocols  
The communication layer in the proposed system model facilitates interactions among various IoT subsystems using a variety of network protocols. For example, the application layer utilizes lightweight protocols and architectures, such as JSON and REST, encapsulated over HTTP/COAP at the network layer. Additionally, reliable and unreliable protocols are supported at the transport layer, including TCP and UDP. Constrained devices communicate using 6 LowPAN, IPv6, and RPL for routing data packets. Routing among network nodes is achieved through the RPL protocol, which dynamically builds a destination-oriented directed acyclic graph (DODAG) at the sink node. This protocol supports static topologies and mobile nodes and enables efficient traffic flow toward the sink node [54].  
JSON (JavaScript Object Notation) is a lightweight data-interchange format that is easy for humans to read and write and for machines to parse and generate. It is based on a subset of the JavaScript Programming Language. It is commonly used to transmit data between a server and a web application, as well as between different systems. JSON is also language-independent and can be used in any programming language.  
REST (Representational State Transfer) is an architectural style that defines a set of constraints to create web services. It is based on the principles of the HTTP protocol, which is used to transfer data over the internet. RESTful web services are characterized by their ability to be accessed by a URI (Uniform Resource Identifier) and their support for the HTTP methods (GET, POST, PUT, DELETE, etc.). RESTful web services are lightweight, easy to implement, and easily consumed by many clients, including web browsers, mobile devices, and other systems. JSON and REST are commonly used together in IoT systems to transfer data in a lightweight, easy-to-use format that a wide range of devices and systems can access.  
HTTP/COAP (Constrained Application Protocol) is a communications protocol used at the network layer for IoT systems. HTTP is a widely-used protocol for web communication and is typically used for web-based applications. COAP is a specialized web transfer protocol for use with constrained nodes and networks in the IoT. It is designed to use fewer network resources and less bandwidth than HTTP and is optimized for use in low-power and lossy networks, such as those found in IoT systems. It uses DODAG to build routes and support static typologies and mobile nodes.  
DODAG is a data structure used in RPL to build and maintain routes in a low-power and lossy network such as an IoT network. The DODAG is built and maintained by a root node, also known as a sink node, which acts as the central point of the network and is responsible for forwarding data packets to their intended destinations. The DODAG is essentially a tree structure where each node in the network has a specific parent node, and all nodes point toward the root node. The DODAG is directed, meaning that data flows in a specific direction towards the root node, and is acyclic, meaning there are no loops in the data flow. The RPL protocol uses the DODAG to determine the optimal routes for data packets, considering factors such as network congestion, energy efficiency, and link quality. The DODAG also allows for dynamic adjustments to the routes as network conditions change.