AT Command Handbook
Last revision 2025/12/31
The AT Command Handbook is a comprehensive guide to utilizing AT commands for device control and network management, offering detailed explanations of common commands, MQTT connectivity, GNSS positioning, HTTP(S) routines, and function modes, aimed at efficient operation and problem-solving.
Common AT Commands
| Command | Meaning | Return Value |
|---|---|---|
| AT | AT test command | OK |
| ATE | ATE1 sets echo, ATE0 turns off echo | OK |
| AT+CGMI | Query module manufacturer | OK |
| AT+CGMM | Query module model identifier | OK |
| AT+CGSN | Query product serial number | OK |
| AT+CGMR | Query software version serial number | OK |
| AT+IPR=9600 | Set module temporary hardware serial port baud rate to 9600 | OK |
| AT+IPR? | Query current hardware serial port baud rate | OK |
| AT+CPIN? | Query SIM card status, return READY, indicating that the SIM card can be recognized normally | OK |
| AT+CSQ | Network signal quality query, return signal value | OK |
| AT+CGREG? | Check network registration | OK |
| AT+CMEE=1 | Report mobile device error | OK |
| AT+CGNAPN | Get network APN in CAT-M or NB-IOT | OK |
| AT+CPSI? | Query UE system information | OK |
| AT+CNACT=0,1 | Activate application network | OK |
| AT+CNACT? | Query network IP | OK |
| AT+CNACT=0,0 | Close application network | OK |
| AT+CNMP=38 | Select LTE mode | OK |
| AT+CMNB=2 | Select NB network | OK |
| AT+CPOWD=1 | Shutdown | NORMAL POWER DOWN |
Note: Please refer to the AT instruction set for more test commands
MQTT Connection AT Commands
| Command | Meaning | Return Value |
|---|---|---|
| AT+CNACT=0,1 | Activate application network | OK |
| AT+CNACT? | Query network IP | OK |
| AT+SMCONF | Set MQTT parameters | OK |
| AT+SMCONN | Start MQTT connection | OK |
| AT+SMPUB | Push topic message | OK |
| AT+SMSUB | Subscribe to topic | OK |
| AT+SMUNSUB | Unsubscribe from topic | OK |
| AT+SMSTATE | Query MQTT connection status | OK |
| AT+SMPUBHEX | Push HEX type topic message | OK |
| AT+SMDISC | Disconnect MQTT connection | OK |
| AT+CNACT=0,0 | Disconnect application connection | OK |
GNSS Positioning AT Commands
| Command | Meaning | Return Value |
|---|---|---|
| AT+CGNSPWR | GNSS power control | OK |
| AT+CGNSINF | GNSS navigation information parsed from NMEA sentence | OK |
| AT+CGNSCOLD | GNSS cold start | OK |
| AT+CGNSWARM | GNSS warm start | OK |
| AT+CGNSHOT | GNSS hot start | OK |
| AT+CGNSMOD | GNSS working mode setting | OK |
| AT+CGNSXTRA | Open GNSS XTRA | OK |
| AT+CGNSCPY | Copy GNSS XTRA file | OK |
| AT+SGNSCFG | GNSS NMEA output configuration | OK |
| AT+SGNSCMD | AT serial port output GNSS NMEA data | OK |
Note: There are three ways to start GNSS: cold start, warm start, and hot start.
- Cold start: When GNSS starts in a brand new environment and needs to re-acquire all satellite information. It is usually used for first use, battery exhaustion, or large device movement. In this case, the startup time is longer.
- Warm start: This is when GNSS starts again more than 2 hours after the last positioning. At this time, some satellite information has changed and needs to be updated. The startup time is between cold start and hot start, suitable for restarting after temporary shutdown of the device.
- Hot start: This is when GNSS starts again within a short time (within 2 hours). The device's position has not changed much, most of the satellite information is still valid, the startup time is the shortest, suitable for frequent startups within a short time.
HTTP(S) Routine AT Commands
| Command | Meaning | Return Value |
|---|---|---|
| AT+CSSLCFG | Configure SSL parameters for context identifier | OK |
| AT+SHCONF | Set HTTP(S) parameters | OK |
| AT+SHSSL | Select SSL configuration | OK |
| AT+SHCONN | HTTP(S) connection | OK |
| AT+SHBOD | Set Body | OK |
| AT+SHAHEAD | Add Head | OK |
| AT+SHPARA | Set HTTP(S) Para | OK |
| AT+SHCPARA | Clear HTTP(S) Para | OK |
| AT+SHCHEAD | Clear Head | OK |
| AT+SHSTATE | Query HTTP(S) connection status | OK |
| AT+SHREQ | Set request type | OK |
| AT+SHREAD | Read response value | OK |
| AT+SHDISC | Disconnect HTTP(S) | OK |
| AT+HTTPTOFS | Download file to ap file system | OK |
| AT+HTTPTOFSRL | Status of downloading file to ap file system | OK |
Function Mode AT Commands
| Command | Meaning | Return Value |
|---|---|---|
| AT+CFUN=0 | Minimum function mode | OK |
| AT+CFUN=1 | Full function mode (default) | OK |
| AT+CFUN=4 | Flight mode | OK |
Note:
-
After setting "AT+CFUN=0", the module enters the minimum function mode, turns off the radio frequency function and SIM card function. In this case, the serial port and USB can still be used, but the functions related to radio frequency and SIM card and some AT commands cannot be used.
-
After setting "AT+CFUN=4", the module enters flight mode and turns off the radio frequency function. In this case, the module's serial port and USB can still be used, but the functions related to radio frequency and some AT commands cannot be used.
-
When the module enters the minimum function mode or enters the flight mode, it can return to the full function mode by the command "AT+CFUN=1".
Was this article helpful?
