Rainbow Electronics MG260 User Manual

Page 86

Advertising
background image

FLYFOT-MG260-MODULE

Page: 86 / 246

This document is the sole and exclusive property of FLYFOT. Not to be distributed or divulged without
prior written agreement.

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.

Syntax

Command syntax : AT+CMGF=<mode>
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<CR>
0001030691214365000004C9E9340B
Note : Send complete MSG in PDU mode,
no SC address

+CMGS: 4
OK
Note : MSG correctly sent, <mr> is
returned

Defined values

<mode> PDU or text mode
0 PDU mode (default value)
1 Text mode
The <pdu> message is composed of the SC address (00 means no SC addressgiven, use default SC address
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 :
<fo> 0x01 (SMS-SUBMIT, no validity period)
<mr> (TP-MR) 0x03 (Message Reference)
<da> (TP-DA) 0x06 0x91 0x21 0x43 0x65 (destination address +123456)
<pid> (TP-PID) 0x00 (Protocol Identifier)
<dcs> (TP-DCS) 0x00 (Data Coding Scheme : 7 bits alphabet)
<length> (TP-UDL) 0x04 (User Data Length, 4 characters of text)
TP-UD 0xC9 0xE9 0x34 0x0B (User Data : ISSY)
TPDU in hexadecimal format must be converted into two ASCII characters. For

Advertising