GSM Modules
28
4.8 +CMGD: delete messages
Description
This command is used to delete a message from selected memory.
Format
AT+CMGD=<Index>
AT+CMGF=1
AT+CMGL="all"
+CMGL:1,"REC
READ","130********","",
abcdefg
+CMGL:2,"REC
READ","131********","",
abcdef
+CMGL:3,"STO
SENT","1331********",""
opqrxt
OK
AT+CMGD=2
OK
Set as text mode
List all messages
Delete the second message
Example
AT+CMGF=0
AT+CMGL=4
+CMGL: 1,3,,21
0891683108705505F0010F0B813
120882624F700
0808738B54084F1F5927
+CMGL: 2,3,,21
0891683108705505F001100B813
120882624F700
0808738B54084F1F5927
+CMGL: 3,3,,21
0891683108705505F001110B8131
20882624F700
0808738B54084F1F5927
OK
AT+CMGD=1
OK
Set as PDU mode
List all messages
Delete the first message
Parameters
<Index>: index of saved message