Справочник Пользователя для Motorola G24

Скачать
Страница из 642
SMS
3-134
 AT Commands Reference Manual
December  31, 2007
+CMGS, Send SM to Network
This command sends an SM from the G24 to the network. The message reference value <mr> is 
returned to the G24 upon successful delivery of the message.
Valid <toda> will be any value between 128-255.
The header parameters in TEXT mode will be set according to CSMP settings.
The following table shows the +CMGS parameters.
Example
AT+CMGS="064593042",129
>This is the message body <CTRL+Z> //<CTRL+Z> ends the prompt text mode and returns to
regular AT command mode
OK
AT+CMGF=0
OK
AT+CMGS=24
>079179521201009511FF0B917962543940F20008001400410042004300440045 <CTRL+Z>
+CMGS: 128
OK
Note:
Any character sent by TE to G24 before G24 has reported a result of AT+CMGS 
operation, will abort AT+CMGS command execution. However, if SMS was already sent 
to network and sending operation was successful, the result of operation "+CMGS <mr>" 
will be reported by G24. 
A flex dependant enhancement enables the reporting of numeric error code to TE, in case 
the sending operation has failed. The numeric error code will be reported in format: 
"+CMGS ERROR: <err>".
Command Type
Syntax
Response/Action
Remarks
Set
If text mode (+CMGF=1):
+CMGS=<da>[,<toda>]<CR>
text is entered<ctrl-Z/ESC>
If PDU mode (+CMGF=0):
+CMGS=<length><CR>
PDU is entered<ctrl-Z/ESC>
+CMGS: <mr>
+CMS ERROR: <err>
The Set command 
validates the input 
parameters, sends the 
SM to network and 
reports the result of 
the operation to the 
G24.
Table 3-81: +CMGS Parameters
<Parameter>
Description
<da>
Destination address in quoted string. This field contains a single MIN number.
<toda>
Type of DA. Value between 128-255 (according to GSM 03.40, 9.1.2.5). If this field is 
not given and first character of <da> is '+' , <toda> will be 145, otherwise 129.
<length>
Size of message in PDU mode format, in octets, excluding SMSC data.
<mr>
Sent message reference number.
PDU
Message header and contents in PDU mode format. See description in