25.10. SMSC Number
to be Used by the +CMSS AT Command to Send SMS Messages
Earlier
in this SMS tutorial, we described how the AT
command +CSCA (command name in text: Service Centre Address)
could be used to set the SMSC number for sending SMS messages. The AT
command +CSCA is straightforward to use. However, the following fact
complicates things a bit: an SMS message can have an SMSC number
stored with it in message storage and this SMSC number is used by the
+CMSS AT command to send the SMS message.
25.10.1. SMS
Text Mode
In
SMS text mode, when you use the AT
command +CMGW (command name in text: Write Message to Memory) to
write an SMS message to the message storage area, the SMSC number
specified by the AT command +CSCA is saved with the SMS message. The
+CMSS AT command will use this SMSC number to send the SMS message.
To
understand better, let's consider the following example. Suppose we
use the AT command +CSCA to change the SMSC number to +85290000000,
like this:
AT+CSCA="+85290000000"
Then
we use the AT command +CMGW to write the text message "Sending
text messages is easy." to the message storage area. In SMS text
mode, the command line should be something like this:
AT+CMGW<CR>Sending
text messages is easy.<Ctrl+z>
After
that, we use the AT command +CSCA to change the SMSC number to
+85291111111:
AT+CSCA="+85291111111"
At
this point, if we use the +CMSS AT command to send the text message
out, the GSM/GPRS modem or mobile phone will perform the task using
the SMSC number +85290000000, not the current number +85291111111.
Once
an SMS message has been written to the message storage area, there is
no way to change the SMSC number saved with it via AT commands. But
you can always create a new SMS message with the same message body
but with a different SMSC number.
Note:
It is possible that the command behavior on your mobile device is
slightly different from what was described above. So, you may want to
do something similar to the above example to find out the exact
command behavior on your mobile device.
25.10.2. SMS
PDU Mode
In
SMS PDU mode, when you use the AT command +CMGW to write an SMS
message to the message storage area, a certain SMSC number is saved
with the SMS message. This SMSC number will be used by the AT command
+CMSS for sending the SMS message out. The value assigned to the
SMSC_number_and_TPDU
parameter of the AT command +CMGW determines what SMSC number
is saved with the SMS message.
Note
that once an SMS message has been written to the message storage
area, there is no way to change the SMSC number saved with it via AT
commands. But you can always create a new SMS message with the same
message body but with a different SMSC number.
The
value of the SMSC_number_and_TPDU
parameter can be divided into two parts: the SMSC part and
TPDU part. Following is an example
that gives you some idea of how an actual value of the
SMSC_number_and_TPDU
parameter should look like. The SMSC part is displayed in bold type.
07915892000000F001000B915892214365F7000021493A283D0795C3F33C88FE06CDCB6E32885EC6D341EDF27C1E3E97E72E
25.10.2.1. Case 1:
SMSC Part is Not "00"
If
the SMSC part is not "00", a certain SMSC number is encoded
in the SMSC part. It will be saved with the SMS message in message
storage. The AT command +CMSS will use this SMSC number for sending
the SMS message. In the above example, the SMSC number +85290000000
is encoded in "07915892000000F0".
25.10.2.2. Case 2:
SMSC Part is "00"
If
the SMSC part is "00", no SMSC number is encoded in the
SMSC part. The AT command +CMGW will
retrieve the SMSC number specified by the AT command +CSCA, generate
an SMSC part from the SMSC number, and replace the old SMSC part "00"
with the newly generated SMSC part. In other words, the SMSC number
specified by the AT command +CSCA will be saved with the SMS message.
This SMSC number will be used by the AT command +CMSS for sending the
SMS message out.
To
understand better, let's consider the following example. Suppose we
use the AT command +CSCA to change the SMSC number to +85290000000,
like this:
AT+CSCA="+85290000000"
Then
we use the AT command +CMGW to write the text message "It is
easy to send text messages." to the message storage area. In SMS
PDU mode, the command line should be something like this: (The SMSC
part is displayed in bold type.)
AT+CMGW=42<CR>0001000B915892214365F7000021493A283D0795C3F33C88FE06CDCB6E32885EC6D341EDF27C1E3E97E72E<Ctrl+z>
After
that, we use the AT command +CMGR
(command line in text: Read Message) to read the SMS text message.
The information response returned is shown below. (The SMSC part is
displayed in bold type.)
+CMGR:
2,,42 07915892000000F001000B915892214365F7000021493A283D0795C3F33C88FE06CDCB6E32885EC6D341EDF27C1E3E97E72E
As
you can see, the hexadecimal value
returned is different from what we assigned to the AT command +CMGW.
The old SMSC part "00" was replaced by the new SMSC
part "07915892000000F0", which specifies the SMSC number
+85290000000.
More
Details
More
details about the SMSC_number_and_TPDU
parameter of the AT command +CMGW can be found from the section
"Syntax
of the +CMGW AT Command in SMS PDU Mode"
of this SMS tutorial.
Note
Mobile
devices such as Nokia 6021 and Philips 598 work in the way described
above. However, it is possible that the command behavior on your
mobile device is slightly different from what was described. So,
you may want to do something similar to the above example to find out
the exact command behavior on your mobile device.
One
mobile phone that has a different command behavior is Sony Ericsson
T68i. The difference is the time at which the old SMSC part "00"
is replaced by the newly generated SMSC part. On Sony Ericsson T68i,
the replacement is done when the +CMSS AT command is executed.
To understand better, let's consider
the following example. Suppose we use the AT command +CSCA to change
the SMSC number to +85290000000, like this:
AT+CSCA="+85290000000"
Then
we use the AT command +CMGW to write the text message "It is
easy to send text messages." to the message storage area. In SMS
PDU mode, the command line should be something like this: (The SMSC
part is displayed in bold type.)
AT+CMGW=42<CR>0001000B915892214365F7000021493A283D0795C3F33C88FE06CDCB6E32885EC6D341EDF27C1E3E97E72E<Ctrl+z>
After
that, we use the AT command +CMGR to read the SMS text message. The
information response returned is shown below. (The SMSC part is
displayed in bold type.)
+CMGR:
2,,42 0001440B915892214365F7000021493A283D0795C3F33C88FE06CDCB6E32885EC6D341EDF27C1E3E97E72E
As
you can see, the SMSC part is the same as the one we assigned to the
+CMGW AT command.
Now
use the +CMSS AT command to send the text message out. Then use the
AT command +CMGR to read the SMS text message again. This time you
should find that the SMSC part was changed to "07915892000000F0",
which specifies the SMSC number +85290000000.
+CMGR:
2,,42 07915892000000F001440B915892214365F7000021493A283D0795C3F33C88FE06CDCB6E32885EC6D341EDF27C1E3E97E72E
Feedback Form (ExpandCollapse)
|
|