This is an excerpt from the Siemens at command set:
At + CPMS preferred SMS message storage
Revision according to GSM 07.05 version 4.7.0
Test command
At + CPMS =?
Response
+ CPMS: (list of supported <mem1> S), (list of supported <MEM2> S), (list
+
Supported <mem3> S)
Parameter
<Mem1>
Memory from which messages are read and deleted
Sm sim message storage
Me Mobile Equipment message storage
Mt combination of "me" and "SM" storages
<MEM2> messages will be written and sent to this memory storage:
Sm sim message storage
Me Mobile Equipment message storage
Mt combination of "me" and "SM" storages
<Mem3> memory in which received messages are preferred to be stored, if
Routing to te is not set (see at + cnmi command with Parameter
<Mt> = 2)
Sm sim message storage
Me Mobile Equipment message storage
Mt combination of "me" and "SM" storages
READ command
At + CPMS?
Response
+ CPMS:
<Mem1>, <used1>, <total1>, <MEM2>, <used2>, <total2>, <mem3>, <used3>, <total3
>
Parameter
<Memx>
Memory from which messages are read and deleted
<Usedx> Number of messages currently in <memx>
<Totalx> total number of messages that can be stored in <memx>
Write command
At + CPMS = <mem1> [, <MEM2> [, <mem3>]
Parameter
<Mem1>
See test command
<MEM2> see test command
<Mem3> see test command
+ CPMS: <used1>, <total1>, <used2>, <total2>, <used3>, <total3>
OK/error/+ CMS Error
Notes 1) the Mobil Equipment storage "me" has capacity for 25 Short Messages
2) the storage "MT" is a combination of "me" and "SM" storage. If "MT" is
Chosen indices <26 refer to me "storage while indices 26 or higher are
Associated with the "SM" Storage
3) Incoming short messages with message Class 2 (see GSM 03.38) will be
Stored in the "SM" storage only. Therefore, the at ^ smgo: 2 indication (see
At ^ smgo command) can occur without a preceding at ^ smgo: 1 indication.
Concepts:
Mem1: memory space for reading and deleting text messages.
MEM2: memory space for writing and sending SMS messages.
Mem3: storage location of received SMS messages.
Usage:
1. Statement:
At + CPMS =?
Purpose:
Test command. Used to obtain a list of storage locations supported by the mobile phone. On my Siemens M55 mobile phone:
At + CPMS =?
+ CPMS: ("MT", "SM", "me"), ("MT", "SM", "me"), ("MT", "SM ", "Me ")
Indicates that the mobile phone supports MT (mobile phone terminal), Sm (SIM card), and me (mobile phone device)
2. Statement:
At + CPMS = "MT", "me", "SIM"
Set mem1 to Mt, MEM2 to me, And mem3 to Sim
3. Statement:
At + CPMS?
Purpose:
Get the current settings.
For example, after setting the second statement, return:
At + CPMS?
+ CPMS: "MT", 7,150, "me", 7,100, "SM ",
It indicates that there are 7 messages in the MT, and 150 messages can be stored in total. There are 7 in me, and 150 in total can be stored. 50 SIM cards can be stored.