You are on page 1of 8

079msdsa010.

nabin Nabin Bhusal

Q.N.1: MQTT Protocol : Message Queuing Telemetry Transport Protocol

MQTT is an OASIS standard messaging protocol for the Internet of Things


(IoT). It is designed as an extremely lightweight publish/subscribe messaging
transport that is ideal for connecting remote devices with a small code
footprint and minimal network bandwidth. MQTT today is used in a wide
variety of industries, such as automotive, manufacturing, telecommunications,
oil and gas, etc.

MQTT is a publish/subscribe protocol designed for connecting IoT devices.


Unlike HTTP’s request/response paradigm, MQTT operates in an event-driven
manner, allowing messages to be pushed to clients. This architectural
approach enables highly scalable solutions by decoupling data producers and
data consumers, eliminating dependencies between them. Two key
components to establish MQTT connection for publishing and subscribing of
the messages are MQTT Clients and MQTT Broker as shown in the diagram
below.

As an M2M/Internet of Things (IoT) connectivity protocol, MQTT is designed


to support messaging transport from remote locations/devices involving
079msdsa010.nabin Nabin Bhusal

small code footprints (e.g., 8-bit, 256KB ram controllers), low power, low
bandwidth, high-cost connections, high latency, variable availability, and
negotiated delivery guarantees. For example, MQTT is being used in sensors
communicating to a broker via satellite links, SCADA, over occasional dial-up
connections with healthcare providers (medical devices), and in a range of
home automation and small device scenarios. MQTT is also ideal for mobile
applications because of its small size, minimized data packets, and efficient
distribution of information to one or many receivers (subscribers).

Important Points to Note

● Clients do not have addresses like in email systems, and messages are
not sent to clients.
● Messages are published to a broker on a topic.
● The job of an MQTT broker is to filter messages based on topic, and
then distribute them to subscribers.
● A client can receive these messages by subscribing to that topic on the
same broker
● There is no direct connection between a publisher and subscriber.
● All clients can publish (broadcast) and subscribe (receive).
● There are MQTT client libraries for many programming languages and
platforms. These include Java, C#, NodeJS, Python, Arduino,
Micropython, C, and more.
● MQTT brokers do not normally store messages.
● You cannot publish or subscribe unless you are connected.

MQTT Client-Broker Connections

● MQTT uses TCP/IP to connect to the broker.


● TCP is a connection oriented protocol with error correction and
guarantees that packets are received in order.
● Most MQTT clients will connect to the broker and remain connected
even if they aren’t sending data.
079msdsa010.nabin Nabin Bhusal

● Connections are acknowledged by the broker using a Connection


acknowledgement message.

Softwares for MQTT:


1. Servers/Broker
● Ably Mqtt Broker, Apache ActiveMQ, Hive MQ, Swift MQ,
WaterStream
2. Cloud Broker
● Hive MQ Cloud, Mosquitto Cloud, Hark
3. Client Libraries
● Mqtt.dart, mqtt_client, erlmqtt, ActiveMQ Client, mqtt.js,
node_mqtt_client, MQTT for twisted python, nyamuk
4. Tools and Application
● MQTT on Android, MQTT on IOS, MQTT Studio Desktop
5. Utility Plugins
● Ant, Moquette-mqtt,zmqtt, Wireshark
6. MQTT using devices “Things”
● Consert, Eurotech, Cell Labs, Choral
079msdsa010.nabin Nabin Bhusal

Use Cases:
MQTT is used in a large variety of use cases and industries.

1. Automotive:
● HiveMQ: BMW Car-Sharing application relies on HiveMQ for
reliable connectivity.
● EMQ helps SAIC Volkswagen build the IoV platform.

2. Logistics:
● Reliable IoT communication enables real-time monitoring of
Matternet’s autonomous drones.

3. Manufacturing:
● MQTT Implementation on Celikler Holding's Power Plant
Monitoring.
● Transforming Manufacturing Efficiency: The Power of MQTT in
Industrial Solutions.

4. Smart Home
● IBM Telemetry use case: Home energy monitoring and control
● IBM Telemetry use case: Home patient monitoring
● The eFon Technology's Smart Home security system trusts
Bevywise MQTT Solution

5. Oil & Gas:


