Westermo GD-01 User Manual
Page 58

58
6196-2220
+CMGF – Preferred Message Format
Description:
The message formats supported are text mode and PDU mode. In PDU mode, a com-
plete SMS Message including all header information is given as a binary string (in hexa-
decimal format).Therefore, only the following set of characters is allowed:
{‘0’,’1’,’2’,’3’,’4’,’5’,’6’,’7’,’8’,’9’, ‘A’, ‘B’,’C’,’D’,’E’,’F’}. Each pair or characters is converted to a
byte (e.g.: ‘41’ is converted to the ASCII character ‘A’, whose ASCII code is 0x41 or 65).
In Text mode, all commands and responses are in ASCII characters.
The format selected is stored in EEPROM by the +CSAS command.
Syntax:
AT+CMGF
Command example
Possible responses
Note
AT+CMGF ?
+CMGF: 1
Current message format:
OK
Text mode
AT+CMGF=?
+CMGF: (0-1)
Possible message format:
Text or PDU OK
modes are available
Example, sending an SMS Message in PDU mode
Command example
Possible responses
Note
AT+CMGF=0
OK
Set PDU mode
AT+CMGS=14
000103069121436500
Send complete MSG in
0004C9E9340B
OK
PDU mode, no SC
address
Defined values:
The
use default SC address read with +CSCA command) and the TPDU message. In this
example, the length of octets of the TPDU buffer is 14, coded as GSM 03.40. In this case
the TPDU is: 0x01 0x03 0x06 0x91 0x21 0x43 0x65 0x00 0x00 0x04 0xC9 0xE9 0x34
0x0B, which means regarding GSM 03.40:
0x01 (SMS-SUBMIT, no validity period)
0x03 (Message Reference)
0x06 0x91 0x21 0x43 0x65 (destination address +123456)
0x00 (Protocol Identifier)
0x00 (Data Coding Scheme: 7 bits alphabet)
TP-UD
0xC9 0xE9 0x34 0x0B (User Data: ISSY)
TPDU in hexadecimal format must be converted into two ASCII characters, e.g. octet
with hexadecimal value 0x2A is presented to the ME as two characters ‘2’ (ASCII 50) and
‘A’ (ASCII 65).
B A C K