# An IoT-Based Solution for Intelligent Farming +
## 2 Related Work
### IoT/M2M Protocols and Communication Technologies
#### 2.1.7 IoT Gateways  
The diversity of IoT applications, devices and protocols, creates a natural lack of interoperability. Consequently, to allow the communication of devices that rely on different communication technologies or devices that use different application protocols, an intermediate device is required, typically known as an IoT gateway. In addition, several solutions can be found in the literature, some based on academic research projects that aim at solving particular problems, while others consider bigger research and standardization proposals.  
In [43], an IoT gateway that enables the interoperability between Zigbee and GPRS protocols is presented, being tailored for applications composed of light, temperature and humidity sensors. A similar work is proposed by [44], with an extended number of supported devices and protocols. This Smart IoT gateway allows a multifunctional configuration and supports protocols such as Zigbee, RFID and RS485. Furthermore, considering the popularity of smartphones, a smartphone gateway is proposed in [45]. It supports several protocols like Wi-Fi, ANT+, Bluetooth, NFC, ZigBee and 6 LoWPAN. A similar approach is followed on [46], being presented a smartphone-centric solution on which the main links supported on the connection to sensors are based on BLE and IPv6. Furthermore, on [47], a wireless IoT gateway is proposed, mainly supported on APIs composed of Restful [48] web services. The gateway architecture, besides the REST API, includes dynamic device discovery in order to allow the insertion or removal of devices and a management connection module to handle devices that do not support REST.  
Besides these academic research works, several standards that specify the deployment of IoT gateways for supporting M2M/IoT services have been developed. One of the most relevant ones is the OneM2M [49], that has been developed with the participation of important standard development organizations and consortiums (including, for instance, ETSI, TIA and Broadband forum), and powerful companies (e.g., Cisco, Intel, Samsung, and Ericsson). OneM2M provides a horizontal platform that supports secure, reliable and efficient [20] operations of multiple IoT/M2M services, particularly those relying on REST APIs. It supports multiple existing application protocols such as HTTP, CoAP and MQTT, and communication technologies such as ZigBee, Bluetooth, WiFi and Cellular networks on the sensing domain. To turn agile and normalize the management operations, OneM2M also supports the OMA-DM and BBF TR-069 protocols. Other turnkey solutions are available, being differentiated by the application protocols and communications technologies that they support. Intel [50] provides a gateway that supports protocols such as MQTT, WiFi, VPN, Bluetooth, Cellular technologies and Zigbee, but also Serial and USB interfaces. SmartM2M [51] supports HTTP, COAP, Cellular technologies, Zigbee, Bluetooth and Wifi. The Lightweight M2M (LVM2M) [52] supports COAP and 6 LowPAN technologies.  
In sum, we can find a wide range of IoT gateways, some specially designed for certain applications, while others try to offer an horizontal integration of a diversity of IoT/M2M protocols and communication technologies. In common, they share the goal of creating an integrated IoT platform that could support multiple applications, protocols and standards. However, none of them fulfill completely the requirements of the SheepIT project, mainly in what concerns the local support of application-level services, such as an improved localization mechanism and system management. Even if some of those solutions could be customized, the cost of such integration could be economically unaffordable. Furthermore, and despite the great advantages that a fully integrated IoT/M2M gateway could offer, the resources that it takes can be superfluous considering the intelligent farming scenario, where the simplicity, low cost and high autonomy are the key features.