Skip to main content

AT Commands

Command Syntax

  • AT+<CMD>? : Help about <CMD>
  • AT+<CMD> : Execute <CMD>
  • AT+<CMD>=<value> : Set the value
  • AT+<CMD>=? : Show the value

General Commands

CommandDescription
ATTest the connection
AT?Show the short help menu
ATZTrigger MCU reset
AT+TDCShow or set application data transmission interval (seconds)
AT+CFGPrint all settings
AT+MODELShow module information
AT+SLEEPShow or set sleep mode
AT+DEUIShow or set device ID
AT+INTMODShow or set trigger interrupt mode (0:input, 1:falling or rising edge, 2:falling edge, 3:rising edge)
AT+APNShow or set APN
AT+3V3TExtend 3.3V stay awake power duration
AT+5VTExtend 5V stay awake power duration
AT+12VTExtend 12V stay awake power duration
AT+PROBEShow or set probe model
AT+PROShow or set usage protocol (1:COAP, 2:UDP, 3:MQTT, 4:TCP) and Payload Type (0:HEX, 1:ThingSpeak, 3:ThingsBoard, 5:JSON)
AT+RXDLShow or set reception time
AT+TRShow or set data recording time
AT+CLOCKLOGShow or set SHT recording time
AT+CDPRead or clear cached data
AT+NOUDShow or set the number of data to be uploaded
AT+DNSCFGShow or set DNS Server
AT+CSQTIMEShow or set network joining time
AT+DNSTIMERShow or set DNS timer
AT+TLSMODShow or set TLS mode
AT+GETSENSORVALUEShow current sensor measurement
AT+SERVADDRShow or set server address
AIN+ALARAMShow 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

CommandDescription
AT+MQOSSet MQTT QoS level
AT+CLIENTShow or set MQTT Client ID
AT+UNAMEShow or set MQTT Username
AT+PWDShow or set MQTT Password
AT+PUBTOPICShow or set MQTT Publish Topic
AT+SUBTOPICShow or set MQTT Subscribe Topic

System

CommandDescription
AT+FDRReset parameters to Factory Defaults
AT+PWORDShow or set system password
AT+CDPRead or clear cached data
AT+LDATAShow last loaded data

COAP Management

CommandDescription
AT+URI1Show or set CoAP option 1
AT+URI2Show or set CoAP option 2
AT+URI3Show or set CoAP option 3
AT+URI4Show or set CoAP option 4
CommandDescription
AT+CLRDTAClear 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