Got it

Monitoring an ONU device through the MQTT protocol

Latest reply: Aug 31, 2021 09:08:08 375 3 2 0 0

INTRODUCING THE MQTT PROTOCOL


MQTT (Message Queue Telemetry Transport) is a method of conveying messages according to the publish/subscribe (publish - track) model. It's characterized by low bandwidth, high reliability and operability under unstable transmission conditions.


MQTT originates from 1999. It was developed by 2 engineers working for IBM and Cirrus Link and it initially applied to oil pipeline monitoring applications. The goal for the protocol is to be compact, light, bandwidth saving, energy saving and satellite signal connection.


In 2013, IBM registered the mode for the MQTT protocol and was accredited by the OASIS organization (ISO/IEC 200922). Up to now, it has been developed to version MQTT v5.0 and is used by many organizations / applications such as Facebook Messenger, Amazon (SensorThings API), Adafruit IO, Microsoft Azure IoT Hub.


1MECHANISM OF ACTION


MQTT consists of 2 main parts: Broker and Clients.     

1

The broker is considered the center - the intersection point of all connections coming from the client. The main job of the broker is to receive messages from publishers, queue them and then deliver them to a specific addresses (subscribers). The secondary task of the broker is that it can take on a few more features related to the communication process such as: message security, message storage, logs.   
The client is divided into 2 groups: publisher and subscriber. The clients here are software components that work at the edge device, so they are designed to work flexibly. The client must do at least one of two things: publish messages to a specific topic or subscribe to a topic to receive messages from this topic.      


SOME CONCEPTS WITHIN MQTT


  • Publish, Subscribe mechanism: in a system using MQTT protocol, many station nodes (called mqtt client - referred to as client) connect to an MQTT server (called broker). Each client will subscribe to several channels (topics), such as '/China/Temp', '/China/Humidity'. This registration process is called 'subscribe', just like we subscribe to news on a ******* channel. Each client will receive data when any other station sends data to the registered channel. When a client sends data to that channel, it's called 'publish'.


  • Message: in the MQTT protocol, the message is also known as the 'message payload', whose default format is plain-text. However, the user can also configure other data formats.


  • Topic: Topic can be considered as a logical 'transmission' between two points, publisher and subscriber. Basically, when a message is published to a topic, all subscribers of that topic will receive this message. The MQTT protocol allows hierarchical topics to be declared. Suppose we have a sensor system that measures environmental information in our house. A house will usually have many rooms and each room has its own set of environmental sensors. Thus, topics serving to convey environmental information for our house can be declared as follows:

a) home/living-room/temperature: topic living room temperature information

b) home/living-room/humidity: topic about living room humidity

c) home/kitchen/temperature: topic kitchen temperature information

  • QoS: MQTT has 3 QoS (Qualities of service) options when 'publish' and 'subscribe':


a) QoS0: Broker/client will send data exactly once, the sending being confirmed by the TCP/IP protocol only;

b) QoS1: Broker/client will send data with at least one acknowledgment from the other end, which means there can be more than one acknowledgment of data received;

c) QoS2: Broker/client ensures that when sending data, the receiver only receives it once, as this process must go through 4 steps of handshake.


A packet can be sent at any QoS and clients can subscribe to any QoS request. This means that the client will choose the maximum QoS it has to receive messages. For example, if a data packet is published with QoS2 and the client subscribes with QoS0, then the data packet received to this client will be sent by the broker with QoS0, and another client subscribes to this same channel with QoS 2, then it Broker will send data with QoS2.


1


MQTT APPLICATION


MQTT brings many benefits to monitoring and management applications, such as:


  • efficient use of bandwidth;

  • increased scalability;

  • the information or control update time can be reduced to seconds;

  • high safety;

  • supported on many platforms and devices.

On our network, the MQTT protocol is being tested in the monitoring and management of ONU devices (GPON Modem on the network). Given the above advantages, the MQTT protocol is definitely not inferior to other network management protocols such as SNMP or TR069.


1

The MQTT protocol was designed for machine-to-machine communication, but it has proved to be more flexible than expected. It is fully applicable to other communication scenarios such as Machine-to-cloud, cloud-to-machine, app-to-app. With the right broker and properly installed MQTT client, devices built on different platforms can communicate with each other easily.

Well done friend
View more
  • x
  • convention:

kunthea
kunthea Created Aug 27, 2021 04:08:58 (0) (0)
 
Professional article
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.