> 2.11.1 | SMS initialization

> This section comprises the subsections Description, Used AT Commands, Flow Chart, Hints and Example. To move to these subsections please use the Navigation Frame or the appropriate buttons on the toolbar.

> 2.11.1.1 | Description

> This chapter summarizes all the AT commands suggested to set up the ME for using SMS.

> • | Siemens GSM modules support two character sets: the GSM default alphabet defined in GSM 03.38 (7 bit) and the UCS2 character set. UCS2 is a 16-bit universal multiple-octet coded character set, defined in ISO/IEC10646. To choose one of them use the command AT+CSCS.

> • | To set the SMS message format use AT+CMGF. Choose AT+CMGF=1 for text mode, or AT+CMGF=0 for PDU mode.

> • | If text mode is activated, you can enable the presentation of text mode parameters in the result codes of SMS reading and listing commands by using “AT+CSDH”.

> • | To change the text mode parameters use AT+CSMP. You can set the following SMS parameters: first octet, service center time stamp, validity period and the protocol identifier.

> • | Basically, the service center address supplied by the service provider must be specified. In text mode (AT+CMGF=1), this is done by using the AT+CSCA command. If you use PDU mode it is possible to code the service center address in your PDU. Therefore, in PDU mode, setting the service center address with AT+CSCA is optional.

> • | If you want to use SMS features specified in GSM 07.05 Phase 2+, you need to enable Phase 2+ functionality with “AT+CSMS”.

> • | To be notified by a URC, when the module receives a short message, a cell broadcast message or status report use AT+CNMI to enable the presentation of URCs.

> • | To be notified by a URC, when the SMS storage is full, use AT^SMGO to enable the presentation of URCs.

> • | Use AT+CPMS to select the preferred storage for short messages. If the preferred storage is “MT” you can determine the storage sequence with “AT^SSMSS”. This gives you the choice of using first either the SIM or the ME storage.

> • | With AT+CGSMS you can select preferences for transmitting MO short messages over GPRS or circuit switched services.

> • | AT^SSCONF allows you to enable or disable the presentation of the parameters <ra> and <tora> fpr status reports in the result codes of SMS reading and listing commands.

> • | If you want to receive cell broadcast messages activate the URC presentation for CBS with AT+CNMI and subscribe to a CBS channel with AT+CSCB.

> • | The AT^SM20 command specifies different modes of responses returned when sending and writing short messages: AT^SM20=,0 causes the ME return "+CMS ERROR: <err>" when writing or sending of short messages fails. AT^SM20=,1 (factory default) causes the ME to return “OK” no matter whether or not the SMS command was succesfully executed.

> Some of the above settings can be stored to the user profile. See [2] for a list of settings storable with AT&W.

> 2.11.1.2 | Used AT commands

> Command | Explanation
> AT+CSCS | Set TE character set
> AT+CSCA | SMS service center address
> AT+CSMS | Select Message Service
> AT+CNMI | New SMS message indications
> AT^SMGO | Set or query SMS overflow presentation mode or query SMS overflow
> AT^SM20 | Set M20 Compatibility
> AT+CPMS | Preferred SMS message storage
> AT^SSMSS | Set Short Message Storage Sequence
> AT+CGSMS | Select service for MO SMS messages
> AT^SSCONF | SMS Configuration
> AT+CMGF | Select SMS message format
> AT+CSDH | Show SMS text mode parameters
> AT+CSMP | Set SMS text mode parameters
> AT&W | Store current configuration to user defined profile

> For further details about the commands see [2].

> 2.11.1.3 | Flow chart

> Figure 71: SMS initialization - part 1
> Figure 72: SMS initialization - part 2
> Figure 73: SMS initialization - part 3
> Figure 74: SMS initialization - part 4
> Figure 75: SMS initialization (cell broadcast)
> Figure 76: SMS initialization (status report)

> 2.11.1.4 | Hints

> GCF-CC note: The GSM character set must be supported. For further details see [2]
> GCF-CC note: GCF test cases verify the initialization of Cell Broadcast settings. Therefore, we recommend that the necessary settings be included in your application.
> Some applications store all short messages to a local memory since it offers more space. Please consider that some GCF test cases verify if short messages are properly stored on the SIM or on the ME RAM.

> 2.11.1.5 | Example

> ***************************************
> Comment: SMS initialization
> ***************************************
> ***************************************
> Comment: Request TE character set.
> ***************************************
> Subscr 1 Send: AT+CSCS?
> Subscr 1 Receive: AT+CSCS?
> Subscr 1 Receive: +CSCS: "UCS2"
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Set TE character set to GSM.
> ***************************************
> Subscr 1 Send: AT+CSCS="GSM"
> Subscr 1 Receive: AT+CSCS="GSM"
> Subscr 1 Receive: OK
> ***************************************
> Comment: Request service center address.
> ***************************************
> Subscr 1 Send: AT+CSCA?
> Subscr 1 Receive: AT+CSCA?
> Subscr 1 Receive: +CSCA: "",129
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Set service center address. Example: address of O2 Germany.
> ***************************************
> Subscr 1 Send: AT+CSCA=+491760000443
> Subscr 1 Receive: AT+CSCA=+491760000443
> Subscr 1 Receive: OK
> ***************************************
> Comment: Request message service.
> ***************************************
> Subscr 1 Send: AT+CSMS?
> Subscr 1 Receive: AT+CSMS?
> Subscr 1 Receive: +CSMS: 0,1,1,1
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Set message service to phase 2+.
> ***************************************
> Subscr 1 Send: AT+CSMS=1
> Subscr 1 Receive: AT+CSMS=1
> Subscr 1 Receive: +CSMS: 1,1,1
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Request SMS message indication.
> ***************************************
> Subscr 1 Send: AT+CNMI?
> Subscr 1 Receive: AT+CNMI?
> Subscr 1 Receive: +CNMI: 0,0,0,0,1
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Set SMS message indication.
> ***************************************
> Subscr 1 Send: AT+CNMI=2,1,0,0,1
> Subscr 1 Receive: AT+CNMI=2,1,0,0,1
> Subscr 1 Receive: OK
> ***************************************
> Comment: Request SMS overflow presentation.
> ***************************************
> Subscr 1 Send: AT^SMGO?
> Subscr 1 Receive: AT^SMGO?
> Subscr 1 Receive: ^SMGO: 0,0
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Enable SMS overflow presentation.
> ***************************************
> Subscr 1 Send: AT^SMGO=1
> Subscr 1 Receive: AT^SMGO=1
> Subscr 1 Receive: OK
> ***************************************
> Comment: Request preferred SMS storage.
> ***************************************
> Subscr 1 Send: AT+CPMS?
> Subscr 1 Receive: AT+CPMS?
> Subscr 1 Receive: +CPMS: "SM",12,30,"ME",1,25,"MT",13,55
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Set preferred SMS storage to MT,MT,MT.
> ***************************************
> Subscr 1 Send: AT+CPMS="MT","MT","MT"
> Subscr 1 Receive: AT+CPMS="MT","MT","MT"
> Subscr 1 Receive: +CPMS: 13,55,13,55,13,55
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Request SMS storage sequence.
> ***************************************
> Subscr 1 Send: AT^SSMSS?
> Subscr 1 Receive: AT^SSMSS?
> Subscr 1 Receive: ^SSMSS: 0
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Set SMS storage sequence to SM then ME.
> ***************************************
> Subscr 1 Send: AT^SSMSS=1
> Subscr 1 Receive: AT^SSMSS=1
> Subscr 1 Receive: OK
> ***************************************
> Comment: Request selected service for MO SMS.
> ***************************************
> Subscr 1 Send: AT+CGSMS?
> Subscr 1 Receive: AT+CGSMS?
> Subscr 1 Receive: +CGSMS: 3
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Set service for MO SMS to GPRS preferred.
> ***************************************
> Subscr 1 Send: AT+CGSMS=2
> Subscr 1 Receive: AT+CGSMS=2
> Subscr 1 Receive: OK
> ***************************************
> Comment: Request M20 compatibility settings.
> ***************************************
> Subscr 1 Send: AT^SM20?
> Subscr 1 Receive: AT^SM20?
> Subscr 1 Receive: ^SM20: 1,1
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Set Siemens mobile phones compatibility.
> ***************************************
> Subscr 1 Send: AT^SM20=1,0
> Subscr 1 Receive: AT^SM20=1,0
> Subscr 1 Receive: OK
> ***************************************
> Comment: Request SMS message format.
> ***************************************
> Subscr 1 Send: AT+CMGF?
> Subscr 1 Receive: AT+CMGF?
> Subscr 1 Receive: +CMGF: 1
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Set SMS message format to PDU mode.
> ***************************************
> Subscr 1 Send: AT+CMGF=0
> Subscr 1 Receive: AT+CMGF=0
> Subscr 1 Receive: OK
> ***************************************
> Comment: Store some settings to user profile.
> ***************************************
> Subscr 1 Send: AT&W
> Subscr 1 Receive: AT&W
> Subscr 1 Receive: OK