Introduction to IoT Protocols
Introduction to IoT Protocols
INTERNET OF THINGS
UNIT-I
INTRODUCTION OF IOT
IoT comprises things that have unique identities and are connected to
internet. By 2020 there willbe a total of 50 billion devices /things
connected to internet. IoT is not limited to just connectingthingsto
theinternet butalso allow things to communicate and exchange data.
Definition:
A dynamic global n/w infrastructure with self configuring capabilities
based on standard and interoperable communication protocols where
physical and virtual ―things ‖have identities, physical attributes and
virtual personalities and use intelligent interfaces, and are seamless
lyintegratedintoinformationn/w,oftencommunicatedataassociatedwit
husersandtheirenvironments.
Characteristics:
Dynamic&SelfAdapting:IoTdevicesandsystemsmayhavethecapabilityto
dynamically adapt with the changing contexts and take actions based
on their operatingconditions,user‘s context or sensedenvironment.
Eg:thesurveillancesystemisadaptingitselfbasedoncontextandchangingc
onditions.
Self Configuring: allowing a large number of devices to work together
to provide certainfunctionality.
InterOperableCommunicationProtocols:supportanumberofinteropera
blecommunicationprotocolsanscancommunicatewithotherdevicesand
alsowithinfrastructure.
UniqueIdentity:
EachIoTdevicehasauniqueidentityandauniqueidentifier(IPaddress).
IntegratedintoInformationNetwork:thatallowthemtocommunicateand
exchangedatawith otherdevices andsystems.
ApplicationsofIoT:
Home
Cities
Environment
Energy
Retail
Logistics
Agriculture
Industry
Health&LifeStyle
PhysicalDesignOfIoT
ThingsinIoT:
The things in IoT refers to IoT devices which have unique identities
and perform remote
sensing,actuatingandmonitoringcapabilities.IoTdevicescanexchangeda
twithotherconnecteddevicesapplications.Itcollectsdatafromotherdevic
esandprocessdataeitherlocallyorremotely.
An IoT device may consist of several interfaces for communication to
other devices both wiredandwireless.Theseincludes(i)I/O
interfacesforsensors,(ii) Interfacesforinternetconnectivity
memoryandstorageinterfacesand(iv)audio/videointerfaces.
IoTProtocols:
Link Layer : Protocols determine how data is physically sent over the
network‘sphysical layer or medium. Local network connect to which
host is attached. Hosts on thesame link exchange data packets over the
link layer using link layer protocols. Link layerdetermines how packets
are coded and signaled by the h/w device over the medium towhichthe
host isattached.
Protocols:
802.3-
Ethernet:IEEE802.3iscollectionofwiredEthernetstandardsforthelinklay
er.Eg: 802.3 uses co-axial cable; 802.3i uses copper twisted pair
connection; 802.3j usesfiberoptic connection; 802.3aeuses Ethernet
overfiber.
802.11-
WiFi:IEEE802.11isacollectionofwirelessLAN(WLAN)communicationsta
ndards including extensive description of link layer. Eg: 802.11a
operates in 5GHzband, 802.11b and 802.11g operates in 2.4GHzband,
802.11n operatesin 2.4/5GHzband,802.11acoperates in 5GHz band,
802.11adoperates in60Ghzband.
802.16 - WiMax: IEEE802.16 is a collection of wireless broadband
standards includingexclusivedescriptionof linklayer.
WiMaxprovidedatarates from1.5 Mb/sto 1Gb/s.
802.15.4-LR-WPAN: IEEE802.15.4 is a collection of standards for low
rate wirelesspersonal area network(LR-WPAN). Basis for high level
communication protocols such asZigBee.Provides data rate from
40kb/s to250kb/s.
2G/3G/4G-MobileCommunication:Datarates from
9.6kb/s(2G)toupto100Mb/s(4G).
Protocols:
IPv4:InternetProtocolversion4 isusedtoidentifythedeviceson
an/wusingahierarchicaladdressingscheme.32bitaddress.Allowstotalof
2**32addresses.
IPv6:InternetProtocolversion6uses128bitaddressschemeandallows2**
128addresses.
6LOWPAN:
(IPv6overLowpowerWirelessPersonalAreaNetwork)operatesin
2.4GHzfrequencyrangeanddata transfer 250kb/s.
TransportLayer: Providesend-to-
endmessagetransfercapabilityindependentoftheunderlying n/w. Set
up on connection with ACK as in TCP and without ACK as in
UDP.Provides functions such as error control, segmentation, flow
control and congestion control.Protocols:
TCP:TransmissionControlProtocolusedbywebbrowsers(alongwithHTT
PandHTTPS), email(along with SMTP, FTP). Connection oriented and
stateless protocol. IPProtocol deals with sending packets, TCP ensures
reliable transmission of protocols inorder.Avoids n/w congestion and
congestioncollapse.
UDP:UserDatagramProtocolisconnectionlessprotocol.Usefulintimesen
sitiveapplications,verysmalldataunitstoexchange.Transactionoriented
andstatelessprotocol.Does not provideguaranteeddelivery.
ApplicationLayer:Defineshowtheapplicationsinterfacewithlowerlayerp
rotocolstosenddata over then/w. Enablesprocess-to-process
communication usingports.
Protocols:
HTTP: Hyper Text Transfer Protocol that forms foundation of WWW.
Follow request-responsemodel Statelessprotocol.
CoAP:ConstrainedApplicationProtocolformachine-to-
machine(M2M)applicationswithconstrained devices,constrained
environmentandconstrainedn/w.Usesclient-server architecture.
WebSocket:allowsfullduplexcommunicationoverasinglesocketconnecti
on.
MQTT: Message Queue Telemetry Transport is light weight messaging
protocol basedon publish-subscribe model. Uses client server
architecture. Well suited for constrainedenvironment.
XMPP: Extensible Message and Presence Protocol for real time
communication andstreaming XML data between network entities.
Support client-server and server-servercommunication.
DDS: Data Distribution Service is data centric middleware standards
for device-to-deviceormachine-to-machinecommunication.
Usespublish-subscribemodel.
AMQP: Advanced Message Queuing Protocol is open application layer
protocol forbusinessmessaging. Supports both point-to-pointand
publish-subscribemodel.
LOGICALDESIGNofIoT
Referstoanabstractrepresentofentitiesandprocesseswithoutgoingintot
helowlevelspecifiesofimplementation.
1)IoTFunctionalBlocks 2)IoTCommunicationModels3)IoTComm.APIs
IoTFunctionalBlocks:Providethesystemthecapabilitiesforidentification
,sensing,actuation, communication andmanagement.
Device:An
IoTsystemcomprisesofdevicesthatprovidesensing,actuation,monitorin
gandcontrolfunctions.
Communication:handlesthecommunicationforIoTsystem.
Services:fordevicemonitoring, devicecontrolservices,
datapublishingservicesandservicesfor devicediscovery.
Management:Provides variousfunctionstogoverntheIoTsystem.
Security:SecuresIoTsystemandpriorityfunctionssuchasauthentication,
authorization,messageandcontext integrityand datasecurity.
Application:IoTapplicationprovideaninterface
thattheuserscanusetocontrolandmonitorvarious aspectsofIoTsystem.
IoTCommunicationModels:
Request-ResponseModel:
In whichtheclientsends requesttotheserverand
theserverrepliestorequests. Is astatelesscommunicationmodel
andeachrequest-response pairisindependent ofothers.
Publish-SubscibeModel:
Involvespublishers,brokersandconsumers.Publishersaresourceofdata.
Publisherssenddatato the topics which are managed by the broker.
Publishers are not aware of the consumers.Consumers subscribe to the
topics which are managed by the broker. When the broker
receivesdataforatopicfrom thepublisher, itsends the datato all the
subscribedconsumers.
Push-Pull Model: in which data producers push data to queues and
consumers pulldata from the queues. Producers do not need to aware
of the consumers. Queues help indecouplingthemessagebetween the
producers andconsumers.
ExclusivePair:isbi-
directional,fullyduplexcommunicationmodelthatusesapersistent
connection between the client and server. Once connection is set up it
remainsopen until the client send a request to close the connection. Is
a stateful communicationmodeland server is awareof all the
openconnections.
IoTCommunicationAPIs:
RESTbasedcommunicationAPIs(Request-ResponseBasedModel)
WebSocketbasedCommunicationAPIs(ExclusivePairBasedModel)
RESTbasedcommunicationAPIs:RepresentationalStateTransfer(REST)i
sasetofarchitectural principles by which we can design web services
and web APIs that focus on asystem‘sresourcesandhaveresourcestates
areaddressed andtransferred.
The REST architectural constraints: Fig. shows communication
between client server withRESTAPIs.
Client-Server:Theprinciplebehindclient-
serverconstraintistheseparationofconcerns.Separationallows
clientand server tobeindependentlydeveloped and updated.
Stateless: Each request from client to server must contain all the info.
Necessary to understandtherequest, andcannot takeadvantageof
anystored context on theserver.
Cache-able: Cache constraint requires that the data within a response
toa request be implicitlyor explicitly labeled as cache-able or non-
cacheable. If a response is cache-able, then a clientcacheis given
therightto reuse that response dataforlater, equivalentrequests.
Layered System: constraints the behavior of components such that
each component cannot seebeyondtheimmediate layerwith which
theyareinteracting.
User Interface: constraint requires that the method of communication
between a client and aservermust beuniform.
Code on Demand: Servers can provide executable code or scripts for
clients to execute in theircontext. This constraint is theonlyonethat is
optional.
Request-ResponsemodelusedbyREST:
RESTful webservice is a collection of resources which are represented
by URIs. RESTful webAPI has a base URI(e.g:
http://example.com/api/tasks/). The clients and requests to these
URIsusingthemethodsdefinedbytheHTTPprotocol(e.g:GET,PUT,POSTor
DELETE).ARESTfulweb service cansupport variousinternetmediatypes.
WebSocketBasedCommunicationAPIs:WebSocketAPIsallowbi-
directional,fullduplexcommunicationbetweenclientsandservers.WebS
ocketAPIsfollowtheexclusivepair communicationmodel.
IoTEnablingTechnologies
IoTisenabledbyseveraltechnologiesincludingWirelessSensorNetworks,
CloudComputing, Big Data Analytics, Embedded Systems, Security
Protocols and
architectures,CommunicationProtocols,WebServices,Mobileinternetan
dsemanticsearchengines.
Wireless Sensor Network(WSN): Comprises of distributed devices with
sensors whichare used to monitor the environmental and physical
conditions. Zig Bee is one of the mostpopularwireless technologies
used byWSNs.
WSNsusedinIoTsystemsaredescribedasfollows:
WeatherMonitoringSystem: in whichnodes collect temp,
humidityandotherdata,which is aggregatedand analyzed.
Indoor air quality monitoring systems: to collect data on the indoor air
quality andconcentrationofvariousgases.
SoilMoistureMonitoringSystems:tomonitorsoilmoistureatvariouslocati
ons.
SurveillanceSystems:useWSNsforcollectingsurveillancedata(motiondat
adetection).
SmartGrids: useWSNsformonitoring gridsat variouspoints.
StructuralHealthMonitoringSystems:UseWSNstomonitorthehealthofstr
uctures(building, bridges) by collecting vibrations from sensor nodes
deployedatvarious points in thestructure.
CloudComputing:Servicesareofferedtousersindifferentforms.
Infrastructure-as-a-service(IaaS):provides users the ability to
provision computingand storage resources.These resources are
provided to the usersasa virtualmachineinstancesand virtualstorage.
Platform-as-a-Service(PaaS):providesuserstheability
todevelopanddeployapplication in cloud using the development tools,
APIs, software libraries andservicesprovided bythecloud
serviceprovider.
Software-as-a-Service(SaaS): provides the user a complete software
application ortheuser interfaceto theapplicationitself.
CommunicationProtocols: formtheback-bone
ofIoTsystemsandenablenetworkconnectivityand
couplingtoapplications.
Allowdevicestoexchangedataovernetwork.
Definetheexchangeformats,
dataencodingaddressingschemesfordeviceandroutingof packets from
sourcetodestination.
Itincludessequencecontrol,flow controland
retransmissionoflostpackets.
IoT Level6: System has multiple independent end nodes that perform
sensing and/oractuation and sensed data to the cloud. Data is stored in
the cloud and application is cloudbased as shown in fig. The analytics
component analyses the data and stores the result
intheclouddatabase.Theresultsarevisualizedwithcloudbasedapplicatio
n.Thecentralizedcontrollerisawareofthestatusofalltheendnodesandsen
dscontrolcommandstonodes.AnexampleofaLevel6IoTsystemforWeathe
rMonitoringSystem.
DOMAINSPECIFICIoTs
HomeAutomation:
Smart Lighting: helps in saving energy by adapting the lighting to the
ambientconditionsand switching on/offor dimingthe light
whenneeded.
Smart Appliances: make the management easier and also provide
status informationtotheusersremotely.
Intrusion Detection: use security cameras and sensors(PIR sensors
and door sensors)to detect intrusion and raise alerts. Alerts can be in
the form of SMS or email sent totheuser.
Smoke/
GasDetectors:Smokedetectorsareinstalledinhomesandbuildingstodete
ct smoke that is typically an early sign of fire. Alerts raised by smoke
detectorscan be in the form of signals to a fire alarm system. Gas
detectors can detect thepresenceof harmfulgases such as CO, LPGetc.,
Cities:
Smart Parking: make the search for parking space easier and
convenient for drivers.Smart parking are powered by IoT systems that
detect the no. of empty parking slotsandsend information overinternet
to smart applicationbackends.
SmartLighting:forroads,parksandbuildingscanhelpinsavingenergy.
Smart Roads: Equipped with sensors can provide information on
driving condition,travel time estimating and alert in case of poor
driving conditions, traffic conditionandaccidents.
Structural Health Monitoring: uses a network of sensors to monitor the
vibrationlevelsin the structures such asbridgesand buildings.
Surveillance: The video feeds from surveillance cameras can be
aggregated in cloudbasedscalable storagesolution.
EmergencyResponse:IoTsystemsforfiredetection,gasandwaterleakaged
etection can help in generating alerts and minimizing their effects on
the criticalinfrastructures.
Environment:
Weather Monitoring: Systems collect data from a no. of sensors
attached and sendthe data to cloud basedapplications and storage
backends. The data collected incloudcan then beanalyzedand
visualized bycloudbasedapplications.
Air Pollution Monitoring: System can monitor emission of harmful
gases(CO2,
CO,NO,NO2etc.,)byfactoriesandautomobilesusinggaseousandmeteorolo
gicalsensors. The collected data can be analyzed to make informed
decisions on pollutionscontrolapproaches.
Noise Pollution Monitoring: Due to growing urban development, noise
levels incities have increasedand evenbecome alarmingly highin
somecities.IoT basednoise pollution monitoring systems use a no. of
noise monitoring systems that aredeployed at different places in a city.
The data on noise levels from the station iscollected on servers or in
the cloud. The collected data is then aggregated to generatenoise maps.
Forest Fire Detection: Forest fire can cause damage to natural
resources, propertyandhuman life. Earlydetection offorestfire can help
inminimizingdamage.
RiverFloodDetection:Riverfloodscancausedamagetonaturalandhuman
resources and human life. Early warnings of floods can be given by
monitoring
thewaterlevelandflowrate.IoTbasedriverfloodmonitoringsystemusesa
no.ofsensornodes that monitorthe waterlevel andflowratesensors.
Energy:
Smart Grids: is a data communication network integrated with the
electrical gridsthat collects and analyze data captured in near-real-
time about power transmission,distribution and consumption. Smart
grid technology provides predictive informationand recommendations
to utilities, their suppliers, and their customers on how best tomanage
power. By using IoT based sensing and measurement technologies, the
healthofequipment and integrityofthegrid can beevaluated.
Renewable Energy Systems: IoT based systems integrated with the
transformers atthe point of interconnection measure the electrical
variables and how much power isfed into the grid. For wind energy
systems, closed-loop controls canbe used toregulate the voltage at
point of interconnection which coordinate wind turbine
outputsandprovides powersupport.
Prognostics: In systems such as power grids, real-time information is
collected
usingspecializedelectricalsensorscalledPhasorMeasurmentUnits(PMU
s)atthesubstations. The information received from PMUs must be
monitored in real-time forestimatingthe stateof thesystemand for
predictingfailures.
Retail:
Inventory Management: IoT systems enable remote monitoring of
inventory usingdatacollected byRFIDreaders.
Smart Payments: Solutions such as contact-less payments powered by
technologiessuchas NearFieldCommunication(NFC) andBluetooth.
Smart Vending Machines: Sensors in a smart vending machines
monitors itsoperationsandsend thedatato cloudwhichcan be
usedforpredictivemaintenance.
Logistics:
Route generation & scheduling: IoT based system backed by cloud can
provide
firstresponsetotheroutegenerationqueriesandcanbescaleduptoserveal
argetransportationnetwork.
FleetTracking:UseGPStotracklocationsofvehiclesinreal-time.
Shipment Monitoring: IoT based shipment monitoring systems use
sensors such astemp, humidity, to monitor the conditions and send
data to cloud, where it can beanalyzedto detectfoodspoilage.
Remote Vehicle Diagnostics: Systems use on-board IoT devices for
collecting dataonVehicleoperaions(speed,RPMetc.,)andstatusofvarious
vehiclesubsystems.
Agriculture:
SmartIrrigation:todeteminemoistureamount insoil.
GreenHouseControl: toimproveproductivity.
Industry:
Machinediagnosisandprognosis
IndoorAirQualityMonitoring
HealthandLifeStyle:
Health&FitnessMonitoring
WearableElectronics
edmanagementcapabilities.
UNIT-II
IOT ARCHITECTURE
State of theart
IoT architecture varies from solution to solution, based on the type of
solution which weintend to build. IoT as a technology majorly consists of
four main components, over whichanarchitectureis framed.
1) Sensors
2) Devices
3) Gateway
4) Cloud
StagesofIoTArchitecture
Stage 1:-
Sensors/actuator
s
Sensors collect data from the environment or object under measurement
and turn it intouseful data. Think of the specialized structures in your cell
phone that detect the directional pullofgravity
andthephone'srelativepositiontothe―thing‖we calltheearthandconvertitinto
data thatyour phonecan useto orient thedevice.
Actuators can also intervene to change the physical conditions that
generate the data. Anactuator might, for example, shut off a power supply,
adjust an air flow valve, or move a roboticgripperin an assemblyprocess.
The sensing/actuating stage covers everything fromlegacy
industrialdevicestoroboticcamerasystems,waterleveldetectors,airqualitysens
ors,accelerometers,andheartratemonitors. And the scope of the IoT is
expanding rapidly, thanks in part to low-power wirelesssensor network
technologies and Power over Ethernet, which enable devices on a wired LAN
tooperatewithout theneedforan A/C power source.
Stage2:-
TheInternetgateway
The data from the sensors starts in analog form. That data needs to be
aggregated
andconvertedintodigitalstreamsforfurtherprocessingdownstream.Dataacquisi
tionsystems(DAS) perform these data aggregation and conversion functions.
The DAS connects to the
sensornetwork,aggregatesoutputs,andperformstheanalog-to-
digitalconversion.TheInternetgateway receives the aggregated and digitized
data and routes it over Wi-Fi, wired LANs, or theInternet, to Stage 3 systems
for further processing. Stage 2 systems often sit in close proximity
tothesensors andactuators.
For example, a pump might contain a half-dozen sensors and actuators that
feed data into a dataaggregation device that also digitizes the data. This
device might be physically attached to thepump. An adjacent gateway
device or server would then process the data and forward it to theStage 3 or
Stage 4 systems. Intelligent gateways can build on additional, basic
gatewayfunctionalitybyaddingsuchcapabilities as analytics,
malwareprotection,and datamanagementservices.Thesesystems
enabletheanalysis of data streams in real time.
Stage 3:-
EdgeIT
OnceIoT data has been digitized andaggregated, it'sready tocrossinto the
realm ofIT.However, the data may require further processing before it enters
the data center. This is whereedge IT systems, which perform more analysis,
come into play. Edge IT processing systems maybe located in remote offices
or other edge locations, but generally these sit in the facility orlocation
where the sensors reside closer to the sensors, such as in a wiring closet.
Because IoTdata can easily eat up network bandwidth and swamp your data
center resources, it's best to havesystems at the edge capable of performing
analytics as a way to lessen the burden on core ITinfrastructure. You'd also
face security concerns, storage issues, and delays processing the data.With a
staged approach, you can preprocess the data, generate meaningful results,
and pass onlythoseon. Forexample, ratherthan passingon rawvibrationdata
forthe pumps,you could
aggregateand convertthedata, analyzeit, andsend onlyprojectionsas to
wheneach devicewillfailor need service.
Stage4:-
Thedatacenterandcloud
Data that needs more in-depth processing, and where feedback doesn'thave
to be immediate,gets forwarded to physical data center or cloud-based
systems, where more powerful IT systemscan analyze, manage, and securely
store the data.It takes longer to get results whenyou waituntil data reaches
Stage 4, but you can execute a more in-depth analysis, as well as combine
yoursensor data with data from other sources for deeper insights. Stage 4
processing may take placeon-premises, in the cloud, or in a hybrid cloud
system, but the type of processing executed in thisstage remains thesame,
regardless of theplatform.
REFERENCEMODEL ANDARCHITECTURE
TheIOT-ATree
IoT-Aarchitecturalreferencemodelbuildingblocks.
Startingwithexistingarchitecturesandsolutions,genericbaselinerequir
ementscanbeextractedand usedas aninputto thedesign. The IoT-AARM
consistsof four parts:
Thevisionsummarisestherationale
forprovidinganarchitecturalreferencemodelfortheIoT.Atthesametime
itdiscussesunderlyingassumptions,suchasmotivations.Italso
discusseshow thearchitectural referencemodelcan beused, the
methodologyapplied tothearchitecturemodelling,andthe
businessscenarios andstakeholdersaddressed.
Businessscenariosdefinedasrequirementsbystakeholdersarethedriverso
fthearchitecturework.Withtheknowledgeofbusinessesaspirations,aholisticview
ofIoTarchitecturescan bederived.
The IoT Reference Model provides the highest abstraction level for the
definition of theIoT-A Architectural Reference Model. Itpromotes a common
understanding of the IoT domain.The description of the IoT Reference Model
includes a general discourse on the IoT domain, anIoT Domain Model as a
top-level description, an IoT Information Model explaining how IoTinformation
is going to be modelled, and an IoT Communication Model in order to
understandspecifics about communication between many heterogeneous IoT
devices and the Internet as awhole.
The IoT Reference Architecture is the reference for building compliant
IoT architectures.As such, it provides views and perspectives on different
architectural aspects that are of concernto stakeholders of the IoT. The terms
view and perspectives are used according to the generalliterature and
standards the creation of the IoT Reference Architecture focuses on abstract
setsof mechanisms rather than concrete application architectures. To
organisations, an
importantaspectisthecomplianceoftheirtechnologieswithstandardsandbestpra
ctices,sothatinteroperabilityacross organisations isensured.
Level1:PhysicalDevicesandControllers
The IoT Reference Model starts with Level 1: physical devices and
controllers that mightcontrol multiple devices.These are the ―things‖in the
IoT, and theyinclude a wide range of
endpointdevicesthatsendandreceiveinformation.Today,thelistofdevicesisalrea
dyextensive. It will become almost unlimited as more equipment is added to
the IoT over time.Devices are diverse, and there are no rules about size,
location, form factor, or origin. Somedevices will be the size of a silicon chip.
Some will be as large as vehicles. The IoT must supportthe entire range.
Dozens or hundreds of equipment manufacturers will produce IoT devices.
Tosimplifycompatibilityandsupportmanufacturability,theIoTReferenceModelge
nerallydescribesthe level of processingneeded fromLevel 1devices.
Level2:Connectivity
Communications and connectivity are concentrated in one level—
Level2. The
mostimportantfunctionofLevel2isreliable,timelyinformationtransmission.Thisi
ncludestransmissions:
● Betweendevices(Level1)andthenetwork
● Acrossnetworks(east-west)
● Between the network (Level 2) and low-level information processing
occurring at Level
3Traditionaldatacommunicationnetworkshavemultiplefunctions,ase
videncedbythe
InternationalOrganizationforStandardization(ISO)7-
layerreferencemodel.However,acomplete IoT system contains many levels in
addition to the communications network. Oneobjective of the IoT Reference
Model is for communications and processing to be executed byexisting
networks. The IoT Reference Model does not require or indicate creation of a
differentnetwork—it relies on existing networks. As Level 1 devices
proliferate, the ways in which theyinteract with Level 2 connectivity
equipment may change. Regardless of the details, Level
1devicescommunicatethroughtheIoTsystembyinteractingwithLevel2connectiv
ityequipment.