17.4. Execution
Command -- Performs an Action or Retrieve Information/Status about
the GSM/GPRS Modem or Mobile Phone
An
execution operation is used to perform an action (for example, send
or read an SMS message) or retrieve information/status about the
GSM/GPRS modem or mobile phone (for example, retrieve the current
battery charge level, battery charging status or radio signal
strength of the mobile network). The syntax is:
command=value1,value2,...valueN
where
command is an AT command and
value1 to valueN
are the values to assign to the AT command. If the AT command
does not have any parameters, the part "=value1,value2,...valueN"
should be omitted. When an AT command is used in the above syntax to
perform an execution operation, it is called an execution command.
Here
is an example illustrating the use of an execution command. The AT
command +CMSS (command name in text: Send Message from Storage) can
be used to perform an execution operation to send an SMS message
stored in message storage. It has three parameters. They specify the
index of the memory location that stores the SMS message, the
destination phone number and the type of the phone number
respectively. To send the SMS message at index 1 to the phone number
+85291234567, the following command line can be used:
AT+CMSS=1,"+85291234567",145
Some
AT commands have optional parameters. You can choose not to assign
values to them. For example, the third parameter of the +CMSS AT
command is optional. If no value is assigned to the third parameter,
the GSM/GPRS modem or mobile phone will use the default parameter
value, which is 145 if the destination phone number starts with "+"
(the plus character). Hence, this command line:
AT+CMSS=1,"+85291234567"
is
equivalent to:
AT+CMSS=1,"+85291234567",145
Unlike
set commands, execution commands do not store the parameter values
assigned to them. So, no read command is available for retrieving the
last parameter values assigned to an execution command. For example,
if you send the command line "AT+CMSS?" to your GSM/GPRS
modem or mobile phone, the ERROR result code will be returned:
AT+CMSS? ERROR
Feedback Form (ExpandCollapse)
|
|