# An IoT-Based Solution for Intelligent Farming +
Footnote †: 15 December 2018; Accepted: 27 January 2019; Published: 31 January 2019  
[PERSON]  
1 DETI/IT--Universidade de Aveiro, 3810-193 Aveiro, Portugal; [EMAIL_ADDRESS] AFTmec, 3680-264 Sao Joao da Serra, Portugal; [EMAIL_ADDRESS] AFTmec, 3680-264 Sao Joao da Serra, Portugal; jose@iafarmtec. When applying IoT to the agriculture domain, Machine-to-Machine (M2M) communications are a central key, enabling ubiquitous and autonomous communications among multiple devices without human mediation [6]. Thus, requirements such as efficiency, scalability, low-cost hardware and low-power consumption are transposed to this kind of communications. However, these requirements are dramatically dependent on the application scenarios, which has led to the emergence of a vast number of protocols, standards, communication stacks and architectures, each one addressing specific subsets of issues and/or applications. Commonly, these architectures are structured as protocol stacks with different numbers of layers [7], enabling levels of abstraction between them and the use of different protocols. The simplest one is based on three layers: the Perception Layer, the Network Layer and the Application Layer. However, as this architecture is considered too simplistic, other models with additional layers were proposed [8]. Albeit the most trendy one is based on five layers, practical IoT systems implementations commonly use four layers (Physical and MAC Layer, Network Layer, Transport Layer and Application Layer) [9], following an IP-based network architecture. Our proposal is based on a four layer communication stack, and thus, in this paper the most relevant protocols on each one of these layers are presented. Succinctly, IEEE.802.15.4 [10] is one of the most popular technologies used on the Physical and MAC layers. At the Network layer, the Internet Protocol (IP), either IPv4 and IPv6, is generally used, eventually with adaptation layers (e.g., 6 LoWPAN [11]) to deal with resource-constrained devices. Finally, at the Application Layer, solutions such as the Constrained Application Protocol (CoAP) [12], the Advanced Message Queuing Protocol (AMQP) [13], the Message Queuing Telemetry Transport (MQTT) [14] and the Hypertext Transfer Protocol (HTTP) [15] are commonly found. However, several other approaches coexist, due to the high heterogeneity of this kind of application and increasing need for low-cost and low-power solutions. SIGFOX [16], NB-IOT [17], LTE-M [18] and LoRa [19] are some popular examples that are part of the Low-Power Wide-Area Network (LPWAN) technologies. These protocols share the low energy consumption at expenses of limited functionality and bandwidth. This heterogeneity of solutions also led to the development of several IoT gateways (hardware and standards) [20] to allow the interaction between different networks, protocols and communication technologies. Here, most research efforts are focused on the horizontal integration of different protocols and communication technologies, leaving aside additional services that may be relevant for some IoT applications. Despite the significant research effort devoted to M2M/IoT applications in recent years, there are still practical cases that exhibit requirements and constraints that are not addressed nor satisfied by existing solutions. One of these applications is addressed by the SheepIT project [21], which aims at deploying an IoT-based solution for monitoring, condition and managing flocks of sheep, such that animals could weed vineyard cultures (or similar ones) in an environmentally-friendly way. This application shares many of the common IoT features and requirements. For instance:  
* The amount of data exchanged is relatively low and size limited;
* Devices shall have low size and weight;
* To avoid constant battery replacements and/or recharges, a high autonomy is required;
* The geographical area to be covered can be relatively vast;
* The system shall be robust and reliable.