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
Previous Page | Page 52 of 65 | Next Page |
- 1. Introduction to SMS Messaging
- 2. What Makes SMS Messaging So Successful Worldwide?
- 3. Example Applications of SMS Messaging
- 4. What is an SMS Center / SMSC?
- 5. Basic Concepts of SMS Technology
- 6. Intra-operator SMS Messages
- 7. Inter-operator SMS Messages
- 8. International SMS Messages
- 9. What is an SMS Gateway?
- 10. How to Send SMS Messages from a Computer / PC?
- 11. How to Receive SMS Messages Using a Computer / PC?
- 12. Introduction to GSM / GPRS Wireless Modems
- 13. How to Use Microsoft HyperTerminal to Send AT Commands to a Mobile Phone or GSM/GPRS Modem?
- 14. Introduction to AT Commands
- 15. General Syntax of Extended AT Commands
- 16. Result Codes of AT Commands
- 17. AT Command Operations: Test, Set, Read and Execution
- 18. Testing the Communication between the PC and GSM/GPRS Modem or Mobile Phone
- 19. Checking if the GSM/GPRS Modem or Mobile Phone Supports the Use of AT Commands to Send, Receive and Read SMS Messages
- 20. Operating Mode: SMS Text Mode and SMS PDU Mode
- 21. Setting or Reading the Service Center Address / SMSC Address (AT+CSCA)
- 22. Preferred Message Storage (AT+CPMS)
- 23. Writing SMS Messages to Memory / Message Storage (AT+CMGW)
- 24. Deleting SMS Messages from Message Storage (AT+CMGD)
- 25. Sending SMS Messages from a Computer / PC Using AT Commands (AT+CMGS, AT+CMSS)
- 26. Reading SMS Messages from a Message Storage Area Using AT Commands (AT+CMGR, AT+CMGL)
- 27. Appendix A: How to Choose an SMS Service Provider (SMS Gateway Provider, SMS Reseller, SMS Broker)?
- 28. Appendix B: Comparison Table of SMS Service Providers (SMS Gateway Providers, SMS Resellers, SMS Brokers)
- 29. Appendix C: Free Software/Tools and Libraries for Sending and Receiving SMS Messages with a Computer / PC
- 30. Appendix D: GSM 7-bit Default Alphabet Table (with Character Codes of ISO 8859 Latin 1)