# An IoT-Based Solution for Intelligent Farming +
## 2 Related Work
### IoT/M2M Protocols and Communication Technologies  
IoT encompasses an ample number of communication networks, either WSN, M2M, CPS, or a combination of them. From these, M2M communications are seen as the foundation of IoT platforms [6] since they allow the ubiquitous and autonomous communications between devices without human intervention [25]. M2M networks comprise both wired and wireless solutions but, the increasing need of mobility and scalability, together with the inherent high installation costs of wired solutions, have led to an increasing number of M2M wireless options. These can be organized in three groups (Figure 1): firstly, the _capillary_ solutions [26], where a local network coexists with a local gateway that makes the interaction with Wide Area Networks. Some examples are the Wireless Local Area Networks (WLANs) such as WiFi or HiperLan, and the Short-range Wireless solutions such as Bluetooth, ZigBee and Z-Wave. These solutions are characterized by a data rate that can go from bits per second to megabits per second; secondly, the popular cellular networks, which have a greater communication range compared to the capillary solutions, being the 2G, 3G, 4G or more recently the Long Term Evolution (LTE), some examples; finally, addressing the specific IoT/M2M communication requirements, particularly power consumption and autonomy, a new set of technologies started to gain relevance, the denominated Low-Power Wide-Area Networks (LPWANs). These technologies combine the wide range capability of cellular networks with the lower power consumption of _capillary_ solutions [27]. Cellular networks and the WLAN's were not considered to be used in the scope of the SheepIT project, due to their higher power consumption and price. Thus, our targets are the short-range wireless communications and LPWAN solutions. Among these, some may resort to gateways to interact with other networks while others resort to proprietary protocols. This heterogeneity of approaches has led to the definition of distinctive IoT protocol stack models [7] with three, four or five layers. The simplest one is based on three layers: (i) The Perception Layer, which is the lowest layer and includes all the functionalities related with physical sensors; (ii) The Network Layer, which is responsible for ensuring a seamless transmission of the data gathered on the Perception Layer to the Application Layer; (iii) and the Application Layer that allows the customization of different services according to user requirements and needs. However, some authors consider this approach too simplistic and hence a model of five layers gained popularity [8]. On this model, besides the Perception and Application Layers, already included in the three-layer model, three other layers are included, namely: (i) Transport or Object abstraction Layer, responsible for receiving the data gathered on the Perception Layer and making it available to upper layers; (ii) Processing, Service management or Middleware Layer that deals with the huge amount of data that is gathered and with the big heterogeneity of objects within the Perception Layer; and (iii) Business Layer, that allows the management of the whole IoT system. Notwithstanding, due to the interoperability and popularity of IP, many practical deployments of IoT applications follow a typical four layer TCP/IP architecture (Physical and MAC Layer, Network Layer, Transport Layer and Application Layer) with the necessary adaptations, particularly in terms of the protocols that can be used on each layer. Consequently, and as our proposed stack is also based on four layers, the following survey tackles the most popular protocols used on those layers, as suggested by [PERSON] [9] and illustrated on Figure 2. Furthermore, after reviewing those protocols we also survey two additional approaches. On the one hand, we survey the LPWAN technologies because of their potentiality when applied to IoT/M2M scenarios.