Sending messages (using at+cmgs), Deleting messages (using at+cmgd) – PIONEERPOS AT Commands G24-LC User Manual

Page 381

Advertising
background image

Chapter 4: Using the Commands

April 15, 2008

G24-L AT Commands Reference Manual

4-13

Sending Messages (Using AT+CMGS)

Sends an SM from the G24-L to the network in TEXT mode, the header parameters will be set
according to CSMP settings. In text mode (+CMGF=1):

AT+CMGS="054565028" //Writing a message to be sent to specified destination address

>This is the message body <CTRL+Z> //<CTRL+Z> ends the prompt text mode and returns to

regular AT command mode

+CMGS: 238

//Message successfully sent. Returns the Message Reference

OK

AT+CMGS="+97254565028",145

//Writing a message to be sent to specified destination address

>message text <CTRL/Z>

+CMGS: 239

//Message successfully sent . Returns the Message Reference

OK

Deleting Messages (Using AT+CMGD)

AT+CMGD=179

//Delete a message using its index

OK

AT+CMGR=179

//The message index is now empty

+CMS ERROR: invalid memory index

Delete a group of messages. Note that deletion of a number of messages may take a short time.

AT+CMGD=1, 1

//Delete all read messages

OK

AT+CMGD= 1,2

//Delete all read and sent messages

OK

AT+CMGD= 1,3

//Delete all read, sent and unsent messages

OK

AT+CMGD= 1,4

//Delete all messages

OK

Advertising
This manual is related to the following products: