Welcome to Developer's Home Saturday, April 19, 2014
Home - DevelopersHome.com

21. Setting or Reading the Service Center Address / SMSC Address (AT+CSCA)


Preferences - Do not show ads

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.


Note

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.)


+CSCA=address[,address_type]


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:


+CSCA: address,address_type


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:


AT+CSCA?
+CSCA: "+85291111111",145

OK


If you find that the service center address is not correct, use the +CSCA AT command to change it, like this:


AT+CSCA="+85290000000",145
OK


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.

Preferences - Do not show ads


Page 35 of 65 Previous Page | Next Page
Contents at a Glance
Print this Web Page | | Back to Top
Custom Search

Feedback Form (Expand)

What do you think about this web page?






SMS Tutorial Table of Contents SMS Tutorial Contents at a Glance Preferences - Change Color Scheme Preferences - Do Not Show Ads Previous Page Next Page

International SMS Gateway Service


SMS