21. Setting or Reading the Service Center Address / SMSC Address (AT+CSCA)
Before you send SMS messages, one important thing that should be done is to make sure the correct service center address (SMSC address) has been set properly. Typically a service center address/SMSC address is a phone number formatted using the ISDN / telephony numbering plan (ITU E.164/E.163). For example, +85291234567. The AT command +CSCA (command name in text: Service Centre Address) can be used to set or read the service center address through which SMS messages are sent. The setting will be used by the AT commands +CMGW (command name in text: Write Message to Memory) and +CMGS (command name in text: Send Message).
In SMS text mode, the only way to specify the service center address to be used by +CMGW and +CMGS is through +CSCA. However, in SMS PDU mode, it is possible to specify the service center address to the AT commands +CMGW and +CMGS directly as a parameter value.
The mobile network operator usually pre-sets the correct service center number in the default profile of settings stored in the SIM card. Most mobile phones provide some ways for the user to view or change the service center number saved in the profiles of settings. For example, on my Nokia 6021 mobile phone, the message center number saved in the default profile of settings can be viewed and changed by going to Menu -> Messages -> Message settings -> Text messages -> Sending profile -> Default profile -> Message centre number.
Some GSM/GPRS modems and mobile phones (for example, Nokia 6021, Sony Ericsson T68i, Philips 598, etc) use the service center number in the default profile of settings as the default value of the +CSCA AT command. As a result, if the service center number in the default profile of settings is correct, you do not need to use the +CSCA AT command to set the service center number.
To some mobile devices such as Nokia 6021, the +CSCA AT command does not save the service center number in non-volatile memory. Hence, if you switch off the GSM/GPRS modem or mobile phone, the setting will be gone. To save the service center number set with the AT command +CSCA, you have to make use of the AT command +CSAS (command name in text: Save Settings). To restore the saved service center number, the AT command +CRES (command name in text: Restore Settings) is required.
The command behavior is different on some mobile devices such as Sony Ericsson T68i and Philips 598. Every time the AT command +CSCA is used to change the SMSC address, the new SMSC address is saved to non-volatile memory.
21.1. Syntax of the +CSCA AT Command
21.1.1. Setting the Service Center Address
To set the service center address, perform a set operation with the +CSCA AT command using the following syntax: (Optional parameters are enclosed in square brackets.)
The address Parameter
The first parameter of the +CSCA AT command, address, specifies the SMSC address to be set. Usually it is a phone number formatted using the typical ISDN / telephony numbering plan (ITU E.164/E.163). For example, "+85291234567". Note that the value assigned to the address parameter should be a string, which means you should use double quotes to enclose the phone number.
The address_type Parameter
The second parameter of the +CSCA AT command, address_type, specifies the type of the SMSC address assigned to the address parameter. Two values, 129 and 145, are commonly used.
129. Meaning: The SMSC address is formatted using the typical ISDN / telephony numbering plan (ITU E.164/E.163) but it is not sure whether the SMSC address is an international number, a national number or a number of other types. Example addresses: "85291234567" and "91234567".
145. Meaning: The SMSC 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 SMSC address does not start with a "+" character. For example, "85291234567".
145 if the SMSC address starts with a "+" character. For example, "+85291234567".
21.1.2. Reading the Service Center Address
To read the service center address, you can perform a read operation using the +CSCA read command "+CSCA?". The information response returned has the following format:
The definition of address and address_type is the same as above.
21.2. Example Demonstrating How to Use the +CSCA AT Command to Set and Read the Service Center Address
Now let's see an example that demonstrates how to use the +CSCA AT command to set and read the service center address. As said earlier, sometimes a proper service center address is in use by default and there is no need to make any changes. So first let's type the read command "+CSCA?" in a terminal program (for example, HyperTerminal in Microsoft Windows) to check if a proper service center address is in use currently. The response returned from a GSM/GPRS modem or mobile phone should be something like this:
If you find that the service center address is not correct, use the +CSCA AT command to change it, like this:
The final result code OK indicates the service center address was set successfully. If the execution of the command line fails, the final result code will be ERROR.
|Previous Page||Page 35 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)