0% found this document useful (0 votes)
72 views

Fundamentals of IoT

Bluetooth is a short-range wireless technology standard used for exchanging data over short distances between different devices like mobile phones, laptops, printers, etc. It uses radio waves in the ISM band from 2.4-2.485 GHz to transmit data at rates up to 3 Mbps. A Bluetooth network is called a piconet, which can connect up to 8 devices within a range of about 10 meters. Multiple connected piconets form a scatternet.

Uploaded by

Rohit Saindane
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views

Fundamentals of IoT

Bluetooth is a short-range wireless technology standard used for exchanging data over short distances between different devices like mobile phones, laptops, printers, etc. It uses radio waves in the ISM band from 2.4-2.485 GHz to transmit data at rates up to 3 Mbps. A Bluetooth network is called a piconet, which can connect up to 8 devices within a range of about 10 meters. Multiple connected piconets form a scatternet.

Uploaded by

Rohit Saindane
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Bluetooth

Bluetooth is an 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 Transmission capacity 720 kbps.
Bluetooth is Wireless.
Bluetooth is 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 a 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 slave. This type of node is
referred to as a bridge node. A station cannot be mastered in two piconets.

Bluetooth protocol stack: 


1. 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. 
 
2. 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. 
 
3. 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.
 
4. 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. 
 
5. Service Discovery Protocol (SDP) layer: It is short for Service Discovery
Protocol. It allows discovering the services available on another Bluetooth-
enabled device. 
 
6. 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.
 
7. OBEX: It is short for Object Exchange. It is a communication protocol to
exchange objects between 2 devices. 
 
8. WAP: It is short for Wireless Access Protocol. It is used for internet access. 
 
9. 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 gateway serving multiple devices.
 
10.Application layer: It enables the user to interact with the application.

Advantage: 
 Low cost.
 Easy to use.
 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:
 Used in laptops, and in wireless PCs.
 In printers, games
 In wireless headsets.
 Connecting digital camera wirelessly to a mobile phone.
 Data transfer from one cell phone to other cell phone or computer.
 Medical health care 

ZigBee :-
ZigBee is a IEEE 802.15.4 based, low power, low data rate supporting wireless
networking standard, which is basically built for sensor and control system.
It is a short-range communication standard like Bluetooth and Wi-Fi, covering
range of 10 to 100 meters.
The difference being while Bluetooth and Wi-Fi are high data rate
communications standard supporting transfer of complex structure like media,
software etc.
ZigBee Technology supports transfer of simple data collected from sensors.
It supports low data rate of about 250 kbps. The operating frequencies are 868
MHz, 902 to 928 MHz and 2.4 GHz.
ZigBee Technology is used mainly for applications requiring low power, low cost,
low data rate and long battery life.

Types of ZigBee Devices:  


 Zigbee Coordinator Device: It communicates with routers. This device is
used for connecting the devices.
 Zigbee Router: It is used for passing the data between devices.
 Zigbee End Device: It is the device that is going to be controlled.
 
General Characteristics of Zigbee Standard:
 Low Power Consumption
 Low Data Rate (20- 250 kbps)
 Short-Range (75-100 meters)
 Network Join Time (~ 30 msec)
 Support Small and Large Networks
 Low Cost of Products and Cheap Implementation (Open Source Protocol)
 Extremely low-duty cycle.
 3 frequency bands with 27 channels.
Operating Frequency Bands (Only one channel will be selected for use in a
network):
1. Channel 0: 868 MHz (Europe)
2. Channel 1-10: 915 MHz (the US and Australia)
3. Channel 11-26: 2.4 GHz (Across the World)
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.
Disadvantages of Zigbee :
1. It operates on short range i.e. 10-100 meters line of sight.
2. Low transmission rate.
3. It has certain limitations in area of memory size, processing speed of data.
4. Less secure compared to Wi-Fi based security systems.
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: 
1. Application Layer
2. Application Interface Layer
3. Security Layer
4. Network Layer
5. Medium Access Control Layer
6. 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 

WIFI - Wireless Fidelity


