Kumar 2019
Kumar 2019
Kumar 2019
Cryptography
To cite this article: Vishal Kumar, Gayatri Sakya & Chandra Shankar (2019) WSN and IoT
based smart city model using the MQTT protocol, Journal of Discrete Mathematical Sciences and
Cryptography, 22:8, 1423-1434, DOI: 10.1080/09720529.2019.1692449
Article views: 8
WSN and IoT based smart city model using the MQTT protocol
Vishal Kumar *
Gayatri Sakya †
Chandra Shankar §
Department of Electronic and Communication Engineering
JSS Academy of Technical Education
Noida 201301
Uttar Pradesh
India
Abstract
The Internet of things in integration with wireless sensor networks changed the world
exponentially by connecting a huge number of devices and providing the ability to control
them remotely and globally. This research work is emphasized on proposing the smart city
model and implementation that model based on IoT using MQTT protocol. The comparison
is done with HTTP protocol. HTTP is used for transferring the information using request and
response model so require control packets overhead. To handle the limitation of HTTP, MQTT
is proposed. It uses publish/subscribe model, reduces control packets overhead and suitable
for IoT. It uses “Named based routing” and prevents IP address in IoT data transfer. The smart
city model is proposed and developed using Network Simulation Software (Cisco Packet
Tracer v7.2).Cisco introduces IoT and MQTT feature in version 7.1. Here Message Queuing
Telemetry Transport (MQTT) protocol is used which gives fast and reliable performance for
IoT devices. A network model is developed with multiple sensors and IoT Devices which acts
as MQTT client. Here a data center is created which has multiple Servers (MQTT Broker).
Using the MQTT broker all the IoT devices can be monitored by just logging in to the broker.
A prototype model is implemented and tested in real time using Node MCU. The devices
are remotely monitored from anywhere in the world which fulfill the requirement of smart
city model. Future aspects include the integration of machine learning algorithms in the
protocols developed for IoT for quick smart decisions in monitoring the critical applications.
©
1424 V. KUMAR, G. SAKYA AND C. SHANKAR
1. Introduction
In Today s World, Security and Storage are key points of any
organization. Users want more security towards their data and also
want to compress data in less space. Smart City model will use smart
phones for its practical implementations as we already have a readymade
infrastructure. To accomplish that,we need some connectivity across the
city at every point. Using Router, Switch, Firewall, Server, Access point,
Cell Tower, Optical cables we can achieve this goal. After that, we need
good sensors and Actuators that can give us information. By processing
this information we can control things. This all termed as IoT (Internet
of things) where internet denoted as connectivity and things denoted as
physical devices. This paper discusses the HTTP VS MQTT protocol on
cisco packet tracer and node MCU. Usually, accessibility to computer
network requires application protocols over transport layer of Internet
protocol stack. Hyper Text Transfer Protocol (HTTP) is one of them.
When HTTP is applied to IoT , a large amount of small data blocks are
transmitted and received. The problem of control overhead and hence
performance degradation is noticed. To overcome these problems MQTT
is used. It introduced “Named based routing” and gives an alternate for
IP address based routing for IoT.
We create smart city model using Network Simulation Software (Cisco
Packet Tracer v7.2) .Cisco introduces IoT and MQTT feature in version 7.1.
The previous suggested models are based on RESTFUL Protocol which
is a heavy weight protocol. Here Message Queuing Telemetry Transport
(MQTT) protocol is used which gives QoS and reliability to IoT devices.
A network model is developed with multiple sensors and IoT Devices
which are MQTT client. The model is tested implemented and tested
in real time using Node MCU. It is observed that the appliances in the
city are remotely monitored and controlled through user.There are some
standard protocols which are used to connect things to the internet like
MQTT, CoAP, AMQP, WebSocket, Node, etc. A newer version of packet
tracer has MQTT feature. In the second section of paper literature survey
is done and the third section does simulation and comparison of HTTP
protocol in Cisco packet tracer. In the third section a smart city model is
proposed using MQTT protocol. In the fourth section, the proposed model
is implemented in Cisco Packet Tracer and also Hardware implementation
is done. In the fifth section, the testing is done of the proposed model.
Finally section six ends with conclusion and future scope for the proposed
work [22-24].
WSN AND IOT BASED SMART CITY MODEL 1425
Fig. 1
HTTP IoT Network
al discussed in detail the IoT [12] and G. Sakya et. al discussed wireless
sensor networks for critical applications [13]. So integration of IoT and
WSN [18-21] is an important aspect in smart city model implementation
[14-17].
Fig. 2
Packet capture
WSN AND IOT BASED SMART CITY MODEL 1427
Fig. 3 (a)
MQTT protocol model
Fig. 3(b)
MQTT IoT Network
1428 V. KUMAR, G. SAKYA AND C. SHANKAR
Fig. 4
Packet Capture of MQTT Network
Fig. 5
Smart City Scenario
WSN AND IOT BASED SMART CITY MODEL 1429
Fig. 6
Smart Home and Connection of sensors in Home
IP, OSPF, etc. After assigning an IP address to interfaces of router and end
devices.
All the home, offices, etc are connected to routers, DSL Modem and
wireless AP.
Then we have to place sensors and actuators at a suitable place
according to their respective need. To make a smart city we need to make
first smart home, offices, hospital, school, police station, etc. All the sensors
and devices connected to Access Point (AP) as shown in figure 6.Then
we have to create a server as shown in figure 7 in area which provides
services to those devices. Some Important services are DHCP, DNS, AAA,
HTTP, FTP, etc.
To install MQTT Broker on the server first goto the programming tab
and click on a new project then select Global script Project and click on
create button. Then click on Install to desktop and then click on Run. We
need to go to the Desktop tab search for MQTT Broker Icon. Then create a
username and password. The IP address of the broker is same as the local
machine IP.For MQTT client select end devices like laptop IoT devices or
MCU etc. Go to I/O Config tab select show desktop then click the desktop
tab and search for user app manager. Go to the available tab and install
the MQTT client. Then go to MQTT Client application in Desktop.Here
we have to give a broker IP address, Username, and Password. After
Connecting to MQTT broker we get an event log message. Next step is
Fig. 7
Server
1430 V. KUMAR, G. SAKYA AND C. SHANKAR
Fig. 8
Create new block in Adafruiteio Dashboard
Fig. 9
Node MCU with 1 channel relay
WSN AND IOT BASED SMART CITY MODEL 1431
Fig. 10
Adafruite IO Dashboard
5. Results
After Successful completion of the hardware setup, we go to the
MQTT broker and login the credential. By publishing our message we can
control our home devices. So every smart home, Offices, Motor vehicle in
the city makes city smart. We try to do that in Cisco packet tracer. But in
packet tracer, we use traditional HTTP protocol at the application layer.
MQTT is a good protocol over HTTP and it has the ability to send data
packets faster than HTTP. The implementation is successfully completed
and the model developed can be used in real time for controlling several
devices during the Smart city development in real time application.
References
[1] Krishna, P.G., Ravi, K.S., Kumar, V.S. and Kumar MS: Implementa-
tion of MQTT Protocol On Low Resourced Embedded Network, Int.
J. Pure Appl. Math (IJPAM), 116, pp.161-166 (2017).
[2] Isa Shemsi: Implementing Smart Home using Cisco Packet Tracer
Simulato, International Journal of Engineering Science Invention Research
& Development, Vol. iv, Issue vii, January (2018).
[3] R. K. Kodali and S. Soratkal :MQTT based home automation system
using ESP826, IEEE Region 10 Humanitarian Technology Conference
(R10-HTC), Agra, 2016, pp. 1-5,(2016)
[4] T. Yokotani and Y. Sasaki : Comparison with HTTP and MQTT
on required network resources for IoT,2016 International Confer-
ence on Control, Electronics, Renewable Energy and Communications
(ICCEREC),Bandung,2016,pp.1-6, (2016).
[5] M Poongothai, A L Karupaiya and R Priya dharshini : Implementa-
tion of IoT based Smart Laboratory, International Journal of Computer
Applications 182(15):31-34, September ( 2018)
[6] J. Lohokare, R. Dani, S. Sontakke and R. Adhao :Scalable tracking
system for public buses using IoT technologies , 2017 International
Conference on Emerging Trends & Innovation in ICT (ICEI), Pune,
2017,pp.104-109, (2017)
[7] P Gopi Krishna, K Sreenivasa Ravi, V.S.S Sailendra Kumar, M.V.S.N
Sai Kumar: Implementation of MQTT protocol on low resourced em-
bedded network” , International Journal of Pure and Applied Mathemat-
ics, pp 161-166,(2017)
[8] R A Atmoko, R Riantini, M K Hasin : IoT real time data acquisition
using MQTT protocol”, Journal of Physics Conference Series 853(1),
May (2017)
[9] F.Jerald, M.Anand, N.Deepika: Design of an Industrial IOT Architec-
ture Based on MQTT Protocol for End Device to Cloud Communica-
tion, International Journal of Recent Technology and Engineering (IJRTE)
ISSN: 2277-3878, Volume-7, Issue-6S2, April (2019)
WSN AND IOT BASED SMART CITY MODEL 1433