Unit I Introduction To Iot
Unit I Introduction To Iot
3.) 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). A Bluetooth network is called a piconet and a collection of interconnected
piconets is called scatternet.
What is Bluetooth?
Bluetooth simply follows the principle of transmitting and receiving data using radio waves. It can be paired
with the other device which has also Bluetooth but it should be within the estimated communication range
to connect. When two devices start to share data, they form a network called piconet which can further
accommodate more than five devices.
Points to remember for 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:
The architecture of Bluetooth defines two types of networks:
1. Piconet
2. Scatternet
Piconet:
Piconet is a type of Bluetooth network that contains one primary node called the master node and seven
active secondary nodes called slave nodes. Thus, we can say that there is a total of 8 active nodes which are
present at a distance of 10 meters. The communication between the primary and secondary nodes can be
one-to-one or one-to-many. Possible communication is only between the master and slave; Slave-slave
communication is not possible. It also has 255 parked nodes, these are secondary nodes and cannot take
participation in communication unless it gets converted to the active state.
Scatternet:
It is formed by using various piconets. A slave that is present in one piconet can act as master or we can say
primary in another piconet. This kind of node can receive a message from a master in one piconet and
deliver the message to its slave in the other piconet where it is acting as a master. This type of node is
referred to as a bridge node. A station cannot be mastered in two piconets.
Radio (RF) layer: It specifies the details of the air interface, including frequency, the use of
frequency hopping and transmit power. It performs modulation/demodulation of the data into RF
signals. It defines the physical characteristics of Bluetooth transceivers. It defines two types of
physical links: connection-less and connection-oriented.
Baseband Link layer: The baseband is the digital engine of a Bluetooth system and is equivalent to
the MAC sublayer in LANs. It performs the connection establishment within a piconet, addressing,
packet format, timing and power control.
Link Manager protocol layer: It performs the management of the already established links which
includes authentication and encryption processes. It is responsible for creating the links, monitoring
their health, and terminating them gracefully upon command or failure.
Logical Link Control and Adaption (L2CAP) Protocol layer: It is also known as the heart of the
Bluetooth protocol stack. It allows the communication between upper and lower layers of the
Bluetooth protocol stack. It packages the data packets received from upper layers into the form
expected by lower layers. It also performs segmentation and multiplexing.
Service Discovery Protocol (SDP) layer: It is short for Service Discovery Protocol. It allows
discovering the services available on another Bluetooth-enabled device.
RF comm layer: It is a cabal replacement protocol. It is short for Radio Frontend Component. It
provides a serial interface with WAP and OBEX. It also provides emulation of serial ports over the
logical link control and adaption protocol(L2CAP). The protocol is based on the ETSI standard TS
07.10.
OBEX: It is short for Object Exchange. It is a communication protocol to exchange objects between
2 devices.
WAP: It is short for Wireless Access Protocol. It is used for internet access.
TCS: It is short for Telephony Control Protocol. It provides telephony service. The basic function of
this layer is call control (setup & release) and group management for the gateway serving multiple
devices.
Application layer: It enables the user to interact with the application.
Types of Bluetooth
Various types of Bluetooth are available in the market nowadays. Let us look at them.
In-Car Headset: One can make calls from the car speaker system without the use of mobile phones.
Stereo Headset: To listen to music in car or in music players at home.
Webcam: One can link the camera with the help of Bluetooth with their laptop or phone.
Bluetooth-equipped Printer: The printer can be used when connected via Bluetooth with mobile
phone or laptop.
Bluetooth Global Positioning System (GPS): To use GPS in cars, one can connect their phone
with car system via Bluetooth to fetch the directions of the address.
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.
Applications:
It can be used in laptops, and in wireless PCs, printers.
It can be used in wireless headsets, wireless PANs, and LANs.
It can connect a digital camera wirelessly to a mobile phone.
It can transfer data in terms of videos, songs, photographs, or files from one cell phone to another
cell phone or computer.
It is used in the sectors of Medical health care, sports and fitness, Military.
4.) 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 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.
IEEE802.15.4 developed the PHY and MAC layer whereas, the ZigBee takes care of upper higher
layers.
ZigBee is a standard that addresses the need for very low-cost implementation of Low power
devices with Low data rates for short-range wireless communications.
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. ZigBee-compliant devices are
sometimes specified as supporting point-to-point and point-to-multipoint topologies.
Operating Frequency Bands (Only one channel will be selected for use in a network):
Channel 0: 868 MHz (Europe)
Channel 1-10: 915 MHz (the US and Australia)
Channel 11-26: 2.4 GHz (Across the World)
Features of 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:
1. Designed for low power consumption.
2. Provides network security and application support services operating on the top of IEEE.
3. Zigbee makes possible completely networks homes where all devices are able to communicate and
be
4. Use in smart home
5. Easy implementation
6. Adequate security features.
7. Low cost: Zigbee chips and modules are relatively inexpensive, which makes it a cost-effective
solution for IoT applications.
8. Mesh networking: Zigbee uses a mesh network topology, which allows for devices to communicate
with each other without the need for a central hub or router. This makes it ideal for use in smart
home applications where devices need to communicate with each other and with a central control
hub.
9. Reliability: Zigbee protocol is designed to be highly reliable, with robust mechanisms in place to
ensure that data is delivered reliably even in adverse conditions.
Disadvantages of Zigbee :
1. 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.
2. 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.
3. 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.
4. Security: Zigbee’s security features are not as robust as other IoT protocols, making it more
vulnerable to hacking and other security threats.
Zigbee Network Topologies:
Star Topology (ZigBee Smart Energy): Consists of a coordinator and several end devices, end
devices communicate only with the coordinator.
Mesh Topology (Self Healing Process): Mesh topology consists of one coordinator, several routers,
and end devices.
Tree Topology: In this topology, the network consists of a central node which is a coordinator,
several routers, and end devices. the function of the router is to extend the network coverage.
Architecture of Zigbee:
Zigbee architecture is a combination of 6 layers.
a) Application Layer
b) Application Interface Layer
c) Security Layer
d) Network Layer
e) Medium Access Control Layer
f) Physical Layer
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.
Application layer: The application layer in the Zigbee stack is the highest protocol layer and it
consists of the application support sub-layer and Zigbee device object. It contains manufacturer-
defined applications.
Channel Access:
1. Contention Based Method (Carrier-Sense Multiple Access With Collision Avoidance Mechanism)
2. Contention Free Method (Coordinator dedicates a specific time slot to each device (Guaranteed
Time Slot (GTS)))
Zigbee Applications:
1. Home Automation
2. Medical Data Collection
3. Industrial Control Systems
4. meter reading system
5. light control system
6. Commercial
7. Government Markets Worldwide
8. Home Networking
5) Wi-Fi:
Wi-Fi is a wireless networking technology, by which we can access networks or connect with other
computers or mobile using a wireless medium. In Wi-Fi, data are transferred over radio frequencies in a
circular range.
Wi-Fi, a brand name given by the Wi-Fi Alliance (formerly Wireless Ethernet Compatibility Alliance), is a
generic term that refers to the communication standard for the wireless network which works as a Local
Area Network to operate without using the cable and any types of wiring. It is known as WLAN. The
communication standard is IEEE 802.11. Wi-Fi works using Physical Data Link Layer.
Nowadays in all mobile computing devices such as laptops, mobile phones, also digital cameras, smart TVs
has the support of Wi-Fi. The Wi-Fi connection is established from the access point or base station to the
client connection or any client-to-client connection within a specific range, the range depends on the router
which provides the radio frequency through Wi-Fi. These frequencies operate on 2 types of bandwidth at
present, 2.4 GHz and 5 GHz.
All the modern laptops and mobiles are capable of using both bandwidths, it depends on the Wi-Fi adapter
which is inside the device to catch the Wi-Fi signal. 2.4 GHz is the default bandwidth supported by all the
devices. 2.4 GHz can cover a big range of areas to spread the Wi-Fi signal but the frequency is low, so in
simple words, the speed of the internet is less and 5 GHz bandwidth is for a lower range of area but the
frequency is high so the speed is very high.
Let’s say, if there is an internet connection of 60 MB/s bandwidth, then for 2.4 GHz bandwidth, it provides
approx 30 to 45 MB/s of bandwidth connection and for 5 GHz bandwidth, it provides approx 50 to 57 MB/s
bandwidth.
Applications of Wi-Fi:
Wi-Fi has many applications, it is used in all the sectors where a computer or any digital media is used, also
for entertaining Wi-Fi is used. Some of the applications are mentioned below –
Accessing Internet: Using Wi-Fi we can access the internet in any Wi-Fi-capable device wirelessly.
We can stream or cast audio or video wirelessly on any device using Wi-Fi for our entertainment.
We can share files, data, etc between two or more computers or mobile phones using Wi-Fi, and the
speed of the data transfer rate is also very high. Also, we can print any document using a Wi-Fi
printer, this is very much used nowadays.
We can use Wi-Fi as HOTSPOTS also, it points Wireless Internet access for a particular range of
area. Using Hotspot the owner of the main network connection can offer temporary network access
to Wi-Fi-capable devices so that the users can use the network without knowing anything about the
main network connection. Wi-Fi adapters are mainly spreading radio signals using the owner
network connection to provide a hotspot.
Using Wi-Fi or WLAN we can construct simple wireless connections from one point to another,
known as Point to point networks. This can be useful to connect two locations that are difficult to
reach by wire, such as two buildings of corporate business.
One more important application is VoWi-Fi, which is known as voice-over Wi-Fi. Some years ago
telecom companies are introduced VoLTE (Voice over Long-Term Evolution ). Nowadays they are
introduced to VoWi-Fi, by which we can call anyone by using our home Wi-Fi network, only one
thing is that the mobile needs to connect with the Wi-Fi. Then the voice is transferred using the Wi-
Fi network instead of using the mobile SIM network, so the call quality is very good. Many mobile
phones are already getting the support of VoWi-Fi.
Wi-Fi in offices: In an office, all the computers are interconnected using Wi-Fi. For Wi-Fi, there are
no wiring complexities. Also, the speed of the network is good. For Wi-Fi, a project can be
presented to all the members at a time in the form of an excel sheet, ppt, etc. For Wi-Fi, there is no
network loss as in cable due to cable break.
Also using W-Fi a whole city can provide network connectivity by deploying routers at a specific
area to access the internet. Already schools, colleges, and universities are providing networks using
Wi-Fi because of its flexibility.
Wi-Fi is used as a positioning system also, by which we can detect the positions of Wi-Fi hotspots to
identify a device location.
Types of Wi-Fi:
Wi-Fi has several types of standards, which are discussed earlier, here just the name of the standards are
defined,
Internet Protocols are a set of rules that governs the communication and exchange of data over the internet.
Both the sender and receiver should follow the same protocols in order to communicate the data. In order to
understand it better, let’s take an example of a language. Any language has its own set of vocabulary and
grammar which we need to know if we want to communicate in that language. Similarly, over the internet
whenever we access a website or exchange some data with another device then these processes are
governed by a set of rules called the internet protocols.
Working of internet protocol: The internet and many other data networks work by organizing data into
small pieces called packets. Each large data sent between two network devices is divided into smaller
packets by the underlying hardware and software. Each network protocol defines the rules for how its data
packets must be organized in specific ways according to the protocols the network supports.
2. SMTP(Simple Mail Transfer Protocol): These protocols are important for sending and distributing
outgoing emails. This protocol uses the header of the mail to get the email id of the receiver and enters the
mail into the queue of outgoing mails. And as soon as, it delivers the mail to the receiving email id, it
removes the email from the outgoing list. The message or the electronic mail may consider of text, video,
image etc. It helps in setting up of some communication server rules.
3. PPP(Point to Point Protocol): It is a communication protocol that is used to create a direct connection
between two communicating devices. This protocol defines the rules using which two devices will
authenticate with each other and exchange information with each other. For example, A user connects his
PC to the server of an Internet Service Provider also uses PPP. Similarly, for connecting two routers for
direct communication it uses PPP.
4. FTP (File Transfer Protocol): This protocol is used for transferring files from one system to the other.
This works on a client-server model. When a machine requests for file transfer from another machine, the
FTO sets up a connection between the two and authenticates each other using their ID and Password. And,
the desired file transfer takes place between the machines.
5. SFTP(Secure File Transfer Protocol): SFTP which is also known as SSH FTP refers to File Transfer
Protocol (FTP) over Secure Shell (SSH) as it encrypts both commands and data while in transmission. SFTP
acts as an extension to SSH and encrypts files and data then sends them over a secure shell data stream. This
protocol is used to remotely connect to other systems while executing commands from the command line.
6. HTTP(Hyper Text Transfer Protocol): This protocol is used to transfer hypertexts over the internet and
it is defined by the www(world wide web) for information transfer. This protocol defines how the
information needs to be formatted and transmitted. And, it also defines the various actions the web browsers
should take in response to the calls made to access a particular web page. Whenever a user opens their web
browser, the user will indirectly use HTTP as this is the protocol that is being used to share text, images,
and other multimedia files on the World Wide Web.
7. HTTPS(HyperText Transfer Protocol Secure): HTTPS is an extension of the Hypertext Transfer Protocol
(HTTP). It is used for secure communication over a computer network with the SSL/TLS protocol for
encryption and authentication. So, generally, a website has an HTTP protocol but if the website is such that
it receives some sensitive information such as credit card details, debit card details, OTP, etc then it requires
an SSL certificate installed to make the website more secure. So, before entering any sensitive information
on a website, we should check if the link is HTTPS or not. If it is not HTTPS then it may not be secure
enough to enter sensitive information.
8. TELNET(Terminal Network): TELNET is a standard TCP/IP protocol used for virtual terminal service
given by ISO. This enables one local machine to connect with another. The computer which is being
connected is called a remote computer and which is connecting is called the local computer. TELNET
operation lets us display anything being performed on the remote computer in the local computer. This
operates on the client/server principle. The local computer uses the telnet client program whereas the remote
computer uses the telnet server program.
9. POP3(Post Office Protocol 3): POP3 stands for Post Office Protocol version 3. It has two Message
Access Agents (MAAs) where one is client MAA (Message Access Agent) and another is server
MAA(Message Access Agent) for accessing the messages from the mailbox. This protocol helps us to
retrieve and manage emails from the mailbox on the receiver mail server to the receiver’s computer. This is
implied between the receiver and receiver mail server. It can also be called as one way client server
protocol. The POP3 WORKS ON THE 2 PORTS I.E. PORT 110 AND PORT 995.
10. IPv4: The fourth and initially widely used version of the Internet Protocol is called IPv4 (Internet
Protocol version 4). It is the most popular version of the Internet Protocol and is in charge of distributing
data packets throughout the network. Maximum unique addresses for IPv4 are 4,294,967,296 (232), which
are possible due to the use of 32-bit addresses. The network address and the host address are the two
components of each address. The host address identifies a particular device within the network, whereas the
network address identifies the network to which the host belongs.In “dotted decimal” notation, which is the
standard for IPv4 addresses, each octet (8 bits) of the address is represented by its decimal value and
separated by a dot (e.g. 192.168.1.1).
11. IPv6: The most recent version of the Internet Protocol, IPv6, was created to address the IPv4 protocol’s
drawbacks. A maximum of 4.3 billion unique addresses are possible with IPv4’s 32-bit addresses.
Contrarily, IPv6 uses 128-bit addresses, which enable a significantly greater number of unique addresses.
This is significant because IPv4 addresses were running out and there are an increasing number of devices
that require internet access. Additionally, IPv6 offers enhanced security features like integrated
authentication and encryption as well as better support for mobile devices. IPv6 support has spread among
websites and internet service providers, and it is anticipated to gradually displace IPv4 as the main internet
protocol.
12. ICMP: ICMP (Internet Control Message Protocol) is a network protocol that is used to send error
messages and operational information about network conditions. It is an integral part of the Internet
Protocol (IP) suite, and is used to help diagnose and troubleshoot issues with network connectivity. ICMP
messages are typically generated by network devices, such as routers, in response to errors or exceptional
conditions encountered in forwarding a datagram. Some examples of ICMP messages include:
13. UDP: UDP (User Datagram Protocol) is a connectionless, unreliable transport layer protocol. Unlike
TCP, it does not establish a reliable connection between devices before transmitting data, and it does not
guarantee that data packets will be received in the order they were sent or that they will be received at all.
Instead, UDP simply sends packets of data to a destination without any error checking or flow control. UDP
is typically used for real-time applications such as streaming video and audio, online gaming, and VoIP
(Voice over Internet Protocol) where a small amount of lost data is acceptable and low latency is important.
UDP is faster than TCP because it has less overhead. It doesn’t need to establish a connection, so it can send
data packets immediately. It also doesn’t need to wait for confirmation that the data was received before
sending more, so it can transmit data at a higher rate.
14. IMAP: IMAP (Internet Message Access Protocol) is a protocol used for retrieving emails from a mail
server. It allows users to access and manage their emails on the server, rather than downloading them to a
local device. This means that the user can access their emails from multiple devices and the emails will be
synced across all devices. IMAP is more flexible than POP3 (Post Office Protocol version 3) as it allows
users to access and organize their emails on the server, and also allows multiple users to access the same
mailbox.
15. SSH: SSH (Secure Shell) is a protocol used for secure remote login and other secure network services. It
provides a secure and encrypted way to remotely access and manage servers, network devices, and other
computer systems. SSH uses public-key cryptography to authenticate the user and encrypt the data being
transmitted, making it much more secure than traditional remote login protocols such as Telnet. SSH also
allows for secure file transfers using the SCP (Secure Copy) and SFTP (Secure File Transfer Protocol)
protocols. It is widely used in Unix-based operating systems and is also available for Windows. It is
commonly used by system administrators, developers, and other technical users to remotely access and
manage servers and other network devices.
7.) UPnP
Universal Plug and Play (UPnP) is a networking protocol or a set of networking protocols which enables
devices like personal computers, WiFi, Mobile devices, printers etc. to discover each other and establish
connections for sharing services and data and also entertainment purposes. UPnP is intended to be used on
residential networks.UPnP can be considered as an extension of Plug and Play which enables users to
connect devices directly to a computer without any manual configurations to the device or to the computer.
UPnP allows direct networking between home appliances like printers, personal computers, mobile devices,
and many more. It uses established standard industry protocols like TCP/IP, XML, Simple Object Access
Protocol (SOAP), UDP, DHCP (Dynamic Host Configuration Protocol), DNS (Domain Name System).
UPnP technology was initially promoted by UPnP forum which was an initiative by various vendors.
Working:
UPnP assumes that a device is compatible with Internet Protocol (IP) Addressing, for using protocols built
on it, like Hyper Text Transfer Protocol (HTTP), Extensible Markup Language (XML), Transmission
Control Protocol (TCP), User Datagram Protocol (UDP). It uses these protocols to advertise the device’s
presence and for data transfer.It uses port 1900 on UDP.
Addressing:
1. UPnP uses IP addressing. Hence, when it is initiated it acts as a Dynamic Host Configuration
Protocol (DHCP) client to assign itself an IP and searches for a DHCP server.
2. If no DHCP server is found, the device assigns itself an IP using a process known as AutoIP, which
assigns an IP unique to its local network.
3. If during DHCP transaction, device gets a domain name through a Domain Name Server(DNS), it
uses that domain name, else it uses it’s IP.
Simple Service Discovery Protocol (SSDP):
SSDP is the protocol used by UPnP devices to discover each other.
1. When device is added to the network, it allows the device to advertise it’s services to other devices
on the network, by sending SSDP alive messages.
2. SSDP also allows a device to passively listen to SSDP alive messages from other devices on the
network.
3. When two devices discover each other, a discovery message is exchanged, it contains essential
information like the device type and it’s services.
Device Description:
When devices discover each other, for the devices to learn more about each other they exchange
information in XML format. These messages contain information like Manufacturer name, Model Name,
Manufacturer Websites, services provided by device, parameters or arguments to be passed to the device for
a service, etc.
Service Calls:
After getting information about the device and it’s services, the control point can call for the service to the
URL provided by manufacturer, this call is much like a programming function call. This is done by a
protocol known as Simple Object Access Protocol(SOAP) which passes XML messages.
General Event Notification Architecture (GENA):
GENA is the architecture used for event notification in UPnP. This is used by services to respond to service
calls. A control point can subscribe to a device’s event notification, each device has a set of Model
variables, when there is a change in them, control point gets notified. These messages are also sent in XML
format.
Presentation:
A device may contain a manufacturer website URL for presentation, this can be used by a control point to
retrieve information and also can be used by the user to customize the device settings on a web browser.
Advantages of UPnP:
It can be used for NAT traversal or Firewall punching.
It allows real Plug and Play compatibility.
It is backed by various big vendors and companies like Microsoft and Intel, which makes it an
industry standard.
It is an ideal architecture for home devices and networks.
Disadvantages of UPnP:
Control points do not require any authentication, hence any program on your computer can ask to
forward a UPnP port
UPnP has no official implementation, hence every router has its own implementation, many
implementations have bugs or give a open passage to malware
Any malicious program on your network can use UPnP, in the same way a legitimate program uses
it.
8.) CoAP
CoAP stands for Constrained Application Protocol and it is defined in RFC 7252. CoAP is a simple
protocol with low overhead specifically designed for constrained devices (such as microcontrollers) and
constrained networks. This protocol is used in M2M data exchange and it is very similar to HTTP even if
there are important differences that we will cover laters.
The main features of CoAP protocols are:
As you can see there are two different layers that make CoAp protocol: Messages and Request/Response.
The Messages layer deals with UDP and with asynchronous messages. The Request/Response layer
manages request/response interaction based on request/response messages.
Confirmable
Non-confirmable
Acknowledgment
Reset
Before going deeper into the CoAp protocol structure is useful to define some terms that we will use later:
Endpoint: An entity that participates in the CoAP protocol. Usually, an Endpoint is identified with a host
Sender: The entity that sends a message
Recipient: The destination of a message
Client: The entity that sends a request and the destination of the response
Server: The entity that receives a request from a client and sends back a response to the client
This is the lowest layer of CoAP. This layer deals with UDP exchanging messages between endpoints. Each
CoAP message has a unique id, this is useful to detect message duplicates. A CoAP message is built by
these parts:
a binary header
a compact options
payload
Later, we will describe the message format in more details.
Confirmable message
Non-confirmable message
A confirmable message is a reliable message. When exchanging messages between two endpoints, these
messages can be reliable. In CoAP a reliable message is obtained using a Confirmable message (CON).
Using this kind of message, the client can be sure that the message will arrive at the server. A Confirmable
message is sent again and again until the other party sends an acknowledge message (ACK). The ACK
message contains the same ID of the confirmable message (CON).
If the server has troubles managing the incoming request it can send back a Rest message (RST) instead of
the Acknowledge message (ACK):
The other message category is the Non-confirmable (NON) messages. These are messages that don’t require
an Acknowledge by the server. They are unreliable messages or in other words messages that do not contain
critical information that must be delivered to the server. To this category belongs messages that contain
values read from sensors.
The CoAP Request/Response is the second layer in the CoAP abstraction layer. The request is sent using a
Confirmable (CON) or Non-Confirmable (NON) message. There are several scenarios depending on if the
server can answer immediately to the client request or the answer if not available:
If the server can answer immediately to the client request then if the request is carried using a Confirmable
message (CON) then the server sends back to the client an Acknowledge message containing the response
or the error code:
As you can notice in the CoAP message there is a Token. The Token is different from the Message ID and it
is used to match the request and the response.
If the server can’t answer to the request coming from the client immediately, then it sends an Acknowledge
message with an empty response. As soon as the response is available then the server sends a new
Confirmable message to the client containing the response. At this point the client sends back an
Acknowledge message:
If the request coming from the client is carried using a NON-confirmable message then the server answer
using a NON-confirmable message.
This paragraph covers the CoAP Message format. By now we have discussed different kinds of messages
exchanged between the client and the server, now it is time to analyze the message format. The constrained
application protocol is meat for constrained environments and for this reason, it uses compact messages. To
avoid fragmentation, a message occupies the data section of a UDP datagram. A message is made by several
parts:
Where:
Ver: It is a 2 bit unsigned integer indicating the version
T: it is a 2 bit unsigned integer indicating the message type: 0 confirmable, 1 non-confirmable
TKL: Token Length is the token 4 bit length
Code: It is the code response (8 bit length)
Message ID: It is the message ID expressed with 16 bit
and so on.
9.) MQTT
MQTT is simple, lightweight messaging protocol used to establish communication between multiple
devices. It is TCP-based protocol relying on the publish-subscribe model. This communication protocol is
suitable for transmitting data between resource-constrained devices having low bandwidth and low power
requirements. Hence this messaging protocol is widely used for communication in IoT Framework.
Publish-Subscribe Model :
This model involves multiple clients interacting with each other, without having any direct connection
established between them. All clients communicate with other clients only via third party known as Broker.
Clients publish messages on different topics to broker. The broker is the central server that receives these
messages and filters them based on their topics. It then sends these messages to respective clients that have
subscribed to those different topics.
Hence client that has subscribed to a specific topic receives all messages published on that topic.
Here the broker is central hub that receives messages, filters them, and distributes them to appropriate
clients, such that both message publishers, as well as subscribers, are clients.
Advantages :
1. Easy Scalability – This model is not restricted to one-to-one communication between clients.
Although the publisher client sends a single message on specific topic, broker sends multiple
messages to all different clients subscribed to that topic. Similarly, messages sent by multiple such
publisher clients on multiple different topics will be sent to all multiple clients subscribed to those
topics.
Hence one-to-many, many-to-one, as well as many-to-many communication is possible using this
model. Also, clients can publish data and at the same time receive data due to this two-way
communication protocol. Hence MQTT is considered to be bi-directional protocol. The default
unencrypted MQTT port used for data transmission is 1883. The encrypted port for secure
transmission is 8883.
2. Eliminates insecure connections – In a complex system where multiple devices are connected with
each other, each device not only has to manage its connections with other devices but also has to
ensure that these connections are secure. But in the publish-subscribe model, the broker becomes
central server managing all security aspects. It is responsible for the authentication and authorization
of all connected clients.
3. Lightweight Communication – Data transmission is quick, efficient, and lightweight because
MQTT messages have small code footprint. These control messages have a fixed header of size 2
bytes and payload message up to size 256 megabytes.
10.) XMPP
XMPP is a short form for Extensible Messaging Presence Protocol. It’s protocol for streaming XML
elements over a network in order to exchange messages and presence information in close to real time. This
protocol is mostly used by instant messaging applications like WhatsApp.
X: It means eXtensible. XMPP is a open source project which can be changed or extended according
to the need.
M: XMPP is designed for sending messages in real time. It has very efficient push mechanism
compared to other protocols.
P: It determines whether you are online/offline/busy. It indicates the state.
P: XMPP is a protocol, that is, a set of standards that allow systems to communicate with each other.
These are the basic requirements of any Instant Messenger which are fulfilled by XMPP:
#JID
user,
server,
resource
For example, I’m a whatsApp user and I’m identified by my mobile number, so
user = "8767898790"
server = "whatsapp.com"
resource = "mobile"
JID : "[email protected]/mobile"
resource is used in case the application support mobile as well as desktop or web application, so it can be
optional in case a Instant Messenger Application support only single kind of resource.
XMPP implementation – The original protocol for XMPP is Transmission Control Protocol, using open
ended XML streams over long lived TCP connections.
In some cases, there are restricted firewalls, XMPP(port 5222) is blocked, so it can’t be used for web
applications and users behind restricted firewalls, to overcome this, XMPP community also developed a
HTTP transport.
And as the client uses HTTP, most firewalls allow clients to fetch and post messages without any problem.
Thus, in scenarios where the TCP port used by XMPP is blocked, a server can listen on the normal HTTP
port and the traffic should pass without problems.
11.) SCADA
A large number of processes occur in large industrial establishments. Every process, you need to monitor is
very complex because each machine gives the different output. The SCADA system used to gather data
from sensors and instruments located in remote areas. The computer then processes this data and presents it
promptly. The SCADA system gathers the information (like a leak on a pipeline occurred) and transfers the
information back to the system while giving the alerts that leakage has occurred and displays the
information in a logical and organized fashion. The SCADA system used to run on DOS and UNIX
operating systems. This entire process is known as automation. This article discusses an overview of the
SCADA system.
SCADA stands for supervisory control and data acquisition. It is a type of software application program for
process control. SCADA is a central control system that consists of controllers network interfaces,
input/output, communication equipment, and software. SCADA systems are used to monitor and control the
equipment in the industrial process which includes manufacturing, production, development, and
fabrication. The infrastructural processes include gas and oil distribution, electrical power, water
distribution. Public utilities include a bus traffic system, airport. The SCADA system takes the reading of
the meters and checks the status of sensors in regular intervals so that it requires minimal interference of
humans.
General SCADA Network
History of SCADA
Earlier, the controlling of industrial plants and manufacturing floors can be done manually with the help of
analog equipment and push-buttons. As the industry’s size is growing, so they employed timers and relays
to provide supervisory control to a fixed level for minimal automation. So, a fully automated with a more
efficient system was necessary for all the industries.
We know that, for industrial control purposes, computers were implemented in the year 1950. After that, the
concept of telemetry was implemented for data transmission as well as virtual communication. In the year
1970, the SCADA system was developed along with the microprocessors as well as PLC.
So these concepts were fully helped while developing automation that is operated in industries remotely.
The distributed SCADA systems were implemented in the year 2000. After that, new SCADA systems were
developed to monitor & control real-time data anyplace in the globe.
Generally, the SCADA system is a centralized system that monitors and controls the entire area. It is a pure
software package that is positioned on top of the hardware. A supervisory system gathers data on the
process and sends the commands control to the process. The SCADA is a remote terminal unit which is also
known as RTU.
Most control actions are automatically performed by RTUs or PLCs. The RTUs consists of the
programmable logic converter which can be set to specific requirement. For example, in the thermal power
plant, the water flow can be set to a specific value or it can be changed according to the requirement.
The SCADA system allows operators to change the set point for the flow, and enable alarm conditions in
case of loss of flow and high temperature, and the condition is displayed and recorded. The SCADA system
monitors the overall performance of the loop. The SCADA system is a centralized system to communicate
with both wired and wireless technology to Clint devices. The SCADA system controls can run completely
all kinds of the industrial process.
For example, if too much pressure is building up in a gas pipeline the SCADA system can automatically
open a release valve.
Hardware Architecture
Client layer
Data server layer
The data server layer handles most of the process of data activities.
The SCADA station refers to the servers and it is composed of a single PC. The data servers communicate
with devices in the field through process controllers like PLCs or RTUs. The PLCs are connected to the data
servers either directly or via networks or buses. The SCADA system utilizes a WAN and LAN networks,
the WAN and LAN consist of internet protocols used for communication between the master station and
devices.
The physical equipment like sensors connected to the PLCs or RTUs. The RTUs convert the sensor signals
to digital data and sends digital data to the master. According to the master feedback received by the RTU,
it applies the electrical signal to relays. Most of the monitoring and control operations are performed by
RTUs or PLCs as we can see in the figure.
Software Architecture
Most of the servers are used for multitasking and real-time database. The servers are responsible for data
gathering and handling. The SCADA system consists of a software program to provide trending, diagnostic
data, and manage information such as scheduled maintenance procedures, logistic information, detailed
schematics for a particular sensor or machine, and expert-system troubleshooting guides. This means the
operator can see a schematic representation of the plant being controlled.
Examples are alarm checking, calculations, logging, and archiving; polling controllers on a set of
parameters, those are typically connected to the server.
Data Acquisitions
Data Communication
Information/Data presentation
Monitoring/Control
These functions are performed by sensors, RTUs, controllers, a communication network. The sensors are
used to collect the important information and RTUs are used to send this information to the controller and
display the status of the system. According to the status of the system, the user can give the command to
other system components. This operation is done by the communication network.
Data Acquisitions
The real-time system consists of thousands of components and sensors. It is very important to know the
status of particular components and sensors. For example, some sensors measure the water flow from the
reservoir to the water tank and some sensors measure the value pressure as the water is released from the
reservoir.
Data Communication
The SCADA system uses a wired network to communicate between users and devices. Real-time
applications use a lot of sensors and components which should be controlled remotely. The SCADA system
uses internet communications. All information is transmitted through the internet using specific protocols.
Sensors and relays are not able to communicate with the network protocols so RTUs used to communicate
sensors and network interfaces.
Information/Data Presentation
The normal circuit networks have some indicators which can be visible to control but in the real-time
SCADA system, there are thousands of sensors and alarm which are impossible to be handled
simultaneously. The SCADA system uses the human-machine interface (HMI) to provide all of the
information gathered from the various sensors.
Monitoring/Control
The SCADA system uses different switches to operate each device and displays the status of the control
area. Any part of the process can be turned ON/OFF from the control station using these switches. SCADA
system is implemented to work automatically without human intervention but in critical situations, it is
handled by manpower.
SCADA Components
Supervisory System
The supervisory system works like a communication server among the human-machine interface software
within the control room of workstations as well as its apparatus such as RTUs, Sensors, PLCs, etc. Smaller
SCADA systems include simply a single personal computer to serve like a master system otherwise
supervisory whereas, large SCADA systems include numerous servers, sites for tragedy recovery as well as
distributed software applications. The servers are connected like hot-standby formation otherwise dual-
redundant to monitor server failure continuously.
RTUs (Remote Terminal Units)
The RTU or remote terminal unit is an electronic device and it is also known as remote telemetry units. This
system comprises physical objects that are interfaced through RTUs.
The controlling of these devices can be done through microprocessors. Here, microprocessors are utilized
for controlling RTUs which are used to transmit the recorded data toward the supervisory system. The data
can be received from the master system for controlling the connected objects.
The term PLC stands for programmable logic controllers which are used in SCADA systems with the help
of sensors. These controllers are connected to the sensors for converting the output signal of the sensor into
digital data. As compared with RTUs, these are used due to their flexibility, configuration, versatility &
affordability.
Communication Infrastructure
In the SCADA system, a mix of radio & the direct-wired connection is used. But, SONET or SDH can also
be utilized for superior systems such as power stations & railways. Few standardized 7 recognized protocols
are used between the compact SCADA protocols to deliver information simply once the RTUs are polled
through the supervisory station.
SCADA Programming
In HMI otherwise master station, SCADA programming is mainly used to make maps, diagrams to provide
very important information throughout progression otherwise when event failure occurs. Most of the
commercial SCADA systems utilize consistent interfaces in C programming language otherwise derived
programming language can also be used.
The SCADA system uses the human-machine interface. The information is displayed and monitored to be
processed by a human. HMI provides access to multiple control units which can be PLCs and RTUs. The
HMI provides the graphical presentation of the system.
For example, it provides a graphical picture of the pump connected to the tank. The user can see the flow of
the water and the pressure of the water. The important part of the HMI is an alarm system that is activated
according to the predefined values.
For example, the tank water level alarm is set 60% and 70% values. If the water level reaches above 60%
the alarm gives a normal warning and if the water level reaches above 70% the alarm gives a critical
warning.
SCADA systems are classified into four types which include the following.
Monolithic SCADA systems are called as early or first-generation systems. In these types of systems,
minicomputers are used. The development of these systems can be done when common network services
are not available. The designing of these systems can be done like independent systems without any relation
to other systems.
The data can be gathered from all RTUs using a backup mainframe. The main functions of these first-
generation systems are restricted to flagging processes in crisis cases &to monitor the sensors.
Distributed SCADA systems are called second-generation systems. The distribution of the control functions
can be done across numerous systems by connecting with a local area network. The control operations can
be performed by sharing real-time data & command processing.
In these types of systems, the size and cost of each station are reduced however there were no consistent
network protocols. As the protocols were proprietary, fewer people understand the SCADA system security
while installation & this factor were ignored largely.
Networked SCADA Systems
The networked SCADA systems are also known as third-generation systems. The networking and
communication of present SCADA systems can be done using the WAN system through data lines or
phones. The data transmission among two nodes can be done with the help of Ethernet or Fiber-optic
connections.
This type of SCADA system uses PLC to adjust and monitor the flagging operations simply once there is a
necessity for main choices.
IoT SCADA systems are fourth-generation systems. In these systems, the system’s infrastructural cost is
reduced by implementing IoT through cloud computing. Maintaining as well as integrating these systems is
easy as compared with others.
In real-time, the condition of these systems can be reported through cloud computing. Therefore the
implementation of algorithms like intricate control can be done that are frequently used on usual PLCs.
SCADA Security
At present, SCADA networks are used extensively in current industries to check & examine real-time data,
industrial processes can be controlled, communicate with devices. So SCADA systems are essential for
industrial organizations because these systems include hardware & software. So, SCADA security is also
essential in industries.
The term SCADA security is used to protect the SCADA networks which are fabricated with computer
hardware. SCADA networks used by some of the systems are electricity, natural gas, etc. The private and
government organizations have taken the measures of these networks because of the valuable role to make
sure the security of the SCADA systems.
Examples of SCADA Security
Hackers
Terrorists
Malware
Error Inside
The weakness of SCADA security mainly occurs because of the following reasons.
Poor Training
Loopholes Development of App
Issues while Monitoring
Less Maintenance
The SCADA system can be protected by mapping all present systems, monitoring, and detecting the
institute, and create processes for the security of the network.
In large industrial establishments, many processes occur simultaneously and each needs to be monitored,
which is a complex task. The SCADA systems are used to monitor and control the equipment in the
industrial processes which include water distribution, oil distribution, and power distribution. The main aim
of this project is to process the real-time data and control the large scale remote industrial environment. In
the real-time scenario, a temperature logging system for a remote plant operation is taken.
The temperature sensors are connected to the microcontroller, which is connected to the PC at the front end,
and software is loaded on the computer. The data is collected from the temperature sensors. The
temperature sensors continuously send the signal to the microcontroller which accordingly displays these
values on its front panel.
One can set the parameters like low limit and high limit on the computer screen. When the temperature of a
sensor goes above-set point the microcontroller sends a command to the corresponding relay. The heaters
connected through relay contacts are turned OFF and ON.
This is a temperature logging system. Here 8 temperature sensors in multiplexing mode are connected to the
microcontroller through ADC 0808. Then the values of all the sensors are sent serially by the
microcontroller through Max 32 to the com port of the PC. A Software “DAQ System” loaded on the PC
takes these values and show them on its front panel, and also logs them to the database “daq.mdb”.
One can set by the interactive way some parameters like a set point, low limit, and high limit on the
computer screen. When the temperature of some sensor increases beyond the setpoint, the microcontroller
sends commands to relay driver IC. The heaters connected through relay contacts are (specific for that
sensor) turned OFF (or ON in opposite case). High limit and low limits are for alarm. When the temperature
goes above the high limit or below the low limit the alarm will be turned on.
Advantages
Applications
User authentication is the first most priority while responding to the request made by the user to the
software application. There are several mechanisms made which are required to authenticate the access
while providing access to the data. In this blog, we will explore the most common authentication protocols
and will try to explore their merits and demerits.
1. Kerberos :
Kerberos is a protocol that aids in network authentication. This is used for validating clients/servers during a
network employing a cryptographic key. It is designed for executing strong authentication while reporting
to applications. The overall implementation of the Kerberos protocol is openly available by MIT and is used
in many mass-produced products.
5. RADIUS:
RADIUS stands for Remote Authentication Dial-In User Service. It is a network protocol that provides
sufficient centralized Authentication, Accounting, and Authorization for the users that use and network
services. The functioning of the protocol occurs when the user requests access to network resources, where
the RADIUS server encrypts the credentials which are entered by the user. After this, the user credentials
are mapped through the local database and provide access.
Some advantages of RADIUS:
It is a great mechanism for providing multiple access for Admins.
It provides a unique identity to each user in a session.
Some disadvantages of RADIUS:
Initial implementation for this mechanism is hard on hardware.
It has a variety of models that may require a special team which is cost consuming.
IEEE 802.15.4e:
802.15.4e for industrial applications and 802.15.4g for the smart utility networks (SUN)
The 802.15.4e improves the old standard by introducing mechanisms such as time slotted access,
multichannel communication and channel hopping.
IEEE 802.15.4e introduces the following general functional enhancements:
1. Low Energy (LE): This mechanism is intended for applications that can trade latency for energy
efficiency. It allows a node to operate with a very low duty cycle.
2. Information Elements (IE) It is an extensible mechanism to exchange information at the MAC sublayer.
3. Enhanced Beacons (EB): Enhanced Beacons are an extension of the 802.15.4 beacon frames and provide
a greater flexibility. They allow to create application-specific frames.
4. Multipurpose Frame: This mechanism provides a flexible frame format that can address a number of
MAC operations. It is based on IEs.
5. MAC Performance Metric: It is a mechanism to provide appropriate feedback on the channel quality to
the networking and upper layers, so that appropriate decision can be taken.
6. Fast Association (FastA) The 802.15.4 association procedure introduces a significant delay in order to
save energy. For time-critical application latency has priority over energy efficiency.
Properties:
1. Standardization and alliances: It specifies low-data-rate PHY and MAC layer requirements for wireless
personal area networks (WPAN).
IEEE 802.15. Protocol Stacks include:
ZigBee: ZigBee is a Personal Area Network task group with a 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.
6LoWPAN: The 6LoWPAN system is used for a variety of applications including wireless sensor
networks. This form of wireless sensor network sends data as packets and uses IPv6 – providing the
basis for the name – IPv6 over Low power Wireless Personal Area Networks.
ZigBee IP: Zigbee is a standards-based wireless technology that was developed for low-cost and
low-power wireless machine-to-machine (M2M) and internet of things (IoT) networks.
ISA100.11a: It is a mesh network that provides secure wireless communication to process control.
Wireless HART: It is also a wireless sensor network technology, that makes use of time-
synchronized and self-organizing architecture.
Thread: Thread is an IPv6-based networking protocol for low-power Internet of Things devices in
IEEE 802.15. 4-2006 wireless mesh network. Thread is independent.
2. Physical Layer: 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. 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. Based on the frequency range and data
performance needed, there are now six PHYs specified. Four of them employ frequency hopping techniques
known as Direct Sequence Spread Spectrum (DSSS). Both PHY data service and management service share
a single packet structure so that they can maintain a common simple interface with MAC.
3. MAC layer: 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 like:
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.
Several established frame types are used by the MAC layer to accomplish these functions. In 802.15.4, there
are four different types of MAC frames:
frame of data
Frame for a beacon
Frame of acknowledgement
Frame for MAC commands
4. Topology: Networks based on IEEE 802.15.4 can be developed in a star, peer-to-peer, or mesh topology.
Mesh networks connect a large number of nodes. This enables nodes that would otherwise be out of range
to interact with each other to use intermediate nodes to relay data.
5. Security: For data security, the IEEE 802.15.4 standard employs the Advanced Encryption Standard
(AES) with a 128-bit key length as the basic encryption technique. Activating such security measures for
802.15.4 significantly alters the frame format and uses a few of the payloads. The very first phase in
activating AES encryption is to use the Security Enabled field in the Frame Control part of the 802.15.4
header. For safety, this field is a single bit which is assigned to 1. When this bit is set, by taking certain
bytes from its Payload field, a field known as the Auxiliary Security Header is formed following the Source
Address field.
6. Competitive Technologies: The IEEE 802.15.4 PHY and MAC layers serve as a basis for a variety of
networking profiles that operate in different IoT access scenarios. DASH7 is a competing radio technology
with distinct PHY and MAC layers.
IEEE 802.15.4