AT Command Handbook

Last revision 2025/12/31

The AT Command Handbook offers a comprehensive guide on utilizing AT commands for module configuration, information querying, and troubleshooting. It covers common commands like AT+CGMI for manufacturer details, AT+CSQ for signal quality, and MQTT commands for efficient device management.

Common AT Commands

Command Meaning Return Value
AT AT test command OK
AT+CGMI Query manufacturer name OK
AT+CGMM Query module model OK
AT+CGMR Query module version information OK
AT+CGSN Query IMEI number OK
AT+CCID Query SIM card ICCID number5 OK
AT+CIMI Query IMSI OK
ATI Query product information OK
AT+VER Query module internal software version OK
AT^HVER Query platform hardware version OK
AT*I Query various information (manufacturer name, module model, module version, hardware version, firmware compilation time, IMEI number, ICCID number, international mobile terminal user identification code) OK
AT+RESET Restart module OK
AT+RSTSET Restart module and restore factory settings OK
AT*EXINFO? Query boot cause value OK
AT+IPR? Query TE-TA baud rate OK
AT+CREG? Query network registration status OK
AT+CSQ Query signal quality OK
AT+CPIN? Query whether the sim card is normal OK
AT+CGATT? Query whether it is attached to the data network OK

Note: This AT command is case insensitive
Caution: Upon connecting the module to a computer, three COM ports will appear, of which only one is designated for AT command debugging. The remaining two COM ports are not operational.

MQTT AT Commands

Command Meaning Return Value
AT+CPIN? Query whether sim card is normal +CPIN: READY
AT+CGATT? Query whether it is attached to the data network +CGATT: 1
AT+MCONFIG="clientid","user","password" Set MQTT related parameters OK
AT+MIPSTART="svraddr","port" Establish TCP connection CONNECT OK
AT+MCONNECT=clean_session, keepalive Client requests session connection to server CONNACK OK
AT+MSUB="topic",qos Subscribe to topic SUBACK
AT+MPUB="topic",qos,retain,"message" Publish message

Return Value Explanation

Detailed Result Code Meaning
OK Command executed, no error
CONNECT Connection successful
+CME ERROR:10 SIM card not inserted
+CME ERROR:network timeout Network timeout
CONNACK OK Connection successful
ERROR Connection failed
+CME ERROR:SIM busy SIM card busy

Was this article helpful?

TOP