Publishing MQTT messages with EXS62-W module | Telit Cinterion IoT Developer Community
January 24, 2023 - 10:39am, 188 views
Hello,
I am trying to publish a MQTT message with AT commands for EXS62-W module. I managed to publish a message with the configuration of AT ^SISS commands. But I want to send some encrypted data and I can do it only with the command that sends bytes. So I try to send my message with AT ^SISU and AT ^SISW commands. But when I send the command AT ^SISU ( AT ^SISU=1, "publish", "2;test;1;;14" ), I get an error
( ^ SIS: 1,0,57, "Topic parameter is missing" ). I do not understand what I am doing wrong, because I have a topic set to "test" in the command.
Maybe someone can help me what is wrong. The whole list of commands I use can be found here:
AT^SISS=1,"srvType","Mqtt"
OK
-----------------------------------
AT^SISS=1,"conId","1"
OK
-----------------------------------
AT^SISS=1,"address","mqtt://0.tcp.eu.ngrok.io:15522"
OK
-----------------------------------
AT^SISS=1,"clientid","uniqueID1234"
OK
-----------------------------------
AT^SISS=1,cleanSession,"1"
OK
-----------------------------------
AT^SISS=1,"cmd","publish"
OK
-----------------------------------
AT^SISS=1,"Topic","test"
OK
-----------------------------------
AT^SISS=1,"hcContent","Test Message"
OK
-----------------------------------
AT^SISS=1,"hcContLen",0
OK
-----------------------------------
AT^SICA=1,1
OK
-----------------------------------
AT^SISO=1,2
OK
-----------------------------------
^SIS: 1,0,8800,"Mqtt connect 3.125.209.94:15522"
^SIS: 1,0,2500,"Connection accepted on clean session."
^SISW: 1,2
AT^SISD=1,"cleanParam"
OK
-----------------------------------
AT^SISU=1,"subscribe","MQTTDemoListener;2"
OK
-----------------------------------
^SIS: 1,0,2520,"MQTTDemoListener"
^SIS: 1,0,2520,"2"
-----------------------------------
AT^SISU=1,"publish","2;test;1;0;14"
+CME ERROR: operation failed
^SIS: 1,0,57,"topic parameter missing"
-----------------------------------
AT^SISW=1,14
+CME ERROR: unknown
-----------------------------------
Hello !
SISU syntax is AT^SISU= <profileId>, [<type>], [<Value>]
For Value Parameter define all request parameters separated by ":" character.
For "PUBLISH" type <Value> syntax is: Qos:Topic:Retain:hcContent:hcContLen
You are using ";" sign so only the QoS request parameter is read.
Let me know if this change helps.
Best regards,
Lukasz