Wifi is also known as Wireless Fidelity.
We are all familiar with Wi-Fi, which is available on our mobile phones, laptops, or
wherever Wi-Fi is supported. Wi-Fi is a wireless networking technology that
permits to connect wirelessly to a network or to other computer or mobile
device. A circular radio frequency range is used to transmit data in Wi-Fi.
WLAN stands for Wireless Local Area Network. IEEE 802.11 is the rule for
communication. WiFi uses the Physical Data Link Layer (PDLL) to operate.
The access point or base station to client connection or any client-to-client
connection within a certain limit.
Currently, these frequencies function on 2.4 GHz and 5 GHz bandwidths.
Because the Wi-Fi adapter within the device is responsible for receiving the Wi-Fi
signal, all modern laptops and mobile devices are competent in using both
bandwidths. All devices have a default bandwidth of 2.4 GHz.

Working or Functioning of Wifi


What is the Wi-Fi protocol?
First and foremost, Wi-Fi is a wireless communication system that transmits
networks using electromagnetic waves. The radiofrequency is utilised in Wi-Fi
because we understand that there are several types of electromagnetic waves
based on their frequency, including X-rays, Gamma-rays, radio waves,
microwaves, etc.
Base station network or Ethernet(802.3) connection: It is the primary host
network from which the router receives its network connection.
Access Point or Router - Network bridge, also known as an access point or router,
connects wired and wireless networks. A wired Ethernet connection is accepted,
and the wired connection is converted to a wireless connection, which is then
spread via radio waves.
Accessing Device - There are several ways to gain access to information. From our
mobile, computer, etc., we access Wi-Fi and surf the web using Wi-Fi.
Also, routers and our devices read data in binary form. In this case, routers
transmit radio waves to our devices, obtaining and reading the waves in binary
form. All of us are familiar with the binary representation of a wave, in which the
topmost pick is 1 and the lower pick 0 in binary.

Terminology of WIFI
Another term for Wi-Fi is "wireless LAN."
SSID (Service Set Identifier)-WiFi networks are identified and distinguished from
one another by their service set identification (SSID) numbers, which are 32
characters long. All gadgets are trying to communicate to the same SSID (Service
Set Identifier). SSID stands for "Service Set Identifier" and is the title of the
wireless network.
WPA-PSK (Wi-Fi Protected Access- Pre-Shared Key): It's a programme created by
the Wi-Fi Alliance Authority to safeguard wireless networks using Pre-Shared Key
authentication. WPA comes in three varieties: WPA, WPA2, and WPA3. An
encryption method for Wi-Fi signals to keep out unwanted users.
Ad hoc networks are used by Wi-Fi in order to transmit data. A point-to-point
network without an interface, it's a wireless mesh network.

Advantages of WIFI
1. A versatile network connection and the absence of complicated wiring
requirements for installation.
2. Everywhere in the Wi-Fi range can access it.
3. Independent users are not required to obtain regulatory approval.
4. In addition, Wi-Fi Extenders make it possible to expand the network.
5. It's easy and quick to set up.
6. Only the SSID and password need to be configured.
.
Wi-Fi Disadvantages
1. Batteries consume a lot of power when using Wi-Fi.
2. Even when encryption is in place, security issues can still arise.
3. Wi-Fi can be attacked and accessed in the same way that recognised devices
become unidentified to the router.
4. In comparison to a direct cable connection, the speed is slower.
5. People can be harmed by it because it emits radiation like cell phones.
6. Because it lacks a firewall, unauthorised access to Wi-Fi is possible.

