22.5. Finding the Message Storage Areas Currently Used, Number of Messages Currently Stored and Maximum Number of Messages Allowed

To find out the message storage areas currently used, the number of messages currently stored in a certain message storage area, and the maximum number of messages that are allowed to be stored in a certain message storage area, you can perform a read operation with the +CPMS AT command using the command line below:


AT+CPMS?


If the GSM/GPRS modem or mobile phone executes the above command line successfully, it will return an information response to the computer / PC. The +CPMS information response has the following format:


+CPMS: message_storage1,used_space1,max_space1,message_storage2,used_space2,max_space2,message_storage3,used_space3,max_space3


The message_storage1 Field

The first field of the information response of the +CPMS AT command, message_storage1, contains a string that indicates the message storage area to be used when reading or deleting SMS messages. (For details about reading SMS messages, see AT commands +CMGR and +CMGL. For details about deleting SMS messages, see the AT command +CMGD.)


The used_space1 Field

The second field of the information response of the +CPMS AT command, used_space1, contains an integer that indicates the number of messages currently stored in the message storage area message_storage1.


The max_space1 Field

The third field of the information response of the +CPMS AT command, max_space1, contains an integer that indicates the maximum number of messages that can be stored in the message storage area message_storage1.


The message_storage2 Field

The fourth field of the information response of the +CPMS AT command, message_storage2, contains a string that indicates the message storage area to be used when sending SMS messages from message storage or writing SMS messages. (For details about sending SMS messages from message storage, see the AT command +CMSS. For details about writing SMS messages, see the AT command +CMGW.)


The used_space2 Field

The fifth field of the information response of the +CPMS AT command, used_space2, contains an integer that indicates the number of messages currently stored in the message storage area message_storage2.


The max_space2 Field

The sixth field of the information response of the +CPMS AT command, max_space2, contains an integer that indicates the maximum number of messages that can be stored in the message storage area message_storage2.


The message_storage3 Field

The seventh field of the information response of the +CPMS AT command, message_storage3, contains a string that indicates the preferred message storage area to be used for storing newly received SMS messages.


The used_space3 Field

The eighth field of the information response of the +CPMS AT command, used_space3, contains an integer that indicates the number of messages currently stored in the message storage area message_storage3.


The max_space3 Field

The ninth field of the information response of the +CPMS AT command, max_space3, contains an integer that indicates the maximum number of messages that can be stored in the message storage area message_storage3.


22.5.1. Example

The example below shows the response returned by my Nokia 6021 mobile phone to Windows' HyperTerminal program after the read command "+CPMS?" has been executed:


AT+CPMS?
+CPMS: "ME",2,150,"SM",2,10,"MT",4,160

OK


As you can see, there are nine values in the information response of the +CPMS AT command. Following is a description of them.


The First, Second and Third Fields: "ME",2,150

The string value "ME" indicates that the phone message storage area will be used for SMS reading and deleting. The value 2 indicates that there are currently two messages stored in the phone message storage area. 150 is the maximum number of messages that can be stored in the phone message storage area.


The Fourth, Fifth and Sixth Fields: "SM",2,10

The string value "SM" indicates the SIM message storage area will be used for SMS writing and sending. The value 2 tells us that there are currently two messages stored in the SIM message storage area. 10 is the maximum number of messages that can be stored in the SIM message storage area.


The Seventh, Eighth and Ninth Fields: "MT",4,160

The string value "MT" indicates that both the phone message storage area and SIM message storage area will be used for storing inbound SMS messages. The value 4 tells us that there are currently four messages stored in the phone message storage area and SIM message storage area. 160 is the maximum number of messages that can be stored in the phone message storage area and SIM message storage area.


Previous Page Page 38 of 65 Next Page

Contents at a Glance (Click Here for Full Table of Contents)

Feedback Form (ExpandCollapse)

What do you think about this web page?






(Optional) Please provide us more details. For example, suppose you select option 2 above, can you tell us specifically what information is missing? You can also suggest anything that can help us improve this web page.

(Optional) Your name:

(Optional) Your email address:

Please enter again to confirm:

Due to the amount of messages we received, we may not be able to reply to all messages.

A button for going back to the top of this page