beautypg.com

Westermo GS-01 User Manual

Page 44

background image

44

6195-2201

+CMGW – Write Message to Memory

This command stores a message to memory storage (either SMS-SUBMIT or
SMS-DELIVERS). The memory location is returned (no choice possible
as with phonebooks +CPBW).

The entering of text or PDU is done similarly as specified in command Send Message
+CMGS.

Command syntax in text mode:

( is returned in both cases)

AT+CMGW= [, [, ] ]

enter text

Command syntax in PDU mode:

AT+CMGW= [,]

give PDU

Response syntax:

+CMGW:

or +CMS ERROR: if writing fails

Parameter Definition:

: Originating or Destination Address Value in string format.

: Type of Originating / Destination Address.

: Integer type in PDU mode (default 2 for +CMGW), or string type in text mode
(default ”STO UNSENT” for +CMGW). It indicates the status of message in memory.
If is omitted , the stored message is considered like a message to be send.

Defined values:

PDU mode

Text mode

0

”REC UNREAD”

1

”REC READ”

2

”STO UNSENT”

3

”STO SENT”

: The length of the actual data unit in octets

Example:

Application to GSM

AT+CMGW=”+33146290800”

Write a message in

Hello, how are you?

text mode

GSM to application

+CMGW: 4

Message stored in

OK

index 4

Application to GSM

AT+CMGW=

Write a message in

PDU mode

GSM to application

+CMGW:

Message stored in

OK