![Wavecom WMO2 Скачать руководство пользователя страница 57](http://html1.mh-extra.com/html/wavecom/wmo2/wmo2_manual_3834769057.webp)
WMO2 G900 / G1800 / G1900
WCOM/GSM/WMO2/WMO2ATDOC
Friday 21 May 1999
WAVECOM confidential ©
51
4.6.4
Preferred Message Format
+CMGF
The formats implemented are the
text mode
and the
PDU mode
.
In PDU mode, a complete SMS Message including all header information is
passed as a binary string (in hexadecimal format, so only this 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 (ex: ‘41’ is
converted to the ASCII character ‘A’, whoes ASCII code is 0x41 or 65).
In Text mode, every commands and responses are in ASCII characters.
The chosen format is stored in E2PROM by the cCSAS.
Application to GSM
AT+CMGF ?
current message format
GSM to application
+CMGF: 1
OK
Text mode
Application to GSM
AT+CMGF=?
Possible message format
GSM to application
+CMGF: (0-1)
OK
Text or PDU modes are available
Example to send a SMS Message in PDU mode
Application to GSM
AT+CMGF=0
PDU message format
GSM to application
OK
PDU mode valid
Application to GSM
AT+CMGS=14<CR>
0001030691214365000004C9E9340B
Send complete MSG in PDU mode,
no SC address
GSM to application
+CMGS: 4
OK
MSG correctly sent, <mr> is
returned
The message <pdu> is composed of the SC address (« 00 means no SC
address given, use default SC address read with +CSCA command) and the
TPDU message.
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:
<fo>:
0x01 (SMS-SUBMIT, no validity period)
<mr> (TP-MR):
0x03 (Message Reference)
<da> (TP-DA):
0x06 0x91 0x21 0x43
(destination a123456)
<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,
e.g. octet with hexadecimal value 0x2A is presented to the mobile as two
characters ‘2’ (ASCII 50) and ‘A’ (ASCII 65).
4.6.5
Save Settings
+CSAS
All settings specified in cCSCA and +CSMP are stored in
E2PROM if the SIM card is a phase 1 card or in the SIM card if it is phase
2.
Application to GSM
AT+CSAS
Store +CSCA and +CSMP parameters
GSM to application
OK
Parameters are saved
4.6.6
Restore settings
+CRES
All settings specified in cCSCA and +CSMP are restored from
E2PROM if the SIM card is phase 1 or from the SIM card if it is a phase 2
SIM card.
Application to GSM
AT+CRES
RCSCA and +CSMP parameters
GSM to application
OK
Parameters are saved