MQTT-SN message to Cloud of Things


  • Often we were asked, if we have got an example of a NB-IoT message to Cloud of Things via AT commands…



  • The communication with CoT works only via MQTT-SN protocol. The details can be found in the developer guide…

    A first simply test can be faked. For this a simple CONNECT-Request is sufficient. This message can be sent to the server (the modul is already attached and a UDP-Socket listens on 1883):

    AT+NSOST=0,172.25.102.151,1883,29,1D0404010384<IMSI><PW>

    Then <IMSI> and <PW> should be exchanged by registered IMSI/PW combination (i HEX-String-Format). The Server answeres this with a CONNACK, hence the modul yieldst:

    +NSONMI:0,3

    which in turn with

    AT+NSORF=0,3

    can be read. Now the module yields :

    +NSORF:0,172.25.102.151,1883,3,030500,0

    The Bytes 030500 represent the CONNACK

    AT+NSOST=0,172.25.102.151,1883,2,0218


 

Looks like your connection to Internet of Things was lost, please wait while we try to reconnect.