Issue on connecting Thingsboard with sim800L using mqtt

Hi
I trying to connect thingsboard with sim800l module by using mqtt protocol.
user name is “RENSOTESTTOKEN” and don’t have client identification number and password to connect with server.
Packet id is “v1/devices/me/telemetry” and data is {“TEMP”:“25”}.

I can push data to server if am using Tinygsm library.
I used following credentials to publish the data.

mqtt.connect("", “RENSOTESTTOKEN”, “”);
mqtt.publish(“v1/devices/me/telemetry”, {“TEMP”:“25”});

But I want to go with direct AT command to publish and subscribe the data.
Connect packet is
102000064D514973647003C2003C0000000E52454E534F54455354544F4B454E0000
Publish packet is
3022001756312F646576696365732F6D652F74656C656D657472797B2250223A2241227D

and is used AT command for mqtt connection is

AT
AT+CSTT=“www”,"",""
AT+CIICR
AT+CIFSR
AT+CIPSTART=“TCP”,“thingsboard_server”,“1883”
AT+CIPSEND
102000064D514973647003C2003C0000000E52454E534F54455354544F4B454E00003022001756312F646576696365732F6D652F74656C656D657472797B2250223A2241227D1A

Sorry I couldn’t attach thingsboard server here.

I am not getting any result after entering packets and also module getting hang after entered mqtt data.
Please help me anyone to make correct packet. Thanks

Did you follow the excel sheet i used in video tutorial. It should help you to verify packet.

yes sir. I just followed your excel format and hercules terminal. I can get reply as “Send ok” from gsm module,but not receiving any data on thingsboard platform.

Server is “demo.thingsboard.io” and port is “1883”


Connect packet 102200064D514973647003C2003C000454455354000E52454E534F54455354544F4B454E

Publish packet
3024001776312F646576696365732F6D652F74656C656D657472797B224D73223A226644227D1A

Subcribe packet
82130001000E52454E534F54455354544F4B454E00

Kindly help me to get this.Please correct me if anything wrong in packet format.Thanks

Can you please post one example to push data to thingsboard through GSM800L module.

Yes will do it soon. I cannot verify the packet byte by byte. But i suggest you generate the packet using the MQTT library or example code to see if data packet matches. You can use PC based MQTT clients and connect to Thingsboard and then snoop using wireshark.

It is working now sir.
Initially used tinygsm library.It was working well. I checked packet from pubsub client library and did some change in packet.
Now I can able to publish data to thingsboard directly by gsm AT command.
Still not getting solution for subscribe method. Working on that. Thanks for guidelines sir.

1 Like