19.1. Using the AT Command +CSMS to Check if Mobile-originated SMS Messages and Mobile-terminated SMS Messages are Supported

Preferences - Do not show ads

One use of the AT command +CSMS (command name in text: Select Message Service) is to check the message types supported by the GSM/GPRS modem or mobile phone. There are three message types: mobile-originated SMS messages, mobile-terminated SMS messages and cell broadcast messages.

Mobile-originated SMS messages refer to SMS messages that are sent from a mobile device to an SMSC, i.e. outbound SMS messages.

Mobile-terminated SMS messages refer to SMS messages that are sent from an SMSC to a mobile device, i.e. inbound SMS messages.

Cell broadcast messages are text messages pushed to subscribers located in a certain mobile network area by the network operator. These text messages may contain news, weather information, etc.

Here is an example that demonstrates how to use the +CSMS AT command to check if mobile-originated and mobile-terminated SMS messages are supported. First, send the read command "+CSMS?" to the GSM/GPRS modem or mobile phone. The response returned from our Nokia 6021 to HyperTerminal is shown below:


AT+CSMS?
+CSMS: 0,1,1,1

OK


As you can see, the information response contains four values. The second, third and fourth values indicate whether Nokia 6021 supports mobile-terminated SMS messages, mobile-originated SMS messages and cell broadcast messages respectively. If the value is 1, it means the message type is supported. If the value is 0, it means the message type is not supported.

For Nokia 6021:

  • The third value in the information response is 1, which indicates Nokia 6021 supports mobile-originated SMS messages. So, Nokia 6021 is capable of sending SMS messages to an SMSC.

  • The second value in the information response is 1, which indicates Nokia 6021 supports mobile-terminated SMS messages. So, Nokia 6021 is capable of receiving SMS messages from an SMSC.

If the final result code "ERROR" is returned (as shown below), it is likely that the +CSMS AT command is not supported by the mobile device.


AT+CSMS?
ERROR


To confirm, send the test command "+CSMS=?" to the GSM/GPRS modem or mobile phone. If the final result code "ERROR" is returned (as shown below), it means the mobile device does not support the +CSMS AT command.


AT+CSMS=?
ERROR


Note that +CSMS is a mandatory command in the AT command set for SMS messaging. If it is not supported, normally the whole AT command set for SMS messaging is not supported.

Preferences - Do not show ads


Previous Page Page 31 of 65 Next Page

Contents at a Glance
Print this Web Page | | Back to Top

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