Internet of Things
Module-4
Dr. Bivas Ranjan Parida
Department of CSE
Silicon University
Review of Internet
• The Internet is a vast network that connects computers all over
the world. Through the Internet, people can share information
and communicate from anywhere with an Internet connection.
• The Internet consists of technologies developed by different
individuals and organizations. Important figures include Robert
W. Taylor, who led the development of the ARPANET (an early
prototype of the Internet), and Vinton Cerf and Robert Kahn, In
1974, who developed the Transmission Control
Protocol/Internet Protocol (TCP/IP) technologies.
Working Mechanism
• The actual working of the internet takes place with the help
of clients and servers.
• The client is a system that is directly connected to the internet.
• Servers are the computers connected indirectly to the Internet
and they are having all the websites stored in those large
computers.
• These servers are connected to the internet with the help
of ISP (Internet Service Providers) and will be identified with
the IP address.
• Each website has its Domain name.
• Whenever you search for any domain name in the search bar of
the browser the request will be sent to the server and that
server will try to find the IP address from the Domain name
because it cannot understand the domain name.
• After getting the IP address the server will try to search the IP
address of the Domain name in a Huge phone directory that in
networking is known as a DNS server (Domain Name Server).
• After getting the IP address, the browser will pass on the
further request to the respective server.
• The server will process the request to display the content of the
website which the client wants.
IP: Internet Protocol Address
• Every PC/Local machine is having an IP address and that IP
address is provided by the Internet Service Providers (ISPs).
• These are some sets of rules which govern the flow of data
whenever a device is connected to the Internet.
• It differentiates computers, websites, and routers.
• An IP address is a set of four-numbers like [Link].
• Each number on the set ranges from 0 to 255.
• The total IP address range from [Link] to [Link].
IP: Internet Protocol Address
Static IP:
• In many cases, however, the system administrator simply assigns
server numbers in order.
• The administrator makes a note of the addresses and updates DNS
records and so on to point to these addresses.
• We call this kind of address static because once assigned it won’t
change again without human intervention.
Dynamic IP:
• We don’t typically have to choose an IP address for every device.
• when a device is connected, it can request an IP address from the
network itself using the Dynamic Host Configuration Protocol (DHCP).
• When the device tries to connect, instead of checking its internal
configuration for its address, it sends a message to the router asking
for an address.
• The router assigns it an address.
IPv4 and IPv6
• Ipv4: 32 bit, 4.3 billion addresses
• IPv6: 128 bits
Architecture & Design of IP based IoT
Architecture & Design of IP based IoT
When data transmits from layer i to the next layer j,
following are the actions that occur:
● Each layer’s processing of data is as per the protocol
used for communication by that layer.
● Each layer sends the data stack received from the
previous upper layer plus a new header, and thus
creates a fresh stack after performing the actions
specified at that layer.
● Layer j will specify new parameters as per protocol
and create fresh stack for the subsequent lower layer.
● The process continues until data communicates over
the complete network.
Architecture & Design of IP based IoT
When data is received at the next layer i from a layer j,
i.e. IoT device physical layer to the IoT application, the
following actions are performed:
● Each layer performs the processing as per the header
field bits, which are received according to the protocol
to be used for decoding the fields for the required
actions at that layer.
Architecture & Design of IP based IoT
● Each layer receives the data stack from the previous
lower layer and after the required actions, it subtracts
the header words and creates a new stack specified for
the next higher layer.
● The process continues until the data is received at
the port on the highest application layer.
TCP/IP Data Stack in Network & Physical Layer
Link Layer:
• Link Layer protocols determine how the data is
physically sent over the networks physical layer or
medium(example copper wire, electrical cable, or
radio wave).
• The Scope of The Link Layer is the Last Local Network
connections to which host is attached.
• Host on the same link exchange data packets over the
link layer using the link layer protocol.
• Link layer determines how the packets are coded and
signaled by the hardware device over the medium to
which the host is attached.
Link Layer Protocols:
• 802.3 Ethernet:
1) 802.3 is a collection of wired Ethernet standards for
the link layer.
2) Standards provide data rates from 10 Mb/s to 40
gigabits per second and the higher.
3) The shared medium in Ethernet can be a coaxial
cable, twisted pair wire or Optical fiber.
4) Shared medium carries the communication for all the
devices on the network.
Link Layer Protocols:
• 802.11 WI-FI:
1) IEEE 802.11 is a collection of wireless Local area
network.(WLAN) communication standards, including
extensive descriptions of the link layer.
2) For example 802.11a operate in the 5 GHz band,
802.11b and 802.11g operate in the 2.4 GHz band.
802.11ac operates in the 5G hertz band.
Link Layer Protocols:
• 802.16 wiMAX:
1) IEEE 802.16 is a collection of wireless broadband and
Standards, including extensive descriptions for the
link layer also called WiMAX. The wimax standard
provides a data rates from from 1.5 Mb/s to 1Gb/s
the recent update provides data rates of hundred
megabits per second for mobile station.
Link Layer Protocols:
• 802.15.4 LR-WPAN:
1) IEEE 802.1 5.4 is a collections of standard for low rate
wireless personal area network(LR-WPAN).
2) These standard form the basis of specifications for
high level communication Zigbee.
3) LR-WPAN standards provide data rates from 40 k b/ s.
4) These standards provide low cost and low speed
Communications for power constrained devices.
Link Layer Protocols:
• 2G / 3G / 4G mobile communications:
1) These are the different generations of mobile
communication standards including second
generation (2G including GSM and CDMA).
2) 3rd Generation (3G including UMTS and CDMA2000)
and 4th generation 4G including LTE.
IEEE 802.15.4
• IEEE 802.15.4 is a low-cost, low-data-rate wireless
access technology for devices that are operated or
work on batteries.
• This describes how low-rate wireless personal area
networks (LR-WPANs) function.
• The original IEEE 802.15.4 standard was released in
2003.
• The original version supported two physical layers, one
of them working in the 868 and 915 MHz frequency
bands and the other working in the 2.4GHz band.
IEEE 802.15.4
• The IEEE 802.15.4 supports two classes of devices:
Fully functional devices (FFD), which have full network
functionalities and the Reduced functional devices
(RFD), which possess limited functionalities.
• There are two packet frame: Physical layer packet
structure and MAC layer frame structure.
IEEE 802.15.4
• Physical layer packet structure
This standard enables a wide range of PHY options in
ISM bands, ranging from 2.4 GHz to sub-GHz
frequencies.
IEEE 802.15.4 enables data transmission speeds of 20
kilobits per second, 40 kilobits per second, 100
kilobits per second, and 250 kilobits per second.
IEEE 802.15.4
The fundamental structure assumes a 10-meter range
and a data rate of 250 kilobits per second.
To further reduce power usage, even lower data rates
are possible.
IEEE 802.15.4 regulates the RF transceiver and
channel selection, and even some energy and signal
management features, at the physical layer.
IEEE 802.15.4
• MAC layer frame structure.
The MAC layer provides links to the PHY channel by
determining that devices in the same region will share
the assigned frequencies.
The scheduling and routing of data packets are also
managed at this layer.
The 802.15.4 MAC layer is responsible for a number
of functions.
IEEE 802.15.4
• MAC layer Functions are:
Beaconing for devices that operate as controllers in a
network.
used to associate and dissociate PANs with the help of
devices.
The safety of the device.
Consistent communication between two MAC devices
that are in a peer-to-peer relationship.
Advantages of IEEE 802.15.4
• Cheap cost
• Long battery life,
• Quick installation
• Simple
• Extensible protocol stack
Disadvantages of IEEE 802.15.4
• IEEE 802.15.4 causes interference and multipath
fading.
• Doesn’t employ a frequency-hopping approach.
• Unbounded latency
• Interference susceptibility
ZigBee
• ZigBee is a Personal Area Network task group with
low rate task group 4.
• It is a technology of home networking. ZigBee is a
technological standard created for controlling and
sensing the network.
• As we know that ZigBee is the Personal Area Network
of task group 4 so it is based on IEEE 802.15.4 and is
created by Zigbee Alliance.
ZigBee
• The ZigBee alliance was established in 2002 to
develop a standard protocol stack for low-cost, low-
rate, low-power wireless devices.
• It uses the IEEE 802.15.4 standard to define its
physical and MAC layer.
• The ZigBee alliance is a nonprofit association of
members aiming at the development of the standard
and consists of various kinds of organizations
including universities, equipment manufacturers,
semiconductor companies etc.
ZigBee
• ZigBee is an open, global, packet-based protocol
designed to provide an easy-to-use architecture for
secure, reliable, low power wireless networks.
• Flow or process control equipment can be place
anywhere and still communicate with the rest of the
system.
• It can also be moved, since the network doesn’t care
about the physical location of a sensor, pump or
valve.
ZigBee
• IEEE 802.15.4 supports star and peer-to-peer
topologies.
• The ZigBee specification supports star and two kinds
of peer-to-peer topologies, mesh and cluster tree.
It defines three types of devices:
ZigBee Coordinator: responsible for initializing, maintaining and
controlling the network. There is one and only one per network.
ZigBee Router: connected to the coordinator or other routers. It
can have zero or more children nodes. Participate in multi hop
routing
ZigBee End Devices: does not participate in routing
ZigBee
ZigBee
Characteristics ZigBee
• Low Power Consumption
• Low Data Rate (20- 250 kbps)
• Short-Range (75-100 meters)
• Network Join Time (~ 30 msec)
• Support Small and Large Networks (up to 65000
devices (Theory); 240 devices (Practically))
• Low Cost of Products and Cheap Implementation
(Open Source Protocol)
• Extremely low-duty cycle.
• 3 frequency bands with 27 channels.
Features ZigBee
1. Stochastic addressing: A device is assigned a random
address and announced. Mechanism for address conflict
resolution. Parents node don’t need to maintain assigned
address table.
2. Link Management: Each node maintains quality of links to
neighbors. Link quality is used as link cost in routing.
3. Frequency Agility: Nodes experience interference report to
channel manager, which then selects another channel
4. Asymmetric Link: Each node has different transmit power
and sensitivity. Paths may be asymmetric.
5. Power Management: Routers and Coordinators use main
power. End Devices use batteries.
Advantages of ZigBee
• ZigBee is standardized at all layers, this ensures that
products from different manufacturers are compatible
with each other.
• Other advantage is the power of the mesh, devices
tend to connect with every near device, that makes
every node of the network reachable from every other
node and expanding the network geographically.
• Provides self healing, if the preferable path to a node
fails there are other path to reach the node.
Advantages of ZigBee
• Low consumption of energy
• High scalability, ZigBee networks can to thousand of
devices and they will communicate with each other
using the best available path.
• Provides network security and application support
services operating on the top of IEEE.
• Zigbee makes possible completely networks homes
where all devices are able to communicate.
• Use in smart home
• Easy implementation
• Adequate security features.
Disadvantages of ZigBee
Limited range: Zigbee has a relatively short range compared to
other wireless communications protocols, which can make it less
suitable for certain types of applications or for use in large
buildings.
Limited data rate: Zigbee is designed for low-data-rate
applications, which can make it less suitable for applications that
require high-speed data transfer.
Interoperability: Zigbee is not as widely adopted as other IoT
protocols, which can make it difficult to find devices that are
compatible with each other.
Security: Zigbee’s security features are not as robust as other IoT
protocols, making it more vulnerable to hacking and other security
threats.
Bluetooth
• Bluetooth is universal for short-range wireless voice and
data communication.
• It is a Wireless Personal Area Network (WPAN) technology
and is used for exchanging data over smaller distances. This
technology was invented by Ericson in 1994.
• It operates in the unlicensed, industrial, scientific, and
medical (ISM) band from 2.4 GHz to 2.485 GHz.
• Maximum devices that can be connected at the same time
are 7.
• Bluetooth ranges up to 10 meters. It provides data rates up
to 1 Mbps or 3 Mbps depending upon the version.
• The spreading technique that it uses is FHSS (Frequency-
hopping spread spectrum).
Bluetooth
• Bluetooth Transmission capacity 720 kbps.
• Bluetooth is Wireless.
• Bluetooth is a Low-cost short-distance radio
communications standard.
• Bluetooth is robust and flexible.
• Bluetooth is cable replacement technology that can be
used to connect almost any device to any other
device.
• The basic architecture unit of Bluetooth is a piconet.
Bluetooth architecture: (1) Piconet
• Collection of devices connected in an ad hoc
fashion
P
S
• One unit acts as master and the others as slaves S
for the lifetime of the piconet M P
SB
• Master determines hopping pattern, slaves S
have to synchronize P SB
• Each piconet has a unique hopping pattern
M=Master P=Parked
• Participation in a piconet = synchronization to S=Slave SB=Standby
hopping sequence
• Each piconet has one master and up to 7
simultaneous slaves (> 200 could be parked)
Bluetooth architecture : Piconet
• Two additional types of devices are shown: parked devices
(P) can not actively participate in the piconet (i.e., they do
not have a connection), but are known and can be
reactivated within some milliseconds .
• Devices in stand-by (SB) do not participate in the piconet.
Each piconet has exactly one master and up to seven
simultaneous slaves
Forming a piconet
• All devices in a piconet hop together
• Master gives slaves its clock and device ID
• Hopping pattern: determined by device ID (48 bit, unique worldwide)
• Phase in hopping pattern determined by clock
• Addressing
• Active Member Address (AMA, 3 bit)
• Parked Member Address (PMA, 8 bit) P
SB S
S
SB
SB
M P
SB SB SB S
SB SB P
SB
SB
SB
Forming a piconet (cont…)
• All active devices are assigned a 3-bit active member address (AMA).
• All parked devices use an 8-bit parked member address (PMA).
• Devices in stand-by do not need an address.
Bluetooth architecture: (2) Scatternet
• Linking of multiple co-located piconets through the sharing
of common master or slave devices
• Devices can be slave in one piconet and master of another
• Communication between piconets
• Devices jumping back and forth between the piconets
Piconets
P (each with a
S S capacity of
720 kbit/s)
S
P
P
M
M
SB S
M=Master P SB SB
S=Slave
P=Parked S
SB=Standby
Bluetooth protocol stack
The protocol architecture of the bluetooth consists of
following in a bluetooth protocol stack:
• Core protocols consisting 5 layer protocol stack viz. radio,
baseband, link manager protocol, logical link control and
adaptation protocol, service discovery protocol.
• Cable replacement protocol: RFCOMM
• Telephony Control Protocols
• Adopted protocols: PPP,TCP/UDP/IP,OBEX and WAE/WAP
Bluetooth Protocol Stack
Core protocols
• Radio: This protocol specification defines air interface, frequency
bands, frequency hopping specifications, modulation technique.
Baseband: Addressing scheme, packet frame format , timing and
power control algorithms required for establishing connection
between Bluetooth devices within piconet defined in this part of
protocol specification.
• Link Manager protocol: It is responsible to establish link between
Bluetooth devices and to maintain the link between them. This
protocol also includes authentication and encryption specifications.
Negotiation of packet sizes between devices can be taken care by
this.
Core protocols
• Logical link control and adaptation protocol: This protocol supports
adapting upper layer frame to baseband layer frame format and vice
versa. L2CAP take care of both connection oriented and
connectionless services.
• Service discovery protocol(SDP): Service related queries including
device information can be taken care at this protocol so that
connection can be established between bluetooth devices.
Cable replacement protocol
• Serial ports are popular to provide serial communication between
devices.
• Bluetooth uses RFCOMM as cable replacement protocol.
• RFCOMM functions as virtual serial port and does transport of binary
digital data bits.
Telephony Control Protocols
• TCS-BIN is the protocol used here which is a bit oriented one.
• It specifies call control signals and mobility management procedures.
• These signals take care of establishing speech and data calls.
Adopted protocols
• These protocols are already defined by other standard bodies which
are incorporate without any change in the bluetooth protocol stack
architecture. The protocols are PPP,TCP/UDP/IP,OBEX and WAE/WAP.
Bluetooth
Advantage:
• It is a low-cost and easy-to-use device.
• It can also penetrate through walls.
• It creates an Ad-hoc connection immediately without
any wires.
• It is used for voice and data transfer.
Disadvantages:
• It can be hacked and hence, less secure.
• It has a slow data transfer rate: of 3 Mbps.
• It has a small range: 10 meters.
• Bluetooth communication does not support routing.
• The issues of handoffs have not been addressed.
BLE (Bluetooth Low Energy)
• Bluetooth Low Energy (BLE) is similar to Bluetooth
classic.
• It is a short-range wireless LAN communication
technology standardized by IEEE 802.15.
• It also operates in 2.4 GHz ISM unlicensed
bandwidth.
• The major distinguishing feature of BLE, commercially
made accessible first in 2011, is its low power
consumption while maintaining the same
communication range as in Bluetooth classic.
BLE components
• BLE has three components from its
architectural perspective:
– Application block ( user application is situated
here. It interacts directly with bluetooth stack)
– Host block (upper layer of bluetooth stack)
– Controller block (lower layer of bluetooth stack)
– Host Controller Interface (interface the controller
with the host)
BLE Components
•Application Block: This is software that acts as a man-
machine interface by bundling together the entire functionality of
Bluetooth LE protocol in a fashion that is accessible to the user.
BLE
• Host: The host is typically a software stack made up of the topmost
layers of the LE stack as well as what are known as profiles.
• A profile offers details on how each protocol in the stack should
communicate with one another and work together for a certain usage
model.
• LE Profiles act as a commander by directing the soldiers (the layers of
the protocol stack) in a specific enemy’s direction (specific usage
model).
BLE
• Controller: The controller is a subsystem that consists of the lower
layer protocols in the LE stack.
• The LE controller also consists of a physical radio that can generate
and receive radio waves in the 2.4 GHz band, encode the RF signals
with data (GFSK modulation) and radiate the signals through an
antenna.
• It should be able to receive RF waves as well as understand how these
signals can be interpreted as data packets with information within
them.
BLE
• Host Controller Interface: The HCI is an optional part of the stack.
• It provides a standardized communication interface between the
host and the controller.
BLE Protocol stack
BLE Protocol Stack
• GAP stands for Generic Access Profile.
• The Generic Access Profile is responsible for defining the roles
of the devices in Bluetooth LE communication.
• There are four device roles defined by the GAP:
• Broadcaster
• Observer
• Peripheral
• Central
• In a connection-less communication( broadcasting), where the
exchange of data between devices occurs without first
establishing a connection, the Bluetooth LE devices involved
take on the roles of Broadcaster and Observer.
BLE Protocol Stack
• The first step of a connection-oriented communication
is device discovery. Here the peripheral device is expected to
be announcing its presence by advertising, while the Central
device is expected to be looking for such announcements by
scanning and then sending a connection indication to the
peripheral device.
• Once a connection is established, data can flow in both
directions between the two devices.
• The GAP roles essentially outline the tasks you can anticipate
from a device during a Bluetooth LE communication
transaction.
Stages of Bluetooth
Stages of Bluetooth
• In a standby state, the LE radio is not doing much. It’s neither sending nor
receiving any packets. It is idle. The LE radio can enter the standby state
from any of the other four states.
• In an advertising state, the LE radio is broadcasting advertisement
packets that can be received by any LE-enabled device in range.
• The advertisement packets broadcast the device’s presence and share
information about it with other devices in the vicinity.
Stages of Bluetooth
• In a scanning state, the LE radio is looking (listening) for packets that are
being broadcasted by other LE-enabled devices in range.
• In an initiating state, the LE radio is attempting to establish a connection
with another LE-enabled device. The LE can enter the initiating state from
the scanning state.
• In a connection state, the LE radio is connected to another LE-enabled
device, and data can be exchanged between the two devices.
Connection-less and Connection-oriented
BLE Protocol Stack
• For a device that has a broadcaster role, its radio can be in the
following states: standby and advertising.
• For a device that is an observer, its radio can be in the following
states: standby and scanning.
• For a device that has a peripheral role, its radio can be in the
following states: standby, advertising, and connection states.
• And for a device that has taken the central role, its radio can be in
the following states: standby, scanning, initiating, and connection
states.
BLE Protocol Stack
• Link Layer: The Link layer is the second lowest protocol in the
Bluetooth Low Energy protocol stack.
• It’s responsible for managing the state of the LE radio, among other
things.
BLE Protocol Stack
• Physical layer : The physical layer (PHY) is the lowest layer of the
Bluetooth LE protocol stack.
• It relates to the physical method used to transmit the information, which
in this case is the use of RF waves for transmitting and receiving raw bits
over the air.
• The PHY defines how these bits are modulated onto an RF carrier wave,
as well as how this RF carrier wave is transmitted and received by the
radio hardware.
• A Bluetooth LE radio hardware must operate in the ISM band (2.4 GHz
spectrum), which is segmented into 40 RF channels, each separated by 2
MHz (center-to-center),
Bluetooth Vs BLE
Features Bluetooth BLE
Power consumption High (approx 1W) Low (approx 0.01W-0.5W)
Communication Range 10m to 30m 10m to 30m
Data Rate 1 Mbps to 3Mbps 500kbps-1Mbps
GFSK, 8-DPSK or π/4-
Modulation Technique GFSK
DQPSK
2.4 GHz ISM band (2400- 2.4 GHz ISM band (2400-
RF Bandwidth
2483.5 MHz) 2483.5 MHz)
79 channels each of width 40 channels each of width
Number of Channels
1Mhz 2MHz
Time Division Multiple Time Division Multiple
Data link layer protocol
Access (TDMA) Access (TDMA)
Bluetooth Vs BLE
Features Bluetooth BLE
8 bit CRC or 16 bit CRC, and
Error detection 24 bit CRC, ACKs
ACKs
Maximum number of active
7 Unlimited
slaves
Power Line Communication (PLC)
• Power Line Communication (PLC) is a communication
method that uses power lines as the medium by using
power lines as the communication network.
• PLC is used for communications in smart meters
(advanced metering infrastructure - AMI), home
energy management systems (HEMS), building energy
management systems (BEMS), and solar panel
monitoring systems, part of a smart society.
Communication data can be propagated through AC or
DC power lines.
Power Line Communication (PLC)
• It provides broadband data communications on
conductors which are already in use for the
transmission of electric power using a modular signal.
Power Line Communication (PLC)
Advantages and Disadvantages of PLC
Advantages:
Low Implementation Cost: PLC does not require any
installation of new wires which as a result, would
significantly reduce the deployment costs.
Large Reach: PLC can enable communication with hard-to-
reach nodes
Lower Running Cost: PLC provides a low-cost solution
compared to the other existing technologies such as RF
wireless or visible light communication (VLC) systems.
Indoor High Speed: The implementation of PLC & VLC
technologies integrated together
Advantages and Disadvantages of PLC
Advantages:
Low Implementation Cost: PLC does not require any
installation of new wires which as a result, would
significantly reduce the deployment costs.
Large Reach: PLC can enable communication with hard-to-
reach nodes
Lower Running Cost: PLC provides a low-cost solution
compared to the other existing technologies such as RF
wireless or visible light communication (VLC) systems.
Indoor High Speed: The implementation of PLC & VLC
technologies integrated together
Advantages and Disadvantages of PLC
Disadvantages:
Low transmission speed,
Sensitivity to disturbance,
Nonlinear distortion and Cross-modulation between
channels,
Large size
The high price of capacitors and inductors used in the PLC
system.
6LoWPAN
• 6LoWPAN stands for IPv6 over Low-power Wireless
Personal Area Networks.
• It is a standard protocol for realizing IPv6
communication on wireless networks composed of
low-power wireless modules.
• 6LoWPAN specification contains packet compression
and other optimization mechanisms to enable the
efficient transmission of IPv6 packets on a network
with limited power resources and reliability, which
makes efficient IPv6 communication over low-power
wireless networks possible.
6LoWPAN
• 6LoWPAN stands for IPv6 over Low-Power Wireless
Personal Area Networks.
• This is an IPv6-based low-power wireless network
used for embedded systems and can connect to the
cloud.
• 6LoWPAN uses a communication protocol that
conforms to IEEE 802.15.4.
Features of 6LoWPAN
• It is used with IEEE 802.15,.4 in the 2.4 GHz band.
• Outdoor range: ~200 m (maximum)
• Data rate: 200kbps (maximum)
• Maximum number of nodes: ~100
6LoWPAN
6LoWPAN
Advantages of 6LoWPAN:
6LoWPAN is a mesh network that is robust, scalable, and
can heal on its own.
It delivers low-cost and secure communication in IoT
devices.
It uses IPv6 protocol and so it can be directly routed to
cloud platforms.
It offers one-to-many and many-to-one routing.
In the network, leaf nodes can be in sleep mode for a
longer duration of time.
6LoWPAN
Disadvantages of 6LoWPAN:
It is comparatively less secure than Zigbee.
It has lesser immunity to interference than that Wi-Fi
and Bluetooth.
Without the mesh topology, it supports a short range.
6LoWPAN Adaptation Layer
The adaptation layer is always used when sending the
data over PHY and MAC layers.
6LoWPAN Adaptation Layer
• The key concept of the 6LoWPAN adaptation layer is
to use stateless or shared-context compression to
compressed header fields.
• This can compress all headers (adaptation, network,
and transport layers) down to a few bytes.
• Header fields are possible to compress since they
often carry common values.
6LoWPAN Adaptation Layer
6LoWPAN Adaptation Layer
• The main focus of the IETF working group, 6LoWPAN WG,
was to optimize the transmission of IPv6 packets over
low-power and lossy networks (LLNs) such as IEEE
802.15.4
• Header compression, which compresses the 40-byte
IPv6 and 8-byte UDP headers by assuming the usage
of common fields.
• Fragmentation and reassembly. The data link of IEEE
802.15.4 with a frame length of maximum 127 bytes
does not match the MTU of IPv6
6LoWPAN Adaptation Layer
• Stateless auto configuration. Stateless auto
configuration is the process where devices inside the
6LoWPAN network automatically generate their own
IPv6 address.
MQTT
• Message Queuing Telemetry Transport.
• It is a lightweight, publish-subscribe based messaging
protocol designed for resource-constrained devices
and low-bandwidth, high-latency, or unreliable
networks.
• It was created by Dr. Andy Stanford-Clark and Arlen
Nipper in 1999. The initial purpose of the
communication program was to enable oil and gas
sector monitoring equipment to transmit data to a
distant server.
• It is widely used in Internet of Things (IoT) applications,
providing efficient communication between sensors,
actuators, and other devices.
MQTT
• Message Queuing Telemetry Transport is suitable for
machine-to-machine (M2M) communications because
of its optimization for low-bandwidth and high-latency
environments.
• MQTT is a publisher/subscriber protocol the main
broker manages. This signifies that there is no direct
link between the transmitter and the recipient.
MQTT
Types of MQTT Messages
• Fourteen standardized message types are used to join
and detach clients from brokers, broadcast data,
acknowledge data receipts, and maintain the client-
server connection.
• For data transfer, MQTT uses the TCP protocol.
• However, these three types of messages are usually
used.
Types of MQTT Messages
• Connect
Usually used to transmit connection requests to
the broker by customers.
Authentication is offered to the client in the form
of cleartext login details, which are submitted to
the server as an element of the CONNECT packet
sequence.
Furthermore, certain brokers may allow
anonymous customers, particularly those that
advertise their services on the internet.
The login credentials are simply left blank in these
situations.
Types of MQTT Messages
• Publish
A customer uses this command to send messages to the
broker.
Transmits a data block with the message to be sent in it.
A design pattern that separates the customers who
send messages (publishers) from the users who receive
messages (receivers) (the subscribers).
Publishers and subscribers never communicate directly
in the pub/sub-model.
A broker manages the connection, filtering all incoming
messages and distributing them properly to customers.
Types of MQTT Messages
• Subscribe
The customer uses this to get messages from the
broker and converts a customer into a topic
subscriber.
Subjects can be subscribed to individually or using
wildcards, allowing you to subscribe to a full
subject branch or a subset of any topic branch.
A consumer sends a SUBSCRIBE packet and in
response gets a SUBACK packet.
When there is a preserved message for the subject,
the new subscriber will also get it.
MQTT Message Format
MQTT Message Format
Importance of MQTT
Advantages of MQTT
• Easy Scalability
• Eliminates insecure connections
• Lightweight Communication
CoAP
• Constrained Application Protocol (CoAP) is a
specialized web transfer protocol for use with
constrained nodes and constrained networks in the
Internet of Things.
• CoAP is designed to enable simple, constrained
devices to join the IoT even through constrained
networks with low bandwidth and low availability.
• It is generally used for machine-to-machine (M2M)
applications such as smart energy and building
automation.
• The protocol was designed by the Internet
Engineering Task Force (IETF), CoAP is specified
in IETF RFC 7252.
CoAP
• CoAP a customary client-server IoT protocol.
• It enables clients to make requests for web transfers
as per the need of the hour.
• On the other hand, it also let supporting servers to
respond to arriving requests.
• In summary, devices’ nodes in the IoT ecosystem are
enabled to interact over through CoAP only.
• CoAP and HTTP follow the same working procedure.
• However, CoAP attains its functionality via
asynchronous transactions (using UDP).
• It utilizes the POST, GET, PUT, and DELETE calls.
CoAP
CoAP is compatible with 4 types of information
exchange:
• Acknowledgments confirm the completion or failure
of an event.
• Confirmable are the messages that are resent on time
out until the confirmation of successful sending
doesn’t arrive.
• Reset messages are empty, with confirmable as their
nature.
• Non-confirmable information is just sent and has no
guarantee of successful delivery. There is no
acknowledgment of success either.
CoAP
Key traits of CoAP are:
• Works for devices in the same network types.
• Enables data transmission, to and fro, for the general
internet-enabled nodes and network-connected
devices.
• Works really fine for SMSs shared over mobile
network connectivity.
• Suitable for internet-operative applications that use
connected devices/sensors and have resource
limitations.
• Capable of translating HTTP, supports multicast, and
exerts the bare minimum cost burden.
• Only helps machines to communicate (in the
network).
CoAP Architecture
CoAP Architecture
• Endpoints are the nodes that host have knowledge of;
• Client sends requests and replies to incoming
requests;
• Server gets and forwards requests. It also gets and
forwards the messages received in response to the
requests it had processed.
• Sender creates and sends the original message.
• Recipient gets the information sent by the client or
forwarded by the server.
CoAP Architecture
MQTT Vs CoAP
MQTT CoAP
This model has publishers and
Uses requests and responses
subscribers as main participants
Central broker handles message Message dispatching happens on a
dispatching, following the optimal unicasting basis (one-to-one). The
publisher to client path. process is same as HTTP.
Event-oriented operations Viable for state transfer
Establishing a continual and long- Involved parties use UDP packets
lasting TCP connection with the broker (async) for message passing and
is essential for the client. communication.
No message labeling but have to use
It defines messages properly and
diverse messages for different
makes its discovery easy.
purposes.
It has 2 bytes sized header It has 4 bytes sized header
CoSIP
• There are many applications in both constrained and non-
constrained environments that feature non-
request/response communication models.
• Some of these applications require the creation and
management of a “session”, a term that we use to refer to
any exchange of data between an association of
participants.
• Session Initiation Protocol (SIP) is the standard
application protocol for establishing application-level
sessions.
• It allows the endpoints to create, modify, and terminate
any kind of (multi)media session: VoIP calls, multimedia
conferences, or data communication.
CoSIP
• The main drawback of using the standard SIP protocol
in constrained environments is the large size of text-
based SIP messages and the processing load required
for parsing such messages.
• A constrained version of SIP, named “CoSIP”,
designed to allow constrained devices to instantiate
communication sessions in a lightweight and
standardized fashion and can be adopted in M2M
application scenarios, has been proposed.
CoSIP
• SIP has been defined as a standard protocol for
initiating, modifying and tearing down any type of
end-to-end multimedia session.
• It is independent of the protocol used for data
transfer and from the protocol used for negotiating
the data transfer (such a negotiation protocol can be
encapsulated transparently within the SIP exchange).
CoSIP
CoSIP
Thank You
All The Best