MQTTS- Not Verify Server
MQTT (Message Queuing Telemetry Transport) is a lightweight broker-based publish/subscribe messaging protocol.
It is a machine-to-machine (M2M)/”Internet of Things” connectivity protocol.
It was designed as an extremely lightweight publish/subscribe messaging transport.
It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium.
1. 통신시스템: MQTTS- Not Verify Server
2. 명령시퀀스: MQTTS- Not Verify Server
| No | Command | Response | Description |
| 1 | PDP Context 설정 | ||
| 2 | AT+CMQTTSTART |
+CMQTTSTART: 0 OK |
Start MQTT service, activate PDP context |
| 3 | AT+CMQTTACCQ=0, “client test0” | OK |
Acquire one client which will connect to a MQTT server without SSL/TLS. |
| 4.1 | AT+CMQTTWILLTOPIC=0,10 | > | Set the topic of the will |
| 4.2 | >0123456789 | OK | Input 10 Character as topic |
| 5.1 | AT+CMQTTWILLMSG=0,6,1 | > | Set the will message |
| 5.2 | >qwerty | OK | Input 6 Character |
| 6 |
AT+CMQTTCONNECT=0, “tcp://test.mosquitto.org:8883”,60,1 |
OK +CMQTTCONNECT: 0,0 |
Connect to a MQTT server |
| 7.1 | AT+CMQTTTOPIC=0,13 | > | Set the topic for the PUBLISH message |
| 7.2 | >dddrrrggghhhk | OK | Input topic to publish |
| 8.1 | AT+CMQTTPAYLOAD=0,60 | > | Set the payload for the PUBLISH message |
| 8.2 |
>012345678901234567890123456789 012345678901234567890123456789 |
OK | Input message |
| 9 | AT+CMQTTPUB=0,1,60 |
OK +CMQTTPUB: 0,0 |
Publish a message (Received Hi, MOMO sent from server) |
| 10.1 | AT+CMQTTSUBTOPIC=0,9,1 | > | Set one topic for the SUBSCRIBE message |
| 10.2 | >123456789 | OK | |
| 11.1 | AT+CMQTTSUB=0 | > | Set one topic for the SUBSCRIBE message |
| 11.2 | >simcommsg | OK | |
| 12 | AT+CMQTTUNSUB=0,9,0 | OK +CMQTTSUB: 0,0 |
Subscribe a message |
| 13.1 | AT+CMQTTUNSUB=0,9,0 | > | Unsubscribe one topic from the server |
| 13.2 | >simcommsg |
OK +CMQTTUNSUB: 0,0 |
|
| 14 | AT+CMQTTDISC=0,120 |
OK +CMQTTDISC: 0,0 |
Disconnect from server |
| 15 | AT+CMQTTREL=0 | OK | Release the client |
| 16 | AT+CMQTTSTOP |
+CMQTTSTOP: 0 OK +CMQTTNONET |
Stop MQTT Service |
