2.3.2.2
Receive publish message from MQTT server
If a client subscribes to one or more topics, any message published to those topics are sent by the server to the
client.
Unsolicited codes
+CMQTTRXSTART:
<client_index>,<topic_total_len>,<payloa
d_total_len>
+CMQTTRXTOPIC:
<client_index>,<sub_topic_len>
<sub_topic>
/*
for long topic, split to multiple packets to
*/
report
[<CR><LF>+CMQTTRXTOPIC:
<client_index>,<sub_topic_len>
<sub_topic>]
+CMQTTRXPAYLOAD:
<client_index>,<sub_payload_len>
<sub_payload>
/*
for long payload, split to multiple packets to
report
*/
[+CMQTTRXPAYLOAD:
<client_index>,<sub_payload_len>
<sub_payload>]
+CMQTTRXEND: <client_index>
SIM7500_SIM7600_SIM7800 Series_MQTT_AT Command Manual
1 – Socket is closed passively.
2 – Socket is reset.
3 – Network is closed.
If a client subscribes to one or more topics, any message
published to those topics are sent by the server to the client. The
following URC is used for transmitting the message published
from server to client.
1)+CMQTTRXSTART:
<client_index>,<topic_total_len>,<payload_total_len>
At the beginning of receiving published message, the
module will report this to user, and indicate client index with
<client_index>, the topic total length with <topic_total_len> and
the payload total length with <payload_total_len>.
2)+CMQTTRXTOPIC:
<client_index>,<sub_topic_len>\r\n<sub_topic>
After the command "+CMQTTRXSTART" received, the
module will report the second message to user, and indicate
client index with <client_index>, the topic packet length with
<sub_topic_len> and the topic content with <sub_topic> after
"\r\n".
For long topic, it will be split to multiple packets to report
and the command "+CMQTTRXTOPIC" will be send more than
once with the rest of topic content. The sum of <sub_topic_len>
is equal to <topic_total_len>.
3)+CMQTTRXPAYLOAD:
<client_index>,<sub_payload_len>\r\n<sub_payload>
After the command "+CMQTTRXTOPIC" received, the
module will send third message to user, and indicate client index
with
<client_index>,
<sub_payload_len>
and
<sub_payload> after "\r\n".
For long payload, the same as "+CMQTTRXTOPIC".
4) +CMQTTRXEND: <client_index>
At last, the module will send fourth message to user and
Smart Machine Smart Decision
the
payload
packet
the
payload
content
length
with
with
28 / 41
Need help?
Do you have a question about the SIM7500 Series and is the answer not in the manual?
Questions and answers