25.8. Syntax of the
+CMSS AT Command in SMS Text Mode and PDU Mode
Unlike
+CMGS, the syntax of the +CMSS AT command is the same in both SMS
text mode and PDU mode. Below shows the syntax of the +CMSS AT
command: (Optional parameters are enclosed in square brackets.)
+CMSS=index[,address[,address_type]]
Before
we discuss each of the parameters, let's see an example that gives
you some idea of how an actual command line should look like:
AT+CMSS=5,"+85291234567",145
The
index Parameter
The
first parameter of the +CMSS AT command, index,
specifies the location of the SMS message in the message storage
area.
The
address Parameter
The
second parameter of the +CMSS AT command, address,
specifies the destination address to send the SMS message to. Usually
it is a mobile number formatted using the typical ISDN / telephony
numbering plan (ITU E.164/E.163). For example, "+85291234567",
"91234567", etc. Note that the value passed to the address
parameter should be a string, i.e. it should be enclosed in double
quotes.
The
address parameter is optional
and it can be omitted. If you do so, the +CMSS AT command will use
the address stored in the SMS message header as the destination
address.
The
address_type Parameter
The
third parameter of the +CMSS AT
command, address_type,
specifies the type of the address assigned to the address
parameter. Two values are commonly used. They are 129 and 145:
129.
It means the value of address
is formatted using the typical ISDN / telephony numbering plan (ITU
E.164/E.163) but it is not sure whether the value of address
is an international number, a national number or a number of other
types. Example addresses: "85291234567", "91234567".
145.
It means the value of address
is formatted using the typical ISDN / telephony numbering plan (ITU
E.164/E.163) and it is an international number. Example address:
"+85291234567".
As
address_type is an
optional parameter, it can be omitted. If you do so, the GSM/GPRS
modem or mobile phone will use the default value of the address_type
parameter, which is:
129
if the value of address
does not start with a "+" character. For example,
"85291234567".
145
if the value of address
starts with a "+" character. For example, "+85291234567".
25.9. Format of the
Information Response of the +CMSS AT Command in SMS Text Mode and PDU
Mode
If
the GSM/GPRS modem or mobile phone sends the SMS message
successfully, it will return an information response to the computer
/ PC. The format of the +CMSS information response in SMS text mode
and that in SMS PDU mode differ by a single parameter.
In
SMS text mode, the information response of the +CMSS AT command has
the following format: (Optional fields are enclosed in square
brackets.)
+CMSS:
message_reference[,service_center_time_stamp]
Here
is an example that gives you some idea of how an actual information
response should look like:
+CMSS:
5,"07/02/05,08:30:45+32"
In
SMS PDU mode, the information response of the +CMSS AT command has
the following format: (Optional fields are enclosed in square
brackets.)
+CMSS:
message_reference[,SMS-SUBMIT-REPORT_TPDU]
The
message_reference Field
The
first field of the information response of the +CMSS AT command,
message_reference, contains an integer in the range
from 0 to 255. It is a reference number allocated by the GSM/GPRS
modem or mobile phone to the SMS message sent.
The
service_center_time_stamp Field
In
SMS text mode, the second field of the information response of the
+CMSS AT command is service_center_time_stamp.
It contains a string that indicates the time and date at which
the SMS message arrived at the service center (i.e. SMSC). The time
stamp format is "yy/MM/dd,hh:mm:ss±zz",
where yy = year, MM = month, dd = day, hh = hour, mm = minute, ss =
second, zz = time zone. Note: the unit of time zone is a quarter of
an hour.
For
example, "07/02/05,08:30:45+32" represents 5 February 2007,
8:30:45 GMT+8 hours. "+32" means GMT+8 hours, since 32
quarters of an hour = 8 hours.
Note
that service_center_time_stamp is an optional field. A
GSM/GPRS modem or mobile phone includes this field in the information
response only if the messaging service value set by the AT command
+CSMS (command name in text: Select Message Service) is 1 and the
mobile network supports the use of this messaging service value. By
default the messaging service value is 0. Usually this is the value
to be used and the service_center_time_stamp
field is not shown.
The
SMS-SUBMIT-REPORT_TPDU Field
In
SMS PDU mode, the second field of the information response of the
+CMSS AT command is SMS-SUBMIT-REPORT_TPDU.
It contains a TPDU of the type SMS-SUBMIT-REPORT in hexadecimal
format. It carries a positive submission report returned from the
SMSC. It acknowledges the GSM/GPRS modem or mobile phone that the
submission of the SMS message to the SMSC was successful. The
value of the SMS-SUBMIT-REPORT_TPDU field is a string and so
it is always enclosed in quotes.
Note
that SMS-SUBMIT-REPORT_TPDU is an optional field. A GSM/GPRS
modem or mobile phone includes this field in the information response
only if the messaging service value set by the AT command +CSMS
(command name in text: Select Message Service) is 1 and the mobile
network supports the use of this messaging service value. By default
the messaging service value is 0. Usually this is the value to be
used and the SMS-SUBMIT-REPORT_TPDU
field is not shown.
Feedback Form (ExpandCollapse)
|
|