Iot Protocols
Iot Protocols
Zigbee Device Types: There are three main types of Zigbee devices:
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:
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.
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”)