22.Select Message Service
send: AT+CSMS=<service>
receive: +CSMS: <MO>,<MT>,<CB>
OK
remark: <MO>0:Not support <MT>0:Not support <CB>0:Not support
1:support 1:support 1:support
23.Preferred Message storage
send: AT+CPMS=<mem1>,[<mem2>]
receive: +CPMS:<used1>,<total1>,<used2>,<total2>
remark: this command allows the message storage area to be selected.
<mem1>"SM","BM","SR",<mem2>"SM"
sample: at+cpms?
+CPMS: "SM",13,15,"SM",13,15
OK
24.Preferred Message Format
send: AT+CMGF=<mode>
receive: OK
remark: the formats implemented are text mode and PDU mode
<mode>0:text mode
1:PDU mode
25.Read Message
send: AT+CGMR=<index>
receive: +CMGR:<stat>,<oa>,[<alpha>],<scts>,
[<tooa>,<fo>,<pid>,<dcs>,<sca>,<tosca>,<length>]
<stat>"REC UNREAD" or "REC READ" or "STO UNSENT" or "STO SENT"
sample: AT+CMGR=1
+CMGR: "REC READ","1630",,"03/11/28,10:51:43+32"
abcdefg
OK
26.List Message
send: AT+CMGL=<stat>
receive: +CMGL:<index>,stat>,<oa>,[<alpha>],<scts>
OK
remark: this command allows application to read message.
<stat>"REC UNREAD" or "REC READ" or "STO UNSENT" or "STO SENT" or "ALL"
sample: AT+CMGL="ALL"
+CMGL: 13,"REC READ","1630",,"03/11/28,14:05:38+32"
abcdefg
OK
27.Send Message
send: AT+CMGS=<da>,[<total>] //text is entered
AT+CMGS=<length> //PDU is entered
receive: +CMGS:<n>
OK
remark: n is the serial number.
Ctrl-Z and ESC charater
sample:
AT+CMGF=1
OK
at+cmgs="13810234473"
at+cmgs="13810234473"
123456789
+CMGS:2
OK
for more information about PDU mode please see chapter 9.12 page 107
28.Write Message to Memory
send: AT+CMGW=<oa/da>,[<tooa/toda>,[<stat>]] //text is entered
AT+CMGW=<length>,[<stat>]
receive: +CMGW:<index>
OK
remark: This Command stores a message in memory.(no choice possible as
with phonebooks +CPBW)
sample: AT+CMGF=1
OK
at+cmgw="13810234473"
> how are you
+CMGW: 14
OK
at+cmgr=14
at+cmgr=14
+CMGR: "STO UNSENT","13810234473",
how are you
OK
29.Send Message From storage
send: AT+CMSS=<index>,[<da>,<toda>]
receive: +CMGS:<mr>
remark: This command sends a message stored at location value<index>
<da>may be a different destination
sample: at+cmss=5,13810234473
at+cmss=5,13810234473
+CMSS: 36
OK
30.Delete Message From storage
send: AT+CMGD=<index>,[<DelFlag>]
receive: OK
remark: this command is used to delete one or several message from
preferred message storage
<DelFlag>0:Delete message at location<index>
1:Delete all READ messages
2:Delete all READ and SENT messages
3:Delete all READ,SENT and UNSEND messages
4:Delete all messages
31.Service Center Address
send: AT+CSCA=<SC>
receive: OK
remark: this command shall be used to indicate to which service center the
message has to be sent.
<SC>service center number
sample: at+csca="+8613800100500"
at+csca="+8613800100500"
OK