AT Command Handbook

Last revision 2025/12/31

The AT Command Handbook serves as a detailed guide on AT commands for querying device details, managing SIM cards, and setting up MQTT connections, vital for optimizing module performance.

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+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

Query of Return Value Results and Meaning

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