● EMQ helps IoT innovation in the petrochemical industry.

6. Consumer Products:
● CASO Design creates Smart Kitchen Appliances.

7. Transportation:
● Deploying IoT on Germany's DB Railway System.
079msdsa010.nabin Nabin Bhusal

Q.N.2: LoRa Protocol : Long Range


LoRa is a wireless modulation technique derived from Chirp Spread Spectrum
(CSS) technology. It encodes information on radio waves using chirp pulses -
similar to the way dolphins and bats communicate! LoRa modulated
transmission is robust against disturbances and can be received across great
distances.

LoRa is ideal for applications that transmit small chunks of data with low bit
rates. Data can be transmitted at a longer range compared to technologies
like WiFi, Bluetooth or ZigBee. These features make LoRa well suited for
sensors and actuators that operate in low power mode.

LoRa can be operated on the license free sub-gigahertz bands, for example,
915 MHz, 868 MHz, and 433 MHz. It also can be operated on 2.4 GHz to
achieve higher data rates compared to sub-gigahertz bands, at the cost of
range. These frequencies fall into ISM bands that are reserved internationally
for industrial, scientific, and medical purposes.

LoRaWAN is a Media Access Control (MAC) layer protocol built on top of LoRa
modulation. It is a software layer which defines how devices use the LoRa
hardware, for example when they transmit, and the format of messages.
079msdsa010.nabin Nabin Bhusal

In wireless communication, particularly within the IoT domain, effective


channel utilization and collision avoidance are essential for network reliability
and spectral efficiency. Previously, LoRaWAN has relied upon ALOHA as the
medium access control (MAC) layer protocol.

To improve this, the LoRa Alliance's Technical Recommendation TR013


introduces CSMA-CA, tailored to account for LoRa's distinctive modulation
characteristics, including Spreading Factor orthogonality and the capability for
below noise-floor communication.

This adaptation overcomes the limitations of simple received signal strength


(RSS)-based sensing, which can disrupt these unique properties.
Implementing TR013 enhances LoRaWAN's spectrum efficiency and ensures
more reliable device communication, even in congested environments.

LoRaWAN is suitable for transmitting small size payloads (like sensor data)
over long distances. LoRa modulation provides a significantly greater
communication range with low bandwidths than other competing wireless
data transmission technologies. The following figure shows some access
technologies that can be used for wireless data transmission and their
expected transmission ranges vs. bandwidth.
079msdsa010.nabin Nabin Bhusal

Why LoRa?
● Ultra low power - LoRaWAN end devices are optimized to operate in low
power mode and can last up to 10 years on a single coin cell battery.
● Long range - LoRaWAN gateways can transmit and receive signals over
a distance of over 10 kilometers in rural areas and up to 3 kilometers in
dense urban areas.
● Deep indoor penetration - LoRaWAN networks can provide deep indoor
coverage, and easily cover multi floor buildings.
● License free spectrum - You don’t have to pay expensive frequency
spectrum license fees to deploy a LoRaWAN network.
● Geolocation- A LoRaWAN network can determine the location of end
devices using triangulation without the need for GPS. A LoRa end device
can be located if at least three gateways pick up its signal.
● High capacity - LoRaWAN Network Servers handle millions of
messages from thousands of gateways.
● Public and private deployments - It is easy to deploy public and private
LoRaWAN networks using the same hardware (gateways, end devices,
antennas) and software (UDP packet forwarders, Basic Station
software, LoRaWAN stacks for end devices).
● End-to-end security- LoRaWAN ensures secure communication
between the end device and the application server using AES-128
encryption.
● Firmware updates over the air - You can remotely update firmware
(applications and the LoRaWAN stack) for a single end device or group
of end devices.
● Roaming- LoRaWAN end devices can perform seamless handovers
from one network to another.
● Low cost- Minimal infrastructure, low-cost end nodes and open source
software.
● Certification program- The LoRa Alliance certification program certifies
end devices and provides end-users with confidence that the devices
are reliable and compliant with the LoRaWAN specification.
079msdsa010.nabin Nabin Bhusal

● Ecosystem- LoRaWAN has a very large ecosystem of device makers,


gateway makers, antenna makers, network service providers, and
application developers.

You might also like