Comment on page
Everything you need to know about AT Commands
AT Commands (abbreviated from Attention Commands) are the way to control cellular modems. It provides a standardized way to instruct modems on how to behave and where to connect to.
Even though the commands are standardized by the 3GPP, different modems adhere to different versions of the specifications and manufacturers may provide additional vendor-specific AT Commands. Hence we recommend to keep the AT Commands manual of your modem manufacturer close when configuring your cellular modem.
AT Commands usually start with
AT, followed by a
<command>and in some cases a
There are 4 types of AT Commands: Set, Read, Test and Execute.
AT+<command>=<value>Instruct the modem to perform an action, such as activating the modem or enabling roaming. For example, the command to set the modem to active is:
AT+<x>Some commands can be simply executed. For example, the command to check and return the signal quality:
Pro tip: It is possible to send multiple AT Commands to the modem at the same time. To do so, list the commands in one line separated by a semi column
;, only write
ATat the start of the first command.
In order to send AT Commands, you need to connect to the modem first. You may need a program which provides the interface between your computer and the modem. You can use minicom, screen or miniterm for Linux/MacOS or PuTTY for Windows. When using Windows, you might need to install a driver to establish a connection. Have a look at the modem manufacturer's website for details about a possible driver.
To test if the connection with the cellular modem has been established, enter
AT. When the modem responds with
Not all modems support the AT Commands listed in the examples in this page. For details, always check the AT Command manual of your specific cellular modem.
Before starting the configuration process, reset the modem to its default configuration and activate the modem:
Set the error reporting to verbose, resulting in more descriptive error messages:
Check the status of the SIM card. If you receive an error, the SIM may not be inserted well, or the SIM is locked with a PIN. By default, Monogoto SIMs are not PIN protected.
Request the modem hardware version
Request the modem firmware version
Make sure you run the latest modem firmware version possible. Compare the response with the latest version published by your modem manufacturer.
Request the IMSI (International Mobile Subscriber Identity):
Request the ICCID (Integrated Circuit Card ID), which is the identification number of the SIM card:
The AT Command related to the Network Provider and cellular technology:
Read the operator and access technology:
The test command lets the modem perform a network scan:
Be patient, it may take several minutes before the modem responds, you cannot send any AT Commands in the meantime.
Set the network and technology parameters
+CSQreturns 2 values separated by a comma. The first value represents the signal strength and provides a value between 0 and 31; higher numbers indicate better signal strength. The second value represents the signal quality indicated by a value between 0 and 7. If
99, the signal is undetectable or unknown.
Read the APN configuration:
Read if the PDP context is set correctly:
The second variable indicates the status:
0: Not registered
1: Registered, home network
2: Not registered, but the modem is trying to connect
3: Registration denied
4: Unknown (for example, out of coverage)
5: Registered, roaming
90: Not registered due to UICC failure
Do you see an IP address? Congratulations! 🎉 You’ve successfully connected your cellular modem to Monogoto. Have a look at the Things logs in the Monogoto Console to find more details about the established connection.