402C Unit-3 IoT
402C Unit-3 IoT
Physical layer: The lowest two layers i.e the physical and the MAC (Medium Access
Control) Layer are defined by the IEEE 802.15.4 specifications. The Physical layer is closest
to the hardware and directly controls and communicates with the Zigbee radio. The physical
layer translates the data packets in the over-the-air bits for transmission and vice-versa during
the reception.
Medium Access Control layer (MAC layer): The layer is responsible for the interface
between the physical and network layer. The MAC layer is also responsible for providing
PAN ID and also network discovery through beacon requests.
Network layer: This layer acts as an interface between the MAC layer and the application
layer. It is responsible for mesh networking.
The HART Protocol provides for up to two masters (primary and secondary). This allows
secondary masters such as handheld communicators to be used without interfering with
communications to/from the primary master, i.e. control/monitoring system.
The HART Protocol permits all digital communication with field devices in either point-to-point
or multidrop network configurations:
Communication Modes
1. Master Slave Mode
HART is a master-slave communication protocol, which means that during normal operation,
each slave (field device) communication is initiated by a master communication device. Two
masters can connect to each HART loop. The primary master is generally a distributed control
system (DCS), programmable logic controller (PLC), or a personal computer (PC). The
As shown in the fig-1, z-wave frame consists of a preamble part, SOF(Start of Frame), Frame
data and EOF(End of Frame) symbol. The data part is manchester codes or NRZ coded based on
data rate. MAC layer controls the RF spectrum. Data part comes from the upper layers and z-
wave frame as mentioned in formed at the MAC/PHY layers. After this is done the z-wave frame
as depicted is transmitted by the RF antenna after necessary radio frequency conversion as
desired using RF Transceiver.
z-wave protocol stack
The z-wave protocol stack consists of PHY layer, MAC layer, Transport layer, Network layer
and application layer. Other than servicing their peers all the layers have their own tasks.
z-wave Physical layer(z-wave PHY)
The z-wave Physical layer takes care of preamble insertion in the z-wave frame. It takes care of
modulation and demodulation as well as RF channel selection. It takes care of data frame
transmission and reception.
z-wave security
As z-wave open protocol architecture does not specify security layer specifications it is
implementation specific. z-wave security layer provides secured communication between nodes
as well as between controllers and nodes.
Z-wave Protocol Stack
The z-wave protocol layers main function is to communicate very short messages of few
bytes long from a control unit to one or more z-wave nodes. It is a low bandwidth and half
duplex protocol to establish reliable wireless communication. z-wave protocol stack need not
have to take care of large amount of data as well as any kind of time critical or streaming data.
BLE
What is Bluetooth Low Energy?
It is simple to see BLE as a type of Bluetooth that uses less power, consumption or
energy. It is an eco-friendly form of Bluetooth that has been developed specifically to facilitate
the “Internet of Things”.
However, a new wave of technological advancement is on the horizon known as the
Internet of Things or for short (IoT). This next wave of mainstream tech will enable the
connectivity of your everyday household devices (like the washing machine, cooker, toaster,
kettles, etc.) to one another and to the internet. These devices will be able to communicate with
you directly or be controlled by a smart device such as your smartphone or tablet. Yes, that’s
right! You won’t need to border about turning “on” or “off” the washing machine or heating the
kettle manually as these would be possible just by the touch of a button on your smartphone.
How cool is that?
what is the Internet of Things?
In short, the Internet of Things is the connection of a device to other devices (usually
through some form of wireless connectivity such as Bluetooth low energy) and to the Internet to
help them communicate and share data across wireless networks. Therefore, IoT is a humongous
connection of “things” which also includes people, animals and basically whatever you choose to
connect. Bluetooth chips can be used to make animals part of the internet of things, as some
To pull off this seemingly impossible trick, BACnet provides a standard way of representing the
functions of any device, such as analog and binary inputs and outputs, schedules, control loops,
and alarms, by defining collections of related information called "objects," each of which has a
set of "properties" that further characterize it. Each analog input, for instance, is represented by a
BACnet "analog input object" which has a set of standard properties like present value, sensor
type, location, alarm limits, and so on. Some of these properties are required while others are
optional. One of the object's most important properties is its identifier, a numerical name that
allows BACnet to unambiguously access it. Once devices have common "appearances" on the
network in terms of their objects and properties, it is then possible to define messages that can
manipulate this information in a standard way.
Providing standard messages for monitoring and control - BACnet services
BACnet currently defines 35 message types, or "services," that are divided into 5 classes. For
example, one class contains messages for accessing and manipulating the properties of the
objects described above. A common one is the "ReadProperty" service request. This message
causes the server machine to locate the requested property of the requested object and send its
value back to the client. Other classes of services deal with alarms and events; file uploading and
downloading; managing the operation of remote devices; and virtual terminal functions
(accessing equipment across the network as if you were using a directly-connected terminal or
laptop).
From the electrical contractor's perspective, these networks all use standard, hopefully familiar,
wiring technology. Both Ethernet and ARCNET can use a variety of physical media – coaxial
cable, twisted pairs, as well as fiber optic cable. Although the types of coax are different - RG-58
for "thinwire" Ethernet and RG-62 for ARCNET - the types of connectors and tools are
essentially identical. Contractors should also be knowledgeable about recent standards from the
Electronic Industries Association / Telecommunications Industry Association such as EIA/TIA
Besides the SSPC activities, there are several BACnet demonstration projects underway. One
that has been in the news quite a bit is the General Services Administration's rehab of the Phillip
Burton Federal Building in San Francisco. The impressive thing about this project is its scale and
complexity. It will involve more than a thousand controllers, four (possibly five) different
vendors, several applications including lighting control and end use energy monitoring, and an
interface to the local electric utility. It is on track to be completed by the end of this year.
There is also activity on the international standards front. BACnet has been selected by the
European Community's standards committee CEN TC247 as a European "pre-standard" meaning
that it will undergo an evaluation process over the next couple of years to see whether it should
become a full-fledged EC standard. The International Organization for Standardization's
committee TC205 is also considering whether BACnet should be designated as an ISO standard.
All of this is quite remarkable, considering that BACnet was only published in January of 1996.
The future of BACnet
CRLF
ErrorCheck (2 bytes)
(0x0DOA)
Response
:
DeviceAddress
(0x3A) Function code
Response Data
CRLF
Function cod ErrorCheck
(0x0DOA) e Functi
There are three types of IPv6 addresses which are used for different purposes:
unicast which corresponds to IPv4 public address and is publicly routable;
multicast is used to communicate with particular devices on a given network that are
“listening out” for that address;
anycast is an address that is shared by different devices in different locations, of which only
the nearest one will receive a package when it’s sent.
2 2 2 2 2 2
3 3 3 3 3 3 3
Protocol Configuration
RPL creates a tree-like topology ( DAG or directed acyclic graph ). Each node within the
network has an assigned rank (Rank), which increases as the teams move away from the root
node (DODAG ). The nodes forward packets using the route with the lowest rank as route
selection criteria.
Three types of ICMPv6 packets are defined :
DIS (DODAG Information Request ): used to request information from nearby DODAGs,
analogous to router request messages used to discover existing networks
DIO ( DAG information object ): message that shares information from the DAG , sent in
response to DIS messages, as well as periodically used to refresh the information of the
nodes on the network topology
DAO (update object to destination): sent towards the DODAG, it is a message sent by the
equipment to update the information of its "parent" nodes throughout the DAG .
RPL Security
RPL defines three security models:
– The “unsecured” model does not implement specific security features at RPL level,
however the layer 2 network may implement some level of security (e.g., a 802.15.4
network key).
– The “preinstalled” model requires all RPL nodes to be configured with preprovisioned
keys, which they use to code and decode secure RPL messages. Secure RPL messages
have the high order bit of the code field set .
RCR Institute of Management & Technology Page 35
Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
- The “authenticated” mode that also uses a preinstalled key, but only to join the network
as a leaf node. The node will need to obtain a key or a certificate from an authentication
authority to join an authenticated RPLInstance as a router. This last mechanism is not
fully defined yet and will require future companion specifications.
IP Based Internet Protocols
Multiple electronic devices which are equipped with a unique IP address and communicated
with over internet are called the Internet of Things (IoT). In multiple ways, we can define IoT
but finally, in this technology, we can control the number of electronic devices through a single
device with the help of the Internet. Here, the electronic devices in IoT technology should have
the sensors and it should sense the signal through electrically and functions according to it. And
the sensed data transferred to the other device through the Internet. IoT will make our life so
simple and accurate. Present this technology has huge job opportunities and still there are many
developments are going on. Examples for IoT devices like a smart watch, smart speakers, smart
TV’s, Amazon Alexa, Google Home devices are internet-connected devices come under
examples of IoT. This article discusses what is IoT, IoT protocols, and architectures
The protocol is defined as a set of rules and regulation guidelines having how to react for
commands from another device. These protocols are very important while in communication
devices. The general-purpose protocols like CDMA, WAP, etc are not suitable for this
specific IoT technology. This technology needs some more powerful protocols.
amqp-protocol
Exchange: Receives the messages from the publishers and based on priorities they are
forwarded to message queues.
Message Queue: Stores the messages until they are properly processed with client software.
Binding: The connection between the exchange and message queue will state by this binding
component.
3). Data Distribution Service (DDS)
This protocol is an IoT standard which is developed by Object Management Group (OMG). This
DDS can be used in small devices which occupies less area and as well as in the cloud. This is a
middleware protocol (lies between operating system and application) and API (Application
Programming Interface) which enables the data connectivity between devices. This architecture
is best suitable for IoT application. This protocol software is best for interchanging the
information and quick data integration in IoT systems. This one supports the major
software programming languages. Scalable, real-time and reliable communication can be
possible with this Data Distribution Service (DDS).
dds-protocol
This DDS standard has two layers. They are:
Data-Centric Publish-Subscribe (DCPS)
Data Local Reconstruction Layer (DLRL)
DCPS layer delivers the information to all subscribers whereas DLRL providing the interface to
the functionalities of DCPS.
3-layer-iot-architecture
Application Layer: This layer is to deliver the specific application to the end-user. The
specific applications can be done with this application layer. Example of this layer like a smart
watch, smartphone, smart TV, etc. which is used for a specific application.
Network Layer: Network layer have an important role in IoT architecture. It connects to the
other smart electronic devices (smart watches, servers, etc). The network layer is for transmitting
and processing the sensor data.
Perception Layer: It is the physical layer and it gathers the surroundings data by sensing the
area with help the of sensors.
Five-layer IoT Architecture
5-layer-iot-architecture
Transport Layer: This layer forward the data from the processing layer to perception layer and
vice versa through wireless networks like LAN, 3G, and Bluetooth, etc.
Processing Layer: It is in the middle of the IoT architecture. It’s having an important role in this
five-layer IoT architecture. This layer stores the data and process the data which comes from the
transport layer. This processing layer able to implement latest technologies like big data, DBMS
and cloud computing, etc.
Business Layer: This layer is the head of the IoT architecture. It manages the complete IoT
system even applications, user’s privacy, profit models, etc.
The smart home consists of all the devices are connected with a network and communicated with
the internet. To develop a smart system like this five-layer IoT protocol stack is the best one.
This concept having more weight in the research area. And there are tremendous changes are
happening in IoT technology day today. We can do more research on this IoT protocols and
architectures. Here, we have discussed some of the important IoT protocols only. And the few
regular protocols like Bluetooth, WiFi, ZigBee, NFC, Cellular, Long ranged WAN and RFID are
not discussed here. You can get more data from those on our leprous portal.
REST API (Introduction)
Representational State Transfer (REST) is an architectural style that defines a set of constraints
to be used for creating web services. REST API is a way of accessing web services in a simple
and flexible way without having any processing.
REST technology is generally preferred to the more robust Simple Object Access Protocol
(SOAP) technology because REST uses less bandwidth, simple and flexible making it more
suitable for internet usage. It’s used to fetch or give some information from a web service. All
communication done via REST API uses only HTTP request.
RCR Institute of Management & Technology Page 39
Prepared By Mrs.P.Lalitha, Dept.of MCA Internet of Things
Working: A request is sent from client to server in the form of a web URL as HTTP GET or
POST or PUT or DELETE request. After that, a response comes back from the server in the form
of a resource which can be anything like HTML, XML, Image, or JSON. But now JSON is the
most popular format being used in Web Services.
In HTTP there are five methods that are commonly used in a REST-based Architecture i.e.,
POST, GET, PUT, PATCH, and DELETE. These correspond to create, read, update, and delete
(or CRUD) operations respectively. There are other methods which are less frequently used like
OPTIONS and HEAD.
GET: The HTTP GET method is used to read (or retrieve) a representation of a resource. In
the safe path, GET returns a representation in XML or JSON and an HTTP response code of
200 (OK). In an error case, it most often returns a 404 (NOT FOUND) or 400 (BAD
REQUEST).
POST: The POST verb is most often utilized to create new resources. In particular, it’s used
to create subordinate resources. That is, subordinate to some other (e.g. parent) resource. On
successful creation, return HTTP status 201, returning a Location header with a link to the
newly-created resource with the 201 HTTP status.
NOTE: POST is neither safe nor idempotent.
PUT: It is used for updating the capabilities. However, PUT can also be used to create a
resource in the case where the resource ID is chosen by the client instead of by the server. In
other words, if the PUT is to a URI that contains the value of a non-existent resource ID. On
successful update, return 200 (or 204 if not returning any content in the body) from a PUT. If
using PUT for create, return HTTP status 201 on successful creation. PUT is not safe
operation but it’s idempotent.
PATCH: It is used to modify capabilities. The PATCH request only needs to contain the
changes to the resource, not the complete resource. This resembles PUT, but the body
contains a set of instructions describing how a resource currently residing on the server
should be modified to produce a new version. This means that the PATCH body should not
just be a modified part of the resource, but in some kind of patch language like JSON Patch
or XML Patch. PATCH is neither safe nor idempotent.
DELETE: It is used to delete a resource identified by a URI. On successful deletion, return
HTTP status 200 (OK) along with a response body.
Idempotence: An idempotent HTTP method is a HTTP method that can be called many times
without different outcomes. It would not matter if the method is called only once, or ten times
over. The result should be the same. Again, this only applies to the result, not the resource itself.
Example:
Request
GET:/api/students
Request
POST:/api/students
{“name”:”Raj”}
Request
PUT or PATCH:/api/students/1
{“name”:”Raj”}
Request
DELETE:/api/students/1
RESTful web services are very popular because they are light weight, highly scalable and
maintainable and are very commonly used to create APIs for web-based applications.
What Is the Edge in IoT and Where Is It Located?
The Internet-of-Things (IoT) edge is where sensors and devices communicate real-time data to a
network. IoT edge computing solves latency issues associated with the cloud, as data is
processed closer to its point of origin. Along with reduced latency, IoT edge architecture brings
enhanced safety and a smoother end-user experience.
For example, if a factory uses machines on its assembly line and their inputs are processed using
a remote, cloud-based server, there could be significant safety issues. The time it takes for an
input to be received by the device, get sent to the server in the cloud, processed, and then have
the corresponding command sent back to the machine could be too much. If the command
involves telling the machine to stop functioning because a human limb is in the way, serious
injury could result.
With IoT edge, the data may only have to travel yards instead of miles, saving precious time and
enhancing safety.
IoT Edge Devices
IoT edge computing depends on devices to receive, process, and output IoT data. This involves a
system of connectivity dependent on devices and sensors. The data gets sent through a
messaging system, processed by a computer, and then stored. Because IoT devices generate,
process, and implement large amounts of data, keeping the computing process near the edge
prevents latency and operational issues.
An IoT edge device is internet-enabled and typically comprised of sensors. These sensors collect
data and then pass it on to the processing unit. Here, it is processed locally instead of going
through the time-consuming sequence of sending it to the cloud and back. IoT devices can save
network resources by collecting and processing data in a distributed fashion. In this way,
workloads are spread among available devices, ensuring that none gets overworked or
underutilized.
Examples of IoT Devices
Some common IoT edge devices include an IoT server, which processes data at the edge, and an
IoT router, which works as an IoT hub, transmitting data to the necessary recipients. Self-driving
cars are also IoT devices in that they produce, process, and use data without needing the cloud—
for at least some of their processes.
Role of Machine Learning
Machine learning (ML) plays a key role in IoT edge runtime and IoT applications, and many
DevOps teams include it as they design applications. ML can be used to help certain IoT edge
devices understand and make predictions based on the data they store and process.
An ML application programming interface (API) can gather data from an IoT edge device and
recognize patterns of inputs, user behavior, atmospheric conditions, and more. It can then predict
Going back to the example of a factory with IoT edge devices, ML can help predict what will
happen next when a person crosses a certain threshold. For example, suppose the danger zone of
a machine consists of a three-foot radius around it. If people continually pass by sensors within
eight feet of the machine but not cross into the danger zone, ML can recognize that pattern and
keep the machines functioning normally when those conditions are met.
However, if sensors are placed at four feet and the algorithm learns that 80% of the time
someone who passes within four feet proceeds to cross the three-foot barrier, it can use this data
to prep the machines for going offline. The same inputs can be used to set off alerts or even set
up a series of safety alerts that are triggered by various distances.
Role of an IoT Gateway
An IoT gateway enables communication between devices, as well as between devices and the
cloud. Its main functions include data filtering and analytics. It can also be programmed to
handle the authentication of data that should be sent to cloud services, making it capable of
enhancing data safety in real time, thereby improving IoT security.
If an edge agent has to communicate with another device or the cloud, the IoT gateway processes
the request, clears it, and sends the information to its destination. The data that gets sent can be
analyzed, and the results of the analysis can be used to identify ways to increase the efficiency of
the system.