MOBITEK Q25 SETTINGS — MOSQUITTO MQTT SERVER
- Q25’s Setting:-
- Remote Host: 175.*.*.* / *.dyndns.*
- Remote Port: 1883
- User Name: ***
- User Password: ***
- Subscribe Topic: Test
- Publish Topic: Test
- Mosquitto version 2.0.14‘s Settings:-
- In “C:\Program Files\mosquitto\mosquitto.conf”:
- find “Listeners” and add
listener 1883 0.0.0.0 - find “Security” and add
allow_anonymous true
- find “Listeners” and add
- Stop “Mosquitto Broker” in “Services”
- Open command prompt as administrator and enter:
- cd “C:\Program Files\mosquitto”
- mosquitto -v -c mosquitto.conf
- Add port forwarding in router:
- Service Type = TCP
- External Port = 1883
- Internal IP = (Public IP of router)
- Internal Port = 1883
- Protocol = ALL
- In “C:\Program Files\mosquitto\mosquitto.conf”:
AT COMMANDS — MOSQUITTO MQTT SERVER
DESCRIPTION | AT COMMAND |
Configure Parameters of a TCP/IP ContextAT+QICSGP=<contextID>,<context_type>,<APN>,<username>,<password>, <authentication> |
AT+QICSGP=1,1,”yoodo”,””,””,1 OK |
Activate a PDP ContextAT+QIACT=<contextID> |
AT+QIACT=1 OK AT+QIACT? |
Configure receiving mode when data is received from serverAT+QMTCFG=“recv/mode”,<client_idx>,<msg_recv_mode>, <msg_len_enable> |
AT+QMTCFG=”recv/mode”,0 +QMTCFG: “recv/mode”,0,0 OK |
Open a network for MQTT clientAT+QMTOPEN=<client_idx>,“<host_name>”,<port> |
AT+QMTOPEN=0,”175.*.*.*”,1883 OK +QMTOPEN: 0,0 AT+QMTOPEN? +QMTOPEN: 0,”175.*.*.*”,1883 OK |
Connect a client to MQTT ServerAT+QMTCONN=<client_idx>,“<clientID>”,“<username>”,“<password>” |
AT+QMTCONN=0,”Q25″,””,”” OK +QMTCONN: 0,0,0 AT+QMTCONN? +QMTCONN: 0,3 OK |
Publish messagesAT+QMTPUBEX=<client_idx>,<msgID>,<qos>,<retain>,“<topic>”,<msg_length> |
AT+QMTPUBEX=0,0,0,0, “Test”,30 > Q25 publish from Hyper Terminal OK +QMTPUBEX: 0,0,0 |
Subscribe to TopicsAT+QMTSUB=<client_idx>,<msgID>,“<topic1>”,<qos1>[,“<topic2>”,<qos2>…] |
AT+QMTSUB=0,1, “Test”,0 OK +QMTSUB: 0,1,0,0 +QMTRECV: 0,0, “Test”, “Publish from MQTT Explorer in HPC-8300” |
Disconnect a client to MQTT ServerAT+QMTDISC=<client_idx> |
AT+QMTDISC=0 OK |
Close a network for MQTT clientAT+QMTCLOSE=<client_idx> |
AT+QMTCLOSE=0 OK |
Deactivate a PDP ContextAT+QIDEACT=<contextID> |
AT+QIDEACT=1 OK |
MOBITEK Q25 SETTINGS — FAVORIOT
- Remote Host: mqtt.favoriot.com
- Remote Port: 1883
- User Name: ***
- User Password: ***
- Subscribe Topic: XYoUfrDZ8mzvHNKJAtkLIvVBOw23dGnb/v2/streams/status
- Publish Topic: XYoUfrDZ8mzvHNKJAtkLIvVBOw23dGnb/v2/streams
AT COMMANDS — FAVORIOT
DESCRIPTION | AT COMMAND |
Configure Parameters of a TCP/IP ContextAT+QICSGP=<contextID>,<context_type>,<APN>,<username>,<password>, <authentication> Parameter:
|
AT+QICSGP=1,1,”yoodo”,””,””,1 OK |
Activate a PDP ContextAT+QIACT=<contextID> |
AT+QIACT=1
AT+QIACT? |
Configure receiving mode when data is received from serverAT+QMTCFG=“recv/mode”,<client_idx>,<msg_recv_mode>, <msg_len_enable> Parameter:
|
AT+QMTCFG=“recv/mode”,0,0,1
+QMTCFG: “recv/mode”,0,1 OK |
Open a network for MQTT clientAT+QMTOPEN=<client_idx>,“<host_name>”,<port> Parameter:
|
AT+QMTOPEN=0,”mqtt.favoriot.com”,1883 OK +QMTOPEN: 0,0 AT+QMTOPEN? +QMTOPEN: 0,”mqtt.favoriot.com”,1883 OK |
Connect a client to MQTT ServerAT+QMTCONN=<client_idx>,“<clientID>”,“<username>”,“<password>” Parameter:
|
AT+QMTCONN=0,”Q25″, “***”, “***” OK +QMTCONN: 0,0,0 |
Publish messagesAT+QMTPUBEX=<client_idx>,<msgID>,<qos>,<retain>,“<topic>”,<msg_length> Parameter:
|
AT+QMTPUBEX=0,0,0,0, “XYoUfrDZ8mzvHNKJAtkLIvVBOw23dGnb/v2/streams”,30 > Q25 send from Hyper Terminal OK +QMTPUBEX: 0,0,0 |
Subscribe to TopicsAT+QMTSUB=<client_idx>,<msgID>,“<topic1>”,<qos1>[,“<topic2>”,<qos2>…] Parameter:
|
AT+QMTSUB=0,0, “XYoUfrDZ8mzvHNKJAtkLIvVBOw23dGnb/v2/streams”,0 OK +QMTSUB: 0,0,0,0 +QMTRECV: 0,0, “XYoUfrDZ8mzvHNKJAtkLIvVBOw23dGnb/v2/streams”,38, “Publish from MQTT Explorer in HPC-8300″ +QMTRECV: 0,0,”XYoUfrDZ8mzvHNKJAtkLIvVBOw23dGnb/v2/streams”,46, “Publish from MQTT Explorer in Taufiq’s desktop” |
Close a network for MQTT clientAT+QMTCLOSE=<client_idx> Parameter:
|
AT+QMTCLOSE=0
OK |