From 568dd34fd09ebf910eddc61a44b72a44d37e7c1d Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sat, 23 Mar 2024 07:42:05 +0100 Subject: [PATCH 1/1] convert setting params to text --- docs/How to set MQTT parameters.txt | 66 +++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 docs/How to set MQTT parameters.txt diff --git a/docs/How to set MQTT parameters.txt b/docs/How to set MQTT parameters.txt new file mode 100644 index 0000000..85d1ca5 --- /dev/null +++ b/docs/How to set MQTT parameters.txt @@ -0,0 +1,66 @@ +How to set MQTT parameters + +1. Settable Parameters + + +Sleep --- *DEBUG --> Debug --- *ADMIN --> Admin +mode <-- *SLEEP --- mode <-- *DEBUG --- mode + + +# in Sleep mode + +Switch to debug mode command: *DEBUG response: Debug mode ok + +The fault mode of the device is sleep mode, which is the normal working mode. Other modes are parameter setting related. + +# in Debug mode + + command response + ------- -------- +Set MQTT protocol #NB_MQTT + Please set IP or domain name at the same time + +Set IP #IP=125.227.248.178,1883 OK IP=125.227.248.178,1883i + Static IP is strongly recommended + +Set domain name #MQTT_IP=mqtt.zc-sensor.com,1883 OK MQTT_IP:mqtt.zc-sensor.com,1883 + You should write in either IP or domain name; not both. + +Set DNS #DNS=218.4.4.4 Set DNS as: 218.4.4.4 + Optional, only useful when domain name connection is not smooth. + +Set client ID #ClientID=123456789 OK DeviceID=123456789 Username= password= + It is not recommended to set these three parameters unless it is necessary. + By default, the ClientID is the IMEI, and the user name and password are empty. +Set user name #Username=test OK DeviceID=123456789 Username=test password= +Set password #Password=123456 OK DeviceID=123456789 Username=test password=123456 + +Set heartbeat interval #HR300 Heartbeat interval: 300 300/60=5mins + +Set NB network access timeout #POWERTIME=300 NB network access trial time after power-on: 300 seconds + Default value is 600 seconds. + +Set sleep mode *SLEEP Sleep mode ok Exit debug mode + +Set admin mode *ADMIN Admin mode ok Enter admin mode to set APN + + + +# in Admin mode + +Set APN AT*MCGDEFCONT="IPV4V6",""nbiot" *MCGDEFCONT: "IPV4V6",""nbiot" + +Read APN settings AT*MCGDEFCONT? *MCGDEFCONT: "IPV4V6",""nbiot" + +Read SIM card number AT*MICCID *MIICCID: 898601177231000559705 + +Read device IMEI AT+CGSN=1 +CGSN: 869858033594491 + +Check if device is connectted to NB network + AT+CEREG? +CEREG: 0,1 1 = network access successful, 2 = searching for network + +Read current NB network band + AT*MBAND? *MBAND: 8 + +Set debug mode *DEBUG Debug mode ok Exit admin mode + -- 2.20.1