Unique mapping to MQTT-SN protocol
In the NB-IOT-Protocol Developer Guide it is not clear how a unique mapping to the referenced MQTT-SN protocol can be derived
I cannot map the described “Payloads” and “Topics” to any other MQTT-SN messages.
It would be ideal if you could provide me a COMPLETE example message (complete in HEX coded) of a message, so it could be displayed afterwards in the Cloud, hence with MQTT-Header, MsgType and Payload!
I could establish a connection to the gateway and am receiving positive notifications.
Qustion: Why is this not displayed in th CoT ?
Following you find a log excerpt of a MQTT-SN communication with the server. In a nutshell:
MCU is using mqtt-sn with QoS=1 (Quality of Service) for communication with CoT. With QoS=1 it is needed that for each message to the server this is acknowledged.
First a CONNECT-Request is sent which is being answered with a CONNACK .
Then the topic, under which it is sent needs to be registered. This is accomplished by sending REGISTER. This must be answered with REGACK.
In the next step the registered topic-Id can be published (PUBLISH) which in return need to be acknowledged with PUBAC. If there is no PUBACK or REGACK, a DISCONNECT will be sent. In this case the procedure starts from the beginning with CONNECT/CONNACK and so on.
It is important, that REGISTER and PUBLISH messages containing message-ID are being counted.
Our experts recommed the implementation on the basis of Eclipse Paho Clients: