AT Commands
Command Syntax
AT+<CMD>?: Help about <CMD>AT+<CMD>: Execute <CMD>AT+<CMD>=<value>: Set the valueAT+<CMD>=?: Show the value
General Commands
| Command | Description |
|---|---|
AT | Test the connection |
AT? | Show the short help menu |
ATZ | Trigger MCU reset |
AT+TDC | Show or set application data transmission interval (seconds) |
AT+CFG | Print all settings |
AT+MODEL | Show module information |
AT+SLEEP | Show or set sleep mode |
AT+DEUI | Show or set device ID |
AT+INTMOD | Show or set trigger interrupt mode (0:input, 1:falling or rising edge, 2:falling edge, 3:rising edge) |
AT+APN | Show or set APN |
AT+3V3T | Extend 3.3V stay awake power duration |
AT+5VT | Extend 5V stay awake power duration |
AT+12VT | Extend 12V stay awake power duration |
AT+PROBE | Show or set probe model |
AT+PRO | Show or set usage protocol (1:COAP, 2:UDP, 3:MQTT, 4:TCP) and Payload Type (0:HEX, 1:ThingSpeak, 3:ThingsBoard, 5:JSON) |
AT+RXDL | Show or set reception time |
AT+TR | Show or set data recording time |
AT+CLOCKLOG | Show or set SHT recording time |
AT+CDP | Read or clear cached data |
AT+NOUD | Show or set the number of data to be uploaded |
AT+DNSCFG | Show or set DNS Server |
AT+CSQTIME | Show or set network joining time |
AT+DNSTIMER | Show or set DNS timer |
AT+TLSMOD | Show or set TLS mode |
AT+GETSENSORVALUE | Show current sensor measurement |
AT+SERVADDR | Show or set server address |
AIN+ALARAM | Show or set analog input (4-20 mA) alarm thresholds. The alarm is triggered when the measured value goes below the specified lower or above the upper limit. |
AIN+ALARAM Parameters
AIN+ALARAM=Enable,Period,LowLimit,HighLimit,Reserved
- Enable: 1 Active, 0 Inactive.
- Period (seconds): In the range of 180 - 65535. Alarm control period.
- LowLimit (uA): In the range of 0 - 20000. Alarm is triggered if it falls below this value.
- HighLimit (uA): In the range of 0 - 20000. Alarm is triggered if it exceeds this value.
- Reserved: Reserved, not used.
Example:
AIN+ALARAM=1,180,4000,10000,0
Alarm is active, checked every 180 seconds, and the alarm is triggered if the measured current falls below 4000 uA or exceeds 10000 uA.
MQTT Management
| Command | Description |
|---|---|
AT+MQOS | Set MQTT QoS level |
AT+CLIENT | Show or set MQTT Client ID |
AT+UNAME | Show or set MQTT Username |
AT+PWD | Show or set MQTT Password |
AT+PUBTOPIC | Show or set MQTT Publish Topic |
AT+SUBTOPIC | Show or set MQTT Subscribe Topic |
System
| Command | Description |
|---|---|
AT+FDR | Reset parameters to Factory Defaults |
AT+PWORD | Show or set system password |
AT+CDP | Read or clear cached data |
AT+LDATA | Show last loaded data |
COAP Management
| Command | Description |
|---|---|
AT+URI1 | Show or set CoAP option 1 |
AT+URI2 | Show or set CoAP option 2 |
AT+URI3 | Show or set CoAP option 3 |
AT+URI4 | Show or set CoAP option 4 |
Print or Clear Historical Data
| Command | Description |
|---|---|
AT+CLRDTA | Clear storage, revert the record location to position 1 |
Example AT Configuration
The device is configured to connect to an MQTT server (1.2.3.4:1883) and send JSON data.
- Sends sensor data to the server every 5 minutes.
- Connects to the internet via NB-IoT network.
- Encryption is off, direct connection is established.
AT+SERVADDR=1.2.3.4,1883
AT+CLIENT=clientid
AT+UNAME=accesstoken
AT+PWD=NULL
AT+PUBTOPIC=v1/devices/me/telemetry
AT+SUBTOPIC=v1/devices/me/telemetry
AT+TDC=300
AT+INTMOD=0
AT+APN=nbiot
AT+5VT=0
AT+PRO=3,5
AT+RXDL=0
AT+CLOCKLOG=1,65535,15,0
AT+CSQTIME=5
AT+TLSMOD=0,0
AIN+ALARAM=1,180,4000,10000,0