17 preferred message format +cmgf, 1 description, 2 syntax – Rainbow Electronics 900 User Manual
Page 85: 3 defined values, Preferred message format +cmgf

FLYFOT-M260-MODULE
Page: 85 / 239
This document is the sole and exclusive property of FLYFOT. Not to be distributed or divulged without
prior written agreement.
9.17 Preferred Message Format +CMGF
9.17.1 Description
The message formats supported are text mode and PDU mode.
In PDU mode, a complete SMS Message including all header information is given as a binary string (in
hexadecimal 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 character 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.
9.17.2 Syntax
Command syntax : AT+CMGF=
Command
Possible responses
AT+CMGF?
Note : Current message format
+CMGF:1
OK
Note : Text mode
AT+CMGF=?
Note : Possible message format
+CMGF: (0,1)
OK
Note : Text or PDU modes are available
Example, sending an SMS Message in PDU mode
Command
Possible responses
AT+CMGF=0
Note : Set PDU mode
OK
Note : PDU mode valid
AT+CMGS=14
0001030691214365000004C9E9340B
Note : Send complete MSG in PDU mode,
no SC address
+CMGS: 4
OK
Note : MSG correctly sent,
returned
9.17.3 Defined
values
0 PDU mode
1 Text mode
The
read with +CSCA command) and the TPDUmessage.
In this example, the length in bytes of the TPDU buffer is 14, coded as GSM03.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 :