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

Iot Protocols

protocols of iot

Uploaded by

Rudra Abhishek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Iot Protocols

protocols of iot

Uploaded by

Rudra Abhishek
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

WebSocket is a computer communications protocol that provides full-duplex

communication channels over a single TCP connection.


The client establishes a WebSocket connection with the server through a process
known as WebSocket handshake. The handshake starts with an HTTP request/response,
allowing servers to handle HTTP connections as well as WebSocket connections on the
same port. Once the connection is established, the client and the server can send
WebSocket data in full duplex mode.
Using the WebSockets protocol, the server (ESP32 board) can send information to the
client or to all clients without being requested. This also allows us to send
information to the web browser when a change occurs. This change can be something
that happened on the web page (you clicked a button) or something that happened on
the ESP32 side like pressing a physical button on a circuit. The GPIO state is
updated automatically in all clients. This means that if you have several web
browser tabs opened on the same device or on different devices, they are all
updated at the same time. To build the web server we’ll use the ESPAsyncWebServer
library. This library needs the AsyncTCP library to work properly.
Unlike HTTP, WebSocket keeps an open connection between a client and a server,
which enables them to exchange data immediately and interactively.

Zigbee Device Types: There are three main types of Zigbee devices:

Coordinator (ZC): The coordinator is the central device in a Zigbee network. It is


responsible for setting up the network, managing other devices, and routing data
traffic. There can only be one coordinator in a Zigbee network.
Router (ZR): Routers are devices that can relay data traffic between other devices
in the network. They can also act as end devices, collecting data from sensors and
sending it to the coordinator.
End Device (ZED): End devices are battery-powered devices that collect data from
sensors and send it to a router or coordinator. They cannot relay data traffic.
Trust center: The ZigBee trust center administrates the encryption and decryption
keys and distributes the keys to new nodes. The trust center is almost always the
same device as the coordinator.
coap--Communication model is one-one.
mqtt --Communication model is many-many.
CoAP, Constrained Application Protocol, is a RESTful application protocol running
over UDP that is used for resource-constrained, low-power devices in lossy
networks, especially optimized for deployments with a high number of end devices
within the network. . CoAP also does not guarantee the delivery or order of
messages, which may result in data loss or duplication.

AMQP supports the client/broker architecture and the client/server architecture.


Unlike a server, a broker acts as a mediator between two parties and does not
exclusively serve one client.

MQP is portable, secure, multichannel, and efficient. Binary in nature, it provides


authentication and encryption via a Simple Authentication and Security Layer (SASL)
or Transport Layer Security (TLS), leveraging a transport protocol such as TCP.
This messaging protocol is swift and drives high delivery rates and acknowledgment
of message receipts.

AMQP is ideal for multi-client environments and provides a platform for task
delegation. It also allows servers to take care of immediate request handling
faster. Due to it being a streamed binary messaging system with a strongly mandated
messaging behavior, AMQP features robust interoperability with clients from various
vendors.

ARDUINO CLOUD:-
Arduino IoT Cloud: It is an IoT cloud platform provided by Arduino, specifically
designed to work with Arduino boards and devices.
To make an IoT cloud and use it with Arduino IoT Cloud, we’ll follow these steps:

Step 1: Sign up for Arduino IoT Cloud


Step 2: Create Thing in Arduino IoT Cloud
Step 3: Add your Device to Cloud
Step 4: Associate Device with Thing.
Step 5: Download Sketch and Upload to Your Device.
Step 6: Connect Arduino Board to IoT Cloud
Step 7: Refresh the webpage
Step 8: Set up Arduino IoT Cloud Dashboard
Step 9: Test and Monitor Your IoT Device

Websockets:-Imagine you have a walkie-talkie set with a friend. Normally, with a


regular walkie-talkie, only one person can talk at a time. You have to press a
button to talk and wait for your friend to finish before you can reply.
WebSockets in IoT are like a special walkie-talkie app for devices. Instead of
needing to wait for each other, both devices can talk and listen at the same time.
This is called full-duplex communication.
WebSockets are helpful when devices need to constantly chat back and forth with
something else, like a phone or a computer, to keep things up-to-date and running
smoothly. The advantage of WebSockets is that they enable realtime communication
between the client and server without the need for frequent HTTP
requests/responses. This brings benefits such as reduced latency, and improved
performance and responsiveness of web apps.

MQTT--MQTT is the most commonly used messaging protocol for the Internet of Things
(IoT). MQTT stands for MQ Telemetry Transport. The protocol is a set of rules that
defines how IoT devices can publish and subscribe to data over the Internet. MQTT
is used for messaging and data exchange between IoT and industrial IoT (IIoT)
devices, such as embedded devices, sensors, industrial PLCs, etc. The protocol is
event driven and connects devices using the publish /subscribe (Pub/Sub) pattern.
The sender (Publisher) and the receiver (Subscriber) communicate via Topics and are
decoupled from each other. The connection between them is handled by the MQTT
broker. The MQTT broker filters all incoming messages and distributes them
correctly to the Subscribers.
What is the MQTT broker?
The broker is responsible for managing which clients are subscribed to which
topics, receiving messages published on a particular topic, and sending that
message to any client subscribed for updates. When the connection between a client
and broker is lost, the broker is also responsible for caching the message and
delivering it to the client when the connection is re-established.
example -- Imagine you have a remote control car with a small camera. The car
can take pictures of your room and send them to your phone using MQTT.

