17. AT Command
Operations: Test, Set, Read and Execution
are four types of AT command operations:
operation. A test operation is used to check whether a certain
AT command is supported by the GSM/GPRS modem or mobile phone.
operation. A set operation is used to change the settings used
by the GSM/GPRS modem or mobile phone for certain tasks.
operation. A read operation is used to retrieve the current
settings used by the GSM/GPRS modem or mobile phone for certain
operation. An execution operation is used to perform an action
or retrieve information/status about the GSM/GPRS modem or mobile
command syntax for performing an operation will be described in
detail in the following sections.
17.1. Test Command
-- Checks Whether a Certain AT Command is Supported
test operation is used to check whether a certain AT command is
supported by the GSM/GPRS modem or mobile phone. All extended AT
commands support the test operation. The syntax is:
command is an AT command.
When an AT command is used in the above syntax to perform a test
operation, it is called a test command.
is an example. The AT command +CGMI (command name in text: Request
Manufacturer Identification) is used to get the manufacturer name of
the GSM/GPRS modem or mobile phone. To test whether +CGMI is
supported, you can make use of the test command "+CGMI=?".
The complete command line that should be entered is:
the GSM/GPRS modem or mobile phone supports the AT command +CGMI, the
result code "OK" will be returned, like this:
the GSM/GPRS modem or mobile phone does not support the AT command
+CGMI, the result code "ERROR" will be returned, like this:
the above example, the AT command +CGMI does not have any parameters.
If the AT command to be tested has parameter(s), the parameter
value(s) supported by the GSM/GPRS modem or mobile phone may be
printed additionally. Below is an example that illustrates the format
of the response. +COMMAND1 is a fictitious AT command that has four
supported values of each of the four parameters are enclosed in
parentheses. Commas are used to delimit the parentheses and the
values inside parentheses. A hyphen is used to indicate a range of
values. The values inside parentheses can be of the string type.
the above example, the response of the test command "+COMMAND1=?"
provides us the following information:
The first parameter accepts either 0 or 1.
The second parameter accepts any integer between 0 and 10.
The third parameter accepts 0, 1 or any integer between 5 and 10.
The fourth parameter accepts either the string "GSM" or
a few AT commands, the test operation does not return the parameter
values supported. Instead, it returns the values that are allowed to
appear in the information response of the AT command. An example is
the +CBC AT command (command name in text: Battery Charge). The +CBC
command is used to retrieve the connection status and charge level of
the battery of the mobile device. Two values are returned in the
information response of the +CBC AT command. The format is:
example, if the battery is placed in the mobile device with no
charger connected and the charge level is 80%, the result of the
execution of the +CBC AT command will be:
you run the test command "+CBC=?", all the supported values
that are allowed to appear in the connection status field and charge
level field will be provided. With my Nokia 6021, the result is:
means the connection status field in the information response of the
+CBC AT command can contain either 0 or 1, while "(0-100)"
means the charge level field can contain any integer between 0 and
Feedback Form (ExpandCollapse