RFID
RFID stands for radio frequency identification, It is a short range wireless
communication technology which uses radio waves to uniquely identify an object,
animal or person.
RFID systems consist of three components: an RFID tag, RFID reader, and an
antenna. RFID tags contain an integrated circuit and an antenna, which are used
to transmit data to the RFID reader (also called an interrogator). The reader then
converts the radio waves to a more usable form of data. Information collected
from the tags is then transferred through a communications interface to a host
computer system, where the data can be stored in a database and analyzed at a
later time.
It consist of the following components
>> RFID Tag
>> RFID Reader
>> Host Computer
RFID tags/ labels/transponder :
RFID tags or transponders are small devices that utilize low-power radio waves to
receive, store, and transmit data to nearby readers.
The main components of RFID tags are : a microchip or integrated circuit (IC), an
antenna, and a substrate or protective material layer that holds all the
components together.
The tag comprises of a simple silicon microchip attached to a small flat aerial and
mounted on a substrate. The whole device can then be encapsulated in different
materials (such as plastic) dependent upon its intended usage. The finished tag
can be attached to an object, typically an item, box or pallet and read remotely
the identity of tag.
Tags, which uses radio waves to communicate their identity and other
information to nearby readers, can be passive or active. Passive RFID tags are
powered by the reader and do not have a battery. Active RFID tags are powered
by batteries. RFID tags can store a range of information from one serial number to
several pages of data.
RFID Reader or Interrogator
In this RFID system, this RFID reader continuously sends radio waves of a
particular frequency. If the object, on which this RFID tag is attached is within the
range of this radio waves then it sends the feedback back to this RFID reader. And
based on this feedback, RFID reader identifies the object.
Host Computer
The data acquired by the readers is then passed to a host computer, which may
run specialist RFID software or middleware to filter the data and route it to the
correct application, to be processed into useful information.

Frequency used in RFID


Frequencies vary greatly by country and region.
Low-frequency RFID systems :- These range from 30 KHzto 500 KHz, though the
typical frequency is 125 KHz. LF RFID has short transmission ranges, generally
anywhere from a few inches to less than six feet.
High-frequency RFID systems :- These range from 3 MHzto 30 MHz, with the
typical HF frequency being 13.56 MHz. The standard range is anywhere from a
few inches to several feet.
UHF RFID systems :- These range from 300 MHz to 960 MHz, with the typical
frequency of 433 MHz and can generally be read from 25-plus feet away.
Microwave RFID systems :- These run at 2.45 Ghzand can be read from 30-plus
feet away.

Mobile Internet
Cellular IoT is the technology that connects physical objects to the Internet
utilising the same cellular network currently used by smartphones. In other
words, this technology can connect IoT devices using existing mobile networks.
Thus, it eliminates the need to invest and develop a separate dedicated network
infrastructure just for IoT devices.
Benefits of Cellular IoT
1. Extensive Coverage
2. Cost-saving
3. Remote Management
4. Flexibility in Connectivity
5. Security
Types of Cellular IoT
IoT can connect via 2G, 3G,4G, or 5G networks. Depending on the needs of the
IoT device and application, there are primarily two types of Cellular IoT
connections, namely, LTE-M and NB-IoT which are the recent IoT specific
variables. Cellular network IoT connectivity options include:
 2G, 3G, 4G: The standard cellular network technologies, which were
originally designed for mobile phones only and now support other types of
devices. While 4G is the current generation, and now 5G has been
launched, yet in many markets IoT is still supported using 2G or 3G
connections.
 LTE Advanced: A faster version of the standard LTE technology. It can be
used in IoT projects like self-driving vehicles which require rapid responses.
 LTE Cat 0: Is a low cost, and relatively low power solution for IoT, but has
the benefits of also supporting Voice and SMS. As voice and SMS both have
a role to play within IoT as well – think about device wake-up and voice
interaction with machines.
 NB-IoT: The cellular response to the need for low power connectivity, using
a cellular compatible connectivity technology. Ideal for battery powered
devices with relatively low data transmission requirements.

Layered Network Architecture


This kind of network uses hundreds of sensor nodes as well as a base station.
Here the arrangement of network nodes can be done into concentric layers. It
comprises five layers as well as 3 cross layers which include the following.
The five layers in the architecture are:
• Application Layer
• Transport Layer
• Network Layer
• Data Link Layer
• Physical Layer
The three cross layers include the following:
• Power Management Plane
• Mobility Management Plane
• Task Management Plane

These three cross layers are mainly used for controlling the network as well as to
make the sensors function as one in order to enhance the overall network
efficiency. The above mentioned five layers of WSN are discussed below.

3.1 Application Layer The application layer is liable for traffic management and
offers software for numerous applications that convert the data in a clear form to
find positive information. Sensor networks arranged in numerous applications in
different fields such as agricultural, military, environment, medical, etc.
3.2 Transport Layer The function of the transport layer is to deliver congestion
avoidance and reliability where a lot of protocols intended to offer this function
are either practical on the upstream. These protocols use dissimilar mechanisms
for loss recognition and loss recovery. The transport layer is exactly needed when
a system is planned to contact other networks. Providing a reliable loss recovery
is more energy-efficient and that is one of the main reasons why TCP is not fit for
WSN. In general, Transport layers can be separated into Packet driven, Event-
driven. There are some popular protocols in the transport layer namely STCP
(Sensor Transmission Control Protocol), PORT (Price-Oriented Reliable Transport
Protocol and PSFQ (pump slow fetch quick).
3.3 Network Layer The main function of the network layer is routing, it has a lot
of tasks based on the application, but actually, the main tasks are in the power
conserving, partial memory, buffers, and sensor don’t have a universal ID and
have to be self-organized. The simple idea of the routing protocol is to explain a
reliable lane and redundant lanes, according to a convincing scale called a metric,
which varies from protocol to protocol. There are a lot of existing protocols for
this network layer, they can be separated into; flat routing and hierarchal routing
or can be separated into time-driven, query-driven & event-driven.
3.4 Data Link Layer The data link layer is liable for multiplexing data frame
detection, data streams, MAC, & error control, confirm the reliability of point–
point (or) point– multipoint.
3.5 Physical Layer The physical layer provides an edge for transferring a stream of
bits above the physical medium. This layer is responsible for the selection of
frequency, generation of a carrier frequency, signal detection, Modulation & data
encryption. IEEE 802.15.4 is suggested as typical for low rate particular areas &
wireless sensor networks with low cost, power consumption, density, the range of
communication to improve the battery life. CSMA/CA is used to support star &
peer to peer topology. There are several versions of IEEE 802.15.4.V. The main
benefits of using this kind of architecture in WSN is that every node involves
simply in less-distance, low- power transmissions to the neighboring nodes due to
which power utilization is low as compared with other kinds of sensor network
architecture. This kind of network is scalable as well as includes a high fault
tolerance
TCP/IP protocol:
The TCP/IP reference model is the most widely used model for internetworking. It
allows diverse networks to communicate with each other. An Internetwork (also
called Internet) is a vast collection of interconnected and diverse networks. These
networks contain different types of computers, different data formats different
addressing mechanisms etc. they can communicate with each other using TCP/IP
model.
Goals:
• Connect multiple networks in a seamless way.
• The network should be able to survive the loss of subnet hardware.
• Flexible architecture is needed since the applications on different networks
were diverse.
The TCP/IP model is a 4 layered model as shown below:

TCP/IP model protocol Suite: Protocols used in the various layers of TCP/IP model
are as shown in following diagram:

1. Host-to-Network Layer:
The TCP/IP model does not define any specific protocol at physical and data link
layer. It
supports all the standard and proprietary protocols.
This layer corresponds to the physical and Data link layer of the OSI model.
2. Network (Internet) Layer:
• The main job of this layer is to transport data packets from the source machine
to the destination.
• In order to connect multiple diverse networks in a seamless manner, the
internet is based on a packet - switching network which is connection less.
• This layer takes care of delivering data from the source host to the destination
host.
• The fundamental protocol operating in this layer is the Internet Protocol (IP).
• IP takes care of addressing and routing the packets through the internetwork.
• It is an unreliable, connectionless protocol and provides best-effort delivery.
This means that the protocol does not take any responsibility for error free
delivery.

Other protocols at Network Layer:


i. ICMP (Internet Control Message Protocol): Used by routers and hosts to send
notifications.
ii. IGMP (Internet Group Message Protocol): Used to send messages to a group.
iii. ARP (Address Resolution Protocol): Associates a logical address with a physical
address.
iv. RARP (Reverse Address Resolution Protocol): Used to find logical address from
physical address.

3. Transport Layer (Process-to-Process)


This layer is designed to allow communication between applications running on
the source and destination hosts, just as in the OSI transport layer. Thus it is an
end-to-end layer.
i. TCP (Transmission Control Protocol)
• This is a reliable connection oriented protocol. It ensures end-to-end, error -
free delivery.
• It also handles reassembling of packets at the receiver and flow control to
ensure that a fast sender does not flood a slow receiver.
• It breaks data into small units called segments which are encapsulated within IP
packets and transmitted. The receiving TCP reassembles these into a single
stream and gives them to the application layer.

ii. UDP (User Data gram Protocol):


• This is an unreliable connection less protocol.
• It is mainly used in client-server, request-reply applications where prompt
delivery is more important than accurate delivery.
• Because it is connection-less, UDP require less overhead as compared to TCP.
iii. SCTP (Stream Control Transmission Protocol): Combines features of TCP and
UDP and used for newer applications like voice over IP (voice call using internet)
4. Application Layer:
The application layer contains all higher level protocols for commonly required
user service like
SMTP (Simple Mail Transfer protocol): Used for electronic mail (email)
transmission.
FTP (File Transfer Protocol): Used for the transfer of computer files between a
client and server as a computer network.
TELNET (Telecommunications Network): Used for accessing remote computers /
terminals.

DNS (Domain Name System): Used for mapping host names to network address.
HTTP (Hypertext Transfer Protocol): Used to access the World Wide Web.

HTTP :-
HTTP stands for HyperText Transfer Protocol.
It is a protocol used to access the data on the World Wide Web (www).
The HTTP protocol can be used to transfer the data in the form of plain text,
hypertext, audio, video, and so on.
This protocol is known as HyperText Transfer Protocol because of its efficiency
that allows us to use in a hypertext environment where there are rapid jumps
from one document to another document.
HTTP is similar to the FTP as it also transfers the files from one host to another
host. But, HTTP is simpler than FTP as HTTP uses only one connection, i.e., no
control connection to transfer the files.
HTTP is used to carry the data in the form of MIME-like format.
HTTP is similar to SMTP as the data is transferred between client and server. The
HTTP differs from the SMTP in the way the messages are sent from the client to
the server and from server to the client. SMTP messages are stored and
forwarded while HTTP messages are delivered immediately.
Features of HTTP:
Connectionless protocol: HTTP is a connectionless protocol. HTTP client initiates a
request and waits for a response from the server. When the server receives the
request, the server processes the request and sends back the response to the
HTTP client after which the client disconnects the connection. The connection
between client and server exist only during the current request and response
time only.
Media independent: HTTP protocol is a media independent as data can be sent as
long as both the client and server know how to handle the data content. It is
required for both the client and server to specify the content type in MIME-type
header.
Stateless: HTTP is a stateless protocol as both the client and server know each
other only during the current request. Due to this nature of the protocol, both the
client and server do not retain the information between various requests of the
web pages.
The HTTP protocol is a request/response protocol based on the client/server
based architecture where web browsers, robots and search engines, etc. act like
HTTP clients, and the Web server acts as a server.
Client
The HTTP client sends a request to the server in the form of a request method,
URI, and protocol version, followed by a MIME-like message containing request
modifiers, client information, and possible body content over a TCP/IP
connection.
Server
The HTTP server responds with a status line, including the message's protocol
version and a success or error code, followed by a MIME-like message containing
server information, entity meta information, and possible entity-body content.
HTTP messages are of two types: request and response. Both the message types
follow the same message format.
Request Message: The request message is sent by the client that consists of a
request line, headers, and sometimes a body.
Response Message: The response message is sent by the server to the client that
consists of a status line, headers, and sometimes a body.
Play Video
Uniform Resource Locator (URL)
A client that wants to access the document in an internet needs an address and to
facilitate the access of documents, the HTTP uses the concept of Uniform
Resource Locator (URL).
The Uniform Resource Locator (URL) is a standard way of specifying any kind of
information on the internet.
The URL defines four parts: method, host computer, port, and path.
URL Synatx :- Method :// Host : Port / Path
Method: The method is the protocol used to retrieve the document from a
server. For example, HTTP.
Host: The host is the computer where the information is stored, and the
computer is given an alias name. Web pages are mainly stored in the computers
and the computers are given an alias name that begins with the characters
"www". This field is not mandatory.
Port: The URL can also contain the port number of the server, but it's an optional
field.
Path: Path is the pathname of the file where the information is stored

IOT Protocol:

MQTT
MQTT stands for Message Queuing Telemetry Transport. MQTT is defined as a
protocol used to transport messages between devices and server. It is designed as
a lightweight messaging protocol that uses publish/subscribe (similar to a
message queue) operations to exchange data between the publisher and the
receivers.
Furthermore, MQTT messages are smaller in nature, minimized data packets, low
power usage and ease of implementation makes the protocol ideal for the
“machine-to-machine” or “Internet of Things” world.
In MQTT protocol, communication happens between “MQTT Broker” and MQTT
Clients”.
MQTT Client
MQTT client is a message publisher or receiver which connects to the MQTT
broker (message hub) over the internet which runs on the MQTT library. MQTT
Client may publish a message to an MQTT broker as a publisher and other MQTT
clients subscribed to messages that it wants to receive. To initiate a connection,
the client sends a “CONNECT” message to the broker to establish a
communicational channel.
MQTT Broker
MQTT broker is the central communication point or hub which collects published
messages from the client and dispatches the message channel to the subscribing
MQTT clients. In simple terms, the broker receives the messages from the client,
filters the messages, authenticates which client is subscribed to each message and
then delivers the message to the subscribing clients.
An MQTT message contains a category of the channel called “topic” that MQTT
clients subscribe to and MQTT brokers use these subscription lists for validating
the MQTT clients to accept the message. When a broker receives a CONNECT
message, it responds with a CONNACK message to connect to the client.
Publish/Subscribe
Publish is a technical name used when the sender (client or broker) sends the
“topic”. Subscribe is used when the receiver (subscribed client) receives the
“topic”. Clients publish, subscribe or do both to a topic. In short, Publish is from
the sender and Subscribe is from the receiver.
The MQTT connection is always between client and the broker. Clients never
connect to each other directly. Hence, the clients do not have to know each
other, they only communicate over the topic. This model enables highly scalable
solutions which helps connect millions of devices without dependencies between
the data producers and the data consumers.
QoS (Quality of Service) in MQTT. The QoS plays critical role in handling the
message delivery to subscribers on are different scale.
Each connection can specify a quality of service to the broker with an integer
value ranging from 0-2.
1. 0 specifies publishing terms at most once, or once and only once. It is often
referred to as fire and forget. This does not require an acknowledgement of
delivery.
2. 1 specifies at least once. The message is sent multiple times until it receives
an acknowledgment. This type is known as acknowledged delivery.
3. 2 specifies exactly once. The receiver and sender clients use a two-level
handshake so that only one copy of the message is received. This type is
known as guaranteed delivery.
With so many special features, the MQTT protocol has been able to replace all
other protocols which were used for device-to-device communication over a
decade.

Pros :
1. Efficiency is the selling point of MQTT, as its architecture runs even on
devices with low-power CPUs and low RAM. The result is smoother data
transfers over competing protocols like AMQP. The lightweight architecture
allows MQTT users to implement the protocol quickly and easily.
2. Fewer data packets being sent results in reduced network usage.
3. The reduced power usage makes it ideal for connected devices.
4. MQTT can achieve a more efficient distribution of data.
5. Implementation of remote sensing and control is easier through the
protocol.
Cons.
1. Slower transmit cycles 
2. Resource discovery.
3. Lack of security encryption. .
4. Scalability. .

Constrained Application Protocol (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. That’s the reason why API security is of higher grade while
CoAP is active as it is an RPK and PSK-certified protocol.
CoAP Architecture
The WWW and the constraints ecosystem are the 2 foundational elements of the
CoAP protocol architecture. Here, the server monitors and helps in
communication happening using CoAP and HTTP while proxy devices bridge the
existing gap for these 2 ecosystem, making the communication smoother. 
CoAP allows HTTP clients (also called CoAP clients here) to talk or exchange
data/information with each other within resource constraints. 
While one tries to understand this architecture, gaining acquaintances with some
key terms is crucial:
 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. 

Advantages
1. The packet size used is very small thus maximizing the use of memory
efficiency and allowing for faster communication.
2. Since it operates over UDP, devices can sleep for extended periods and
wake up quickly. This in turn helps to save battery and optimize power
usage.
3. CoAP allows for asynchronous message exchanges.
4. Sensor nodes can send their messages to a multicast group.
5. Offers simple proxy and caching capabilities.
Disadvantages
1. It is a one-to-one protocol, and any broadcast capabilities are not inherent
to the protocol.
2. The publish-subscribe message queue is lacking.
3. It is not an encrypted protocol.
4. In the case of Network Address Translation devices being used, CoAP can
have problems since the IP can be a dynamic IP.
5. CoAP is also an evolving and maturing standard.

XMPP
XMPP stands for Extensible Messaging & Presence Protocol. It is an open set of
rules for streaming XML elements in order to swap messages and presence
information in close to real-time. The XMPP protocol is based on the typical client
server architecture, in which the XMPP client uses the XMPP server with the TCP
socket. XMPP provides a general framework for messaging across a network,
offering a multitude of applications beyond traditional instant messaging (IM) and
the distribution of presence data. 
XMPP Architecture
On a structural level, XMPP shares great similarities with protocols that work on
the application layer. For example, it also concerns uniquely named clients
communicating over an associated server. Enforcing the protocol as per both
clients, XMPP monitors and handles routing for them.
The overhead figure illustrates the XMPP architecture straightforwardly. 
However, in a complex implementation, multiple XMPP gateways might also exist.
In this scenario, the protocol also needs to takes care of the intercommunication
for multiple domain routing. So, the gateways act as a translating medium
between various protocols and domains that are in the cycle during the
information-exchange.
Additionally, the XMPP gateway brooks the tasks like commencing and
termination of the client-to-server sessios at the intended protocol while
including the demanding protocol translation elements.
Even with the use of considerable gateways and domains, one can succeed in
achieving constant connectivity across all the network points with the help of
XMPP.
While comprehending the XMPP architecture, understanding a few terms is
crucial.
For example, you must know about XMPP stanzas. These, simply, are the small
XML fragments that are used for starting a communication session. they can be of
3 types:
 The presence stanza defines the network or user’s present status to others.
For example, the user/network is online or offline.
 Message stanza is a pushing instrument essential for chat messages
exchange.
 IQ stanza is the element that XMPP utilizes for data requests and
modification. Just as HTTP has GET and POST, XMPP has IQ stanza. 
The pros and cons of XMPP
Pros
 Addressing scheme to recognise devices on the network
 Client-server architecture
 Decentralised
 Flexible
 Open standards and formalised
Cons
 Text-based messaging and no provision for end-to-end encryption
 No provision for quality of service
 Absence of binary data
 Limited scope for stability

OSGi
OSGi(Open Service Gateway Initiative ) defines an architecture for developing
modular Java applications. OSGi specification describes a dynamic component
model that allows applications and components, coming in form of bundles, to be
started, stopped and updated without requiring a reboot.
When talking about OSGi, services are in the layer that connects bundles in a
dynamic way by offering a publish-find-bind model for plain old Java objects.
Services are dynamic. Life-cycle is the API defined to install, uninstall, start and
stop bundles.
OSGi architecture is actually about keeping things local and not sharing. OSGi
bundles are plain old JARs and, as we know, in normal Java everything in a JAR is
completely visible to all other JARs. In OSGi, by default, there is no sharing. OSGi
hides everything unless it is explicitly exported.

You might also like