EXS82-W: Send binary data using MQTT Client | Telit Cinterion IoT Developer Community
May 17, 2021 - 6:52pm, 3297 views
Hi
Is there a way to send raw data (binary) using the EXS82-W embedded MQTT Client ?
I am using the following connect to broker and publish data:
AT^SICA=1,1
AT^SISS=0,"SrvType","Mqtt"
AT^SISS=0,"conId",1
AT^SISS=0,"address","mqtts://********.amazonaws.com"
AT^SISS=0,"secopt",0
AT^SISS=0,"clientId","EXS82Test"
AT^SISS=0,"cmd","publish"
AT^SISS=0,"Topic","exs82"
AT^SISS=0,"cleanSession",1
AT^SISS=0,"Qos",0
AT^SISS=0,"Retain",0
AT^SISS=0,"hcContent","TestMessage"
AT^SISS=0,"hcContLen",0
AT^SISO=0,2
AT^SISU=0,"subscribe","exs82";0"
AT^SISU=0,"publish","1;exs82;0;;10"
AT^SISW=0,10
^SISW: 0,10,0
<send raw data using Docklight software for example: 0x01 0x02 0x03 0x04 0x05 0x00 0x06 0x07 0x08 0x09 >
^SIS: 0,0,3520,"exs82"
^SIS: 0,2
^SIS: 0,0,3488,"topic=exs82; bytes=10"
AT^SISR=0,10
^SISR: 0,10
0x01 0x02 0x03 0x04 0x05 0x00 0x00 0x00 0x00 0x00
The bytes sent after the 0x00 probably were ignored. On the receiver side, there is only NULL after the first 0x00.
I am using the defaul character set.
Hello,
It looks like the data is treated as a string somewhere. Are you sure that your terminal program or the server is not doing this. Do you have the possibility to see the data on the server before it is looped back to the module?
Can you also check the module's firmware version with ATI1 command?
Best regards,
Bartłomiej
Hi Bartłomiej,
The response to ATI1 command is:
Cinterion
EXS82-W
REVISION 01.100
A-REVISION 01.000.00
In order to validate the MQTT Broker, I tested it with another MQTT client, using this time the ESP32-DevKit, and it seems to works well.
Here is the logs of the published and received data:
Here is the part of the code where the publish is made:
And here the part where the subscription and handle of received data are made.
Thanks!
Hello,
I tested it with one public broker. It seems that there might be some issue with this.
I think that you should report it to your local technical sales person for further investigation.
Regards,
Bartłomiej
Hi,
I get the logs from the server side;
Both EXS82W and ESP32 are sending the same payload: [ 0x01 0x02 0x03 0x04 0x05 0x00 0x06 0x07 0x08 0x09 ]
These are the logs of the data sent by EXS82W mqtt client
and these are the logs of the data sent by ESP32 MQTT client.
I believe that '\b' and '\t' stands for 0x08 (BS - backspace) and 0x09 (TAB).
Thanks!
Luciano