In the previous tutorial, features, advantages and limitations of TCP/IP Protocol were discussed. Though, TCP/IP is not best suited for IoT applications due to packet overheads, still being the most common protocol stack on internet, it offer ubiquitous connectivity. An IoT device can be made to communicate with a cloud or server using TCP/IP protocol without any hassle of network programming and network administration. In this project, an IoT device will be designed that could transmit sensor data to ThingSpeak Platform using the TCP/IP protocol.
The TCP/IP protocol despite being most common protocol stack on internet is not much suitable for IoT applications due to large overhead. It is more suitable for applications where reliable delivery of data with high bandwidth in hand is required. The IoT applications generally have limited bandwidth and need swift transfer of small data packets. In such case, the UDP/IP stack is far better than TCP/IP.The User Datagram Protocol (UDP) is the simplest transportation layer protocol used primarily for establishing low-latency and loss tolerating connections between applications on the communication network.
In the previous tutorial, advantages of UDP protocol over TCP/IP in IoT applications were discussed. The UDP protocol has a small overhead of 8 bytes which makes it more suitable for use in the Internet of Things. In this project, the application of UDP protocol in IoT will be demonstrated. In this project, an ESP8266 Wi-Fi modem will be configured as UDP server and a laptop will be used as UDP Client.
The IoT devices have very limited resources like they have embedded processors or controllers, limited RAM and ROM and they need to operate on battery without replacement for weeks, months or even years. Even they have to communicate data swiftly though small in amount but on limited network bandwidth.
In the previous tutorial, advantages of CoAP protocol over TCP/IP and UDP protocols in IoT applications were discussed. The CoAP protocol is specially designed for constraint devices and networks. In this project, the application of CoAP protocol in IoT will be demonstrated. In this project, an ESP8266 Wi-Fi modem will be configured as CoAP server and a laptop will be used as CoAP Client. Both Client and server will be co-located communicating through same Wi-Fi router so, the ESP board will act as a local server. The CoAP Client could send data to the server on a particular port with the help of browser add-on – Copper (Cu) CoAP user-agent. In fact, the Copper (Cu) itself will act as CoAP Client.
The sensors and actuators have an important role in IoT. It the sensors and actuators that enable IoT devices to interact with the physical world. The large IoT applications like smart home, smart transportation, smart grid and many others are intelligent systems that connect the world in an automated way to ease human efforts. The collective aim of such systems is to nurture the concept of IoT which is fulfilled with the use of tiny sensors. The whole Sensor Network is tightly coupled directly or indirectly with communication Network (Internet) where intelligent monitoring, management, and data processing can be achieved via the usage of networked cloud computing devices.
Device to Device Communication has a great role in IOT. In context to IOT systems, this device to device communication usually voids human interaction and control over the devices and the devices are meant to communicate with each other autonomously. In this tutorial, a similar demonstration of Device to Device Communication is presented.
In the previous tutorials, the IOT devices designed were connecting with the internet network via Wi-Fi. Wi-Fi is a wireless standard. It is commonly used to provide data communication among mobile devices and the internet network. Another common standard used for networking devices and computers is Ethernet. Ethernet is most commonly used Local Area Network (LAN) technology. It provides a wired communication to connect the devices to the Internet.
In the previous tutorial, the basics of Ethernet technology were discussed. In this tutorial, the Ethernet technology will be used to connect an Arduino board over internet with a PC. The Arduino based IOT device and the PC will be setup to communicate using MQTT protocol via HiveMQ Broker. An IOT device based on Arduino will be designed in this project. The Arduino will be interfaced with an Arduino Ethernet Shield to connect with a router via Ethernet cable (Cat 5e).
In the previous tutorial, the Ethernet technology was used to connect an Arduino based IOT device with the internet network. The IOT devices can also be connected to internet network using mobile technologies like GSM, CDMA and GPRS. There are two major technologies for data transfers over cellular networks – GSM and GPRS. These two technologies differ from each other on the basis of data rates and the charges they take for their operation.
SIM800 is a popular GSM GPRS modem. It supports General Packet Radio Service (GPRS) for connecting to the Internet. This module has built-in TCP/IP stack that can be accessed serially with AT commands.The modem needs to be configured by connecting it to a PC. In such setup, the SIM800 modem with SIM card acts as TCP client and the PC acts as TCP server.
In the previous tutorial, SIM800 module was configured as TCP-IP Client and a PC was configured as TCP-IP server. The two were setup to communicate over TCP-IP stack using an Arduino UNO as gateway. In this tutorial, the SIM800 will be configured as an MQTT Client and setup to communicate over MQTT protocol with a PC client. In the previous tutorial, the PC was configured as server to set SIM800 modem into working mode. In this project, the PC will serve as another client and communicate with the GSM GPRS modem via HiveMQ broker.
Security in IOT cannot be an afterthought. It is an integral part of IOT development. The idea of IoT is not only to connect the normal daily things to the Internet but also to transfer the data securely among various end points so that smart IoT applications are not only efficient and successful in fulfilling various personal and professional requirements but also highly reliable.
In the previous tutorials, MQTT protocol packets and MQTT security mechanisms were discussed. Now it’s time to start getting hands dirty. For creating a communication network in which multiple IoT devices can communicate with each other via a MQTT broker, it is important to configure IoT devices as MQTT clients. The MQTT is developed on the top of TCP/IP stack, so the devices must have TCP/IP stack with them if they want to communicate to each other via MQTT broker.
In the previous tutorial, it was learnt that how a smart phone and a PC can be set up as MQTT clients and their connection with an MQTT broker can be established. The smart phone was configured as an MQTT client using an android MQTT app – IOT MQTT Dashboard while the PC was configured as MQTT client using a chrome add-on – MQTTLens.Now, in this tutorial, these MQTT clients – Mobile and PC will be made to communicate with each other using MQTT protocol. The communication between the MQTT clients is only possible via MQTT broker.
Security is a prime concern in any IoT application development. The data from the IoT devices is passed to the server/cloud where it may be stored temporarily or for long time to generate analytics. The transportation medium through which the data is passed from the IoT device to the cloud must be secured with implementation of various IoT security measures, so that the data could not be hacked by any Man-in-the-Middle attack.
Internet of Things is meant to empower objects of day to day use with embedded electronics and IT infrastructure. It aims to connect these objects in real time with the internet network and allow them to communicate with other co-located or remote objects. For communicating with each other, the IOT devices need to follow protocols. An application developer need to take care primarily of the implementation of application layer protocols while usually the implementation of network and transportation layer protocols remain at the hand of network administrators or network programmers.
In the previous tutorial, ESP8266 module was used to design a Home Area Network to control an LED light from a remote PC. The PC client was used to send control signals to switch on and off the LED light in the Home Area Network. In this tutorial, the ESP module will be interfaced with DHT-11 temperature sensor and temperature data will be sent to the PC client for real-time temperature monitoring. In this project, instead of LED, the DHT-11 sensor will be interfaced with the ESP8266 on ESP Client side.
Network is the OSI Level 3 layer and is the internet layer in the TCP-IP model. Like Physical and MAC layers, network layer is also part of the infrastructure layer in IOT reference architecture. This layer is responsible for addressing and routing of data packets. At this layer, the datagram from transport layer are encapsulated to data packets and delivered to their destinations using IP addressing. IPv4 had been the standard protocol for network layer until now.
In the previous tutorial, various physical and media access control (MAC) protocol for Personal Area Network (PAN), Home Area Network (HAN) and Local Area Network (LAN) were discussed. In this tutorial, physical and MAC protocols based on RFID and mobile standard will be discussed. There are the following RFID based protocol stacks: RFID, DASH7, NFC.There are the following common mobile standards which are evolving to accommodate IOT applications