convert setting params to text
[zc] / docs / How to set MQTT parameters.txt
1 How to set MQTT parameters
2
3 1. Settable Parameters
4
5
6 Sleep   --- *DEBUG -->  Debug   --- *ADMIN -->  Admin
7 mode    <-- *SLEEP ---  mode    <-- *DEBUG ---  mode
8
9
10 # in Sleep mode
11
12 Switch to debug mode    command: *DEBUG         response: Debug mode ok
13
14 The fault mode of the device is sleep mode, which is the normal working mode. Other modes are parameter setting related.
15
16 # in Debug mode
17
18                         command                         response
19                         -------                         --------
20 Set MQTT protocol       #NB_MQTT
21                                 Please set IP or domain name at the same time
22
23 Set IP                  #IP=125.227.248.178,1883        OK IP=125.227.248.178,1883i
24                                 Static IP is strongly recommended
25
26 Set domain name         #MQTT_IP=mqtt.zc-sensor.com,1883        OK MQTT_IP:mqtt.zc-sensor.com,1883
27                                 You should write in either IP or domain name; not both.
28
29 Set DNS                 #DNS=218.4.4.4                  Set DNS as: 218.4.4.4
30                                 Optional, only useful when domain name connection is not smooth.
31
32 Set client ID           #ClientID=123456789             OK DeviceID=123456789 Username= password=
33                                 It is not recommended to set these three parameters unless it is necessary.
34                                 By default, the ClientID is the IMEI, and the user name and password are empty.
35 Set user name           #Username=test                  OK DeviceID=123456789 Username=test password=
36 Set password            #Password=123456                OK DeviceID=123456789 Username=test password=123456
37
38 Set heartbeat interval  #HR300                          Heartbeat interval: 300                 300/60=5mins
39
40 Set NB network access timeout   #POWERTIME=300          NB network access trial time after power-on: 300 seconds
41                                                         Default value is 600 seconds.
42
43 Set sleep mode          *SLEEP                          Sleep mode ok                   Exit debug mode
44
45 Set admin mode          *ADMIN                          Admin mode ok                   Enter admin mode to set APN
46
47
48
49 # in Admin mode
50
51 Set APN                 AT*MCGDEFCONT="IPV4V6",""nbiot" *MCGDEFCONT: "IPV4V6",""nbiot"
52
53 Read APN settings       AT*MCGDEFCONT?                  *MCGDEFCONT: "IPV4V6",""nbiot"
54
55 Read SIM card number    AT*MICCID                       *MIICCID: 898601177231000559705
56
57 Read device IMEI        AT+CGSN=1                       +CGSN: 869858033594491
58
59 Check if device is connectted to NB network
60                         AT+CEREG?                       +CEREG: 0,1     1 = network access successful, 2 = searching for network
61
62 Read current NB network band
63                         AT*MBAND?                       *MBAND: 8
64
65 Set debug mode          *DEBUG                          Debug mode ok           Exit admin mode
66