The main points of realizing the MQTT-SN agreement

Source: Internet
Author: User

Objective

This is the last translation of the MQTT-SN 1.2 agreement, mainly related to the implementation of the main points, very brief.

Requires a support QoS value of-1

Although QoS is set to 0,1,2 three values by default, there is another case where the value is-1. If the QoS is 1 in the publish message from the client, the client is not concerned with whether the gateway is connected or not, and the message needs to be sent out. A transparent gateway needs to maintain this type of message and establish a private TCP connection with the remote MQTT server. An aggregation gateway or Hybird hybrid gateway can forward such messages using an existing MQTT server connection.

Timer and Timer Practice recommendations
Timer/Counter Description Recommended Values
T_adv Broadcast frequency More than 15 minutes
N_adv The number of adverse broadcasts not received 2-3 plays
T_searchgw Send SEARCHGW delay 5 Seconds
T_gwinfo Wait for gateway Response Gwinfo Broadcast delay 5 Seconds
T_wait Wait length More than 5 minutes
T_retry Retry duration 10s-15s
N_retry Retry Count 3-5 plays

The gateway handles the client's hibernate and survival timers, which need to be based on the defined value of the client's continuation time in the message being sent. For example, the timer value should be 10% higher than the specified value for a duration of 1 minutes, if not higher than 50%.

Map maintenance for gateway-held topic ID and topic name

The Protocol severely recommends that the correspondence between the topic ID and topic name of all clients should not use a shared pool object, because this avoids different client topic IDs and topic name matching errors, and the publish message is sent to the wrong place (the client receiver). may lead to potentially irreversible catastrophic consequences.

The correct approach is to maintain the correspondence between the topic ID and topic name according to the client's dimension. The same topic Name may exist between any two clients, but the corresponding topic ID is different. The topic ID may be the same, but topic name is not the same.

ZigBee related issues
    • In the ZigBee specification, the gateway needs to be hosted within a coordinator node, and the MQTT-SN protocol suggests that the gateway should reside on a non-stop ZigBee router node and be able to receive messages from the client at any time.
    • Limited to the data load capacity of the ZigBee network support layer, the MQTT-SN message maximum load is limited to 60 bytes.

The main points of realizing the MQTT-SN agreement

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.