The car would take a picture and send a message saying "New picture!" to the
message board with a title like "Room/Camera."
Your phone would be connected to the message board, subscribed to the "Room/Camera"
title. So, when the message arrives, your phone would know a new picture is there
and show it to you!
MQTT keeps things organized so all your cool IoT devices can chat and share
information without any mess!
MQTT Topic -- MQTT topics are a form of addressing that allows MQTT clients to
share information.
MQTT Topics are structured in a hierarchy similar to folders and files in a file
system using the forward slash ( / )as a delimiter.
Using this system you can create a user friendly and self descriptive naming
structures of you own choosing.
MQTT QoS(Quality Of Service):-
MQTT supports three qualities of service for message delivery:
QoS0 "At most once": Messages are delivered according to the best efforts of the
operating environment; message loss can occur.
QoS1 "At least once": Messages are assured to arrive but duplicates can occur.
QoS2 "Exactly once": Messages are assured to arrive exactly once.

ZIGBEE-- Zigbee is a wireless communication protocol based on the IEEE 802.15.4


standard. It adds additional layers to the standard to create a complete
communication stack for use in IoT applications. The Zigbee protocol includes a
network layer for routing data between devices, an application layer for defining
the application-specific behavior, and a security layer for encrypting data
transmissions. Zigbee operates in the 2.4 GHz frequency band and is designed to
support thousands of devices in a network with low power consumption.
IEEE 802.15.4 is a standard for low-power wireless communication, while Zigbee is a
protocol that uses this standard and adds additional layers to create a complete
communication stack for IoT applications. .ZigBee modules are commonly used for IoT
applications that require low-power wireless communication between devices. ZigBee
has built-in security features such as AES-128 encryption and device
authentication, which make it suitable for applications that require secure
communication.

AMQP-- AMQP stands for Advanced Message Queuing Protocol. Unlike MQTT, AMQP is a
peer-to-peer protocol, meaning it supports direct communication between the
producer and consumer. AMQP is a binary protocol built on TCP/IP, where a reliable,
persistent, stream-oriented connection is established between a client and a
broker. Multiple channels can be opened on a single socket connection, allowing
multiple streams of data to be transferred simultaneously. AMQP uses a model where
messages are sent to exchanges, which then route the messages to appropriate queues
based on rules called bindings. The consumer then retrieves the message from the
queue. This model allows for complex routing and distribution strategies, making
AMQP suitable for complex distributed systems. .The choice between MQTT and AMQP
largely depends on the use case requirements. If you are dealing with constrained
devices or unreliable networks, MQTT with its lightweight nature might be the
better option. If your use case requires complex routing and high reliability, then
AMQP would be more suitable.

BLE(Bluetooth Low Energy) --Bluetooth Low Energy (BLE) is a newer kind of Bluetooth
that came around in 2010s. It’s made for devices like fitness trackers, smart home
gadgets, and beacons, which need less power to work that transmit lesser data
compare to the classic. Despite taking many cues from its predecessor, Bluetooth
Classic, Bluetooth Low Energy is regarded as a different technology that
specifically targets markets where the demand is for ultra-low power rather than
high throughput. While Bluetooth Classic and Bluetooth Low Energy protocols share
many similarities, such as both being protocols covered by the Bluetooth
Specification and both operating within the 2.4 GHz ISM band, they are two
distinct, incompatible protocols.

Bluetooth Classic is designed to handle a lot of data, but it also consumes power
quickly. Think about transmitting music from your phone to Bluetooth headphones.
That is a traditional use case for Bluetooth Classic.BLE, on the other hand, is
designed for applications that don’t require handling a lot of data but do require
really good battery life. Think about a sensor in a temperature-controlled
warehouse that you want to set and forget for months or even years. BLE would be a
better fit for that kind of application.
Key terms and concepts wrt BLE:-
GATT (Generic Attribute Profile): Used for sending data between BLE devices.
Profiles: Specifications for device functions (e.g., heart rate monitor).
ATT (Attribute Protocol): Basis for GATT, optimized for BLE.
Characteristic: Holds a single value and descriptors.
Descriptor: Provides additional info about characteristics.
Service: Groups characteristics (e.g., “Heart Rate Monitor”)

CoAP -- CoAP (The Constrained Application Protocol) is also a client-server


protocol designed for the Internet of Things. It too targets constrained devices,
but is modeled on the World Wide Web of resources (URIs) and HTTP. It uses GET,
POST, PUT and DELETE verbs like HTTP, which it can interoperate with through
proxies. It's a RESTful application protocol running over UDP that is used for
resource-constrained, low-power devices in lossy networks, especially optimized for
deployments with a high number of end devices within the network. CoAP's use of UDP
for transport, along with its simple request-response model, makes it well-suited
for IoT scenarios. CoAP supports both request-response interactions and
asynchronous communication. It is designed to interact with resources directly,
making it suitable for RESTful architectures.

LoRA --LoRA is a wireless protocol designed specifically for long-range, low-power


communications. LoRa stands for Long Range Radio and is mainly targeted for M2M and
IoT networks. This technology will enable public or multi-tenant networks to
connect a number of applications running on the same network.
It uses spread spectrum modulation technique that efficiently transmits data over
long distances.
It reaches much farther than other wireless technologies like WiFi or Bluetooth,
making it ideal for remote applications. Also, devices can operate for years on
battery power, thanks to LoRa's efficient data transmission.Its mainly used in
applications like smart cities, smart buildings, smart agricultural system
monitoring etc.

LoRaWAN: The Network Side of LoRa :--


LoRaWAN is a standardized networking protocol that sits on top of LoRa.
Provides secure, bi-directional communication between devices and gateways.
Enables a single network to connect many devices from different manufacturers.
LoRaWAN is managed by the LoRa Alliance, a non-profit group promoting LoRa
technology.

You might also like