测试BG95用MQTT推送数据,服务器自己搭建的
发→◇AT+CSQ
收←◆AT+CSQ
+CSQ: 31,99
OK
发→◇AT+QMTOPEN=0,"xxxx-mqtt.xxxxxx.cn",1883
收←◆AT+QMTOPEN=0,"xxxx-mqtt.xxxxxx.cn",1883
OK
收←◆+QMTOPEN: 0,0
发→◇AT+QMTOPEN?
收←◆AT+QMTOPEN?
+QMTOPEN: 0,"xxxx-mqtt.xxxxxx.cn",1883
OK
发→◇AT+QMTCONN=?
收←◆AT+QMTCONN=?
+QMTCONN: (0-5),<clientID>,<username>,<password>
OK
发→◇AT+QMTCONN=0,"mosquitto"
收←◆AT+QMTCONN=0,"mosquitto"
OK
+QMTCONN: 0,0,0
发→◇AT+QMTPUB=0,0,0,0,"tp1/test"
收←◆AT+QMTPUB=0,0,0,0,"tp1/test"
>
发→◇hello BG95
收←◆hello BG95
按键Ctrl+z(0x1A)
收←◆OK
+QMTPUB: 0,0,0
mosquitto设置外网请访问另外一篇文章
(40条消息) mosquitto设置外网访问_mayiQX的博客-CSDN博客https://blog.csdn.net/liujie49992/article/details/123721490