AT+HMPUB
This command is used to send MQTT data to a specific topic.
Command |
Parameter |
Default Parameter Processing |
AT Response |
Example |
---|---|---|---|---|
AT+HMPUB=qos,topic,payload_len,payload |
qos: MQTT QoS (0, 1, 2) |
Default value: 0 |
+HMPUB OK (Publishing successful) |
If the hexstring mode is used, the data in bytes must be converted into the hexadecimal value before being transmitted. For example, to send bytes 0x12 0x34 to test, invoke the command AT+HMPUB=0,"test",2,1234. |
topic: specific topic. |
The default value is the topic of reporting properties. You are advised to set this parameter. |
+HMCON ERR: code (Publishing failed. code indicates the failure cause code.) |
||
len: length of the data to be sent, in bytes. |
- |
- |
||
payload: data converted to ASCII code. The maximum length is 1,024 bytes. |
The maximum length is 2 KB. |
- |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot