SimCom SIM7500 Series Command Manual page 32

Mqtt at, lte module
Hide thumbs Also See for SIM7500 Series:
Table of Contents

Advertisement

//
Connect to a MQTT server
AT+CMQTTCONNECT=0,"tcp://test.mosquitto.org:1883",60,1
OK
+CMQTTCONNECT: 0,0
//
Subscribe one topic from the server
AT+CMQTTSUB=0,9,1
>simcommsg
OK
+CMQTTSUB: 0,0
//
Set the topic for the PUBLISH message
AT+CMQTTTOPIC=0,9
> simcommsg
OK
//
Set the payload for the PUBLISH message
AT+CMQTTPAYLOAD=0,60
> 012345678901234567890123456789012345678901234567890123456789
OK
//
Publish a message
AT+CMQTTPUB=0,1,60
OK
+CMQTTPUB: 0,0
//receive publish message from server
+CMQTTRXSTART: 0,9,60
+CMQTTRXTOPIC: 0,9
simcommsg
+CMQTTRXPAYLOAD: 0,60
012345678901234567890123456789012345678901234567890123456789
+CMQTTRXEND: 0
//
Set one topic for the SUBSCRIBE message
AT+CMQTTSUBTOPIC=0,9,1
>123456789
OK
//
Subscribe a message
AT+CMQTTSUB=0
OK
+CMQTTSUB: 0,0
SIM7500_SIM7600_SIM7800 Series_MQTT_AT Command Manual
Smart Machine Smart Decision
31 / 41

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SIM7500 Series and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Sim7800 seriesSim7600 series

Table of Contents