> 2.11.6 | Receiving SMS

> 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.6.1 | Description

> This chapter takes you through all the steps involved in receiving short messages. To be notified of received short messages switch on the URC presentation with AT+CNMI (see Section 2.11.1 “SMS initialization”).
> Two kinds of URCs are available to indicate a new SMS. Which one is used depends on the settings made with AT+CNMI.

> • | If URC “+CMTI: …” is presented, the information contains the storage type and the index where the received message was stored. You can then proceed to read the message from the indicated index, using one of the SMS reading commands.

> • | If URC “+CMT: … “ is presented you have to acknowledge the reception of the short message by using AT+CNMA.

> If SMS overflow presentation is enabled with AT^SMGO (see Section 2.11.1 “SMS initialization”), the URC “^SMGO: 1” or “^SMGO: 2” will be presented, when the SMS storage is full. This notification is to inform you that you need to clear the SMS storage before you can receive the next short message.

> 2.11.6.2 | Used AT commands

> Command | Explanation
> AT+CMGR | Read SMS message
> AT+CNMA | New SMS message acknowledge to ME/TE, only phase 2+

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

> 2.11.6.3 | Flow Chart

> Figure 83: Receiving SMS

> 2.11.6.4 | Hints

> Not applicable.

> 2.11.6.5 | Example

> ***************************************
> Comment: Receiving SMS
> ***************************************
> ***************************************
> Comment: Request SMS storage capacity (subscriber 1)
> ***************************************
> Subscr 1 Send: AT+CPMS?
> Subscr 1 Receive: AT+CPMS?
> Subscr 1 Receive: +CPMS: "SM",27,30,"SM",27,30,"SM",27,30
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Set URC presentation mode (indication of memory location)
> ***************************************
> Subscr 1 Send: AT+CNMI=2,1
> Subscr 1 Receive: AT+CNMI=2,1
> Subscr 1 Receive: OK
> ***************************************
> Comment: Subscriber 2 send a new SMS to subscriber 1
> ***************************************
> Subscr 2 Send: AT+CMGS=+491797782631
> Subscr 2 Receive: AT+CMGS=+491797782631
> Subscr 2 Receive: >
> Subscr 2 Send: new SMS to subscriber 1
> Subscr 2 Receive: new SMS to subscriber 1
> Subscr 2 Receive:
> Subscr 2 Receive: +CMGS: 218
> Subscr 2 Receive:
> Subscr 2 Receive: OK
> Subscr 1 Receive:
> Subscr 1 Receive: +CMTI: "SM",28
> ***************************************
> Comment: Read new received SMS
> ***************************************
> Subscr 1 Send: AT+CMGR=28
> Subscr 1 Receive: AT+CMGR=28
> Subscr 1 Receive: +CMGR: "REC UNREAD","+491795289609",,"03/08/14,14:44:38+08"
> Subscr 1 Receive: new SMS to subscriber 1
> Subscr 1 Receive:
> Subscr 1 Receive: OK
> ***************************************
> Comment: Set URC presentation mode (SMS is routed directly to TE) is depending on message class
> ***************************************
> Subscr 1 Send: AT+CNMI=2,2
> Subscr 1 Receive: AT+CNMI=2,2
> Subscr 1 Receive: OK
> ***************************************
> Comment: Subscriber 2 send a new SMS to subscriber 1
> ***************************************
> Subscr 2 Send: AT+CMGS=+491797782631
> Subscr 2 Receive: AT+CMGS=+491797782631
> Subscr 2 Receive: >
> Subscr 2 Send: second SMS to subscriber 1
> Subscr 2 Receive: second SMS to subscriber 1
> Subscr 2 Receive:
> Subscr 2 Receive: +CMGS: 219
> Subscr 2 Receive:
> Subscr 2 Receive: OK
> Subscr 1 Receive:
> Subscr 1 Receive: +CMT: "+491795289609",,"03/08/14,14:44:49+08"
> Subscr 1 Receive: second SMS to subscriber 1
> ***************************************
> Comment: Acknowledge received SMS
> ***************************************
> Subscr 1 Send: AT+CNMA
> Subscr 1 Receive: AT+CNMA
> Subscr 1 Receive: OK
> ***************************************
> Comment: Set URC presentation mode (indication of memory location)
> ***************************************
> Subscr 1 Send: AT+CNMI=2,1
> Subscr 1 Receive: AT+CNMI=2,1
> Subscr 1 Receive: OK
> ***************************************
> Comment: Subscriber 2 send two more messages to provoke storage overflow presentation
> ***************************************
> Subscr 2 Send: AT+CMGS=+491797782631
> Subscr 2 Receive: AT+CMGS=+491797782631
> Subscr 2 Receive: >
> Subscr 2 Send: third SMS to subscriber 1
> Subscr 2 Receive: third SMS to subscriber 1
> Subscr 1 Receive:
> Subscr 1 Receive: +CMTI: "SM",29
> Subscr 2 Send: AT+CMGS=+491797782631
> Subscr 2 Receive:
> Subscr 2 Receive: OK
> Subscr 2 Send: fourth SMS to subscriber 1
> Subscr 1 Receive:
> Subscr 1 Receive: +CMTI: "SM",30
> Subscr 1 Receive:
> Subscr 1 Receive: ^SMGO: 1
> Subscr 1 Receive:
> Subscr 1 Receive: ^SMGO: 2
> ***************************************
> Comment: Delete SMS at index 30 to receive the waiting one
> ***************************************
> Subscr 1 Send: AT+CMGD=30
> Subscr 1 Receive: AT+CMGD=30
> Subscr 1 Receive: OK
> Subscr 1 Receive:
> Subscr 1 Receive: ^SMGO: 0
> Subscr 1 Receive:
> Subscr 1 Receive: +CMTI: "SM",30
> Subscr 1 Receive:
> Subscr 1 Receive: ^SMGO: 1