0% found this document useful (0 votes)
245 views32 pages

Quectel GSM MMS AT Commands Manual V1.3

Uploaded by

mansi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
245 views32 pages

Quectel GSM MMS AT Commands Manual V1.3

Uploaded by

mansi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

GSM MMS

AT Commands Manual

GSM/GPRS Module Series

Rev. GSM_MMS_AT_Commands_Manual_V1.3(C)

Date: 2017-11-13

Status: Released

www.quectel.com
GSM/GPRS Module Series
GSM MMS AT Commands Manual

Our aim is to provide customers with timely and comprehensive service. For any
assistance, please contact our company headquarters:

Quectel Wireless Solutions Co., Ltd.


7th Floor, Hongye Building, No.1801 Hongmei Road, Xuhui District, Shanghai 200233, China
Tel: +86 21 5108 6236
Email: [email protected]

Or our local office. For more information, please visit:


http://www.quectel.com/support/salesupport.aspx

For technical support, or to report documentation errors, please visit:


http://www.quectel.com/support/techsupport.aspx
Or email to: [email protected]

GENERAL NOTES
QUECTEL OFFERS THE INFORMATION AS A SERVICE TO ITS CUSTOMERS. THE INFORMATION
PROVIDED IS BASED UPON CUSTOMERS‟ REQUIREMENTS. QUECTEL MAKES EVERY EFFORT
TO ENSURE THE QUALITY OF THE INFORMATION IT MAKES AVAILABLE. QUECTEL DOES NOT
MAKE ANY WARRANTY AS TO THE INFORMATION CONTAINED HEREIN, AND DOES NOT ACCEPT
ANY LIABILITY FOR ANY INJURY, LOSS OR DAMAGE OF ANY KIND INCURRED BY USE OF OR
RELIANCE UPON THE INFORMATION. ALL INFORMATION SUPPLIED HEREIN IS SUBJECT TO
CHANGE WITHOUT PRIOR NOTICE.

COPYRIGHT
THE INFORMATION CONTAINED HERE IS PROPRIETARY TECHNICAL INFORMATION OF
QUECTEL CO., LTD. TRANSMITTING, REPRODUCTION, DISSEMINATION AND EDITING OF THIS
DOCUMENT AS WELL AS UTILIZATION OF THE CONTENT ARE FORBIDDEN WITHOUT
PERMISSION. OFFENDERS WILL BE HELD LIABLE FOR PAYMENT OF DAMAGES. ALL RIGHTS
ARE RESERVED IN THE EVENT OF A PATENT GRANT OR REGISTRATION OF A UTILITY MODEL
OR DESIGN.

Copyright © Quectel Wireless Solutions Co., Ltd. 2017. All rights reserved.

GSM_MMS_AT_Commands_Manual 1 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

About the Document

History

Revision Date Author Description

1.0 2009-08-07 Jay XIN Initial

1. Added error code 3962.


1.01 2009-09-18 Jay XIN 2. Modified “AT+QMMCFG“ default value.
3. Added “AT+QMMPRI” command.
1. Modified “+QMMRECV:(1-20),(1) ”
2. Removed “The maximum size of UFS is 100
1.02 2009-11-25 Jay XIN
Kbytes”.
3. Modified “AT+QFUPL” description.

1.03 2009-12-31 Jay XIN Added GMT time description in “AT+QMMRM”

4. Removed AT+QFXXX command, please refer


to document [4] GSM_FILE_ATC.
5. Added “Reliable transmission”.
6. Added “AT+QMMDUR” command.
1.1 2010-11-20 Jay XIN 7. Removed “The maximum number of „append
file‟ is 6”.
5. Added AT+QMMSMS.
Added AT+QMMCTYP.
Added AT+QMMFTYP.

1.2 2015-05-08 Thomas ZHANG Added applicable modules

1.3 2017-11-13 Sherlock ZHAO Modified the default value of AT+QMMSMS.

GSM_MMS_AT_Commands_Manual 2 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

Contents

About the Document ................................................................................................................................ 2


Contents .................................................................................................................................................... 3
Table Index ............................................................................................................................................... 4

1 Introduction ....................................................................................................................................... 5
1.1. General Description .................................................................................................................. 5
1.2. AT Command Syntax ................................................................................................................ 5

2 Description of MMS AT Commands ................................................................................................ 6


2.1. AT+QMMURL Set the URL of MMSC .................................................................................... 6
2.2. AT+QMMPROXY Set the Proxy of MMS ............................................................................... 6
2.3. AT+QMMCFG Configure Parameters for Sending MMS Message ........................................ 7
2.4. AT+QMMSCS Set Character Sets and Input Mode ............................................................... 8
2.5. AT+QMMSW Write MMS Message ........................................................................................ 9
2.6. AT+QMMSEND Send MMS Message .................................................................................... 10
2.7. AT+QMMRM Manage the Received MMS Message ............................................................11
2.8. AT+QMMRR Read a Received MMS Message ................................................................... 12
2.9. AT+QMMRECV Receive an MMS Message from MMSC .................................................... 14
2.10. AT+QMMPRI Set Priority of MMS Message and Call ....................................................... 14
2.11. AT+QMMDUR Set DUR Attribute Value in the SMIL Script .............................................. 15
2.12. AT+QMMSMS Set MMS‟s SMS Transactor ..................................................................... 16
2.13. AT+QMMCTYP Enable to Output TEXT in UCS2 ............................................................ 16
2.14. AT+QMMFTYP Output File Style ...................................................................................... 18

3 Description of URC ......................................................................................................................... 20

4 Reliable Transmission .................................................................................................................... 21

5 Examples ......................................................................................................................................... 22
5.1. Configure Parameters ............................................................................................................ 22
5.2. File Transmission Operation ................................................................................................... 22
5.3. Write and Send an MMS Message ......................................................................................... 23
5.4. Receive MMS Message.......................................................................................................... 24
5.5. Manage Received MMS Message .......................................................................................... 24

6 Appendix A Reference .................................................................................................................... 26


7 Appendix B Summary of Error Codes ........................................................................................... 28

GSM_MMS_AT_Commands_Manual 3 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

Table Index

TABLE 1: RELATED DOCUMENTS .................................................................................................................. 26


TABLE 2: TERMS AND ABBREVIATIONS ........................................................................................................ 26
TABLE 3: DIFFERENT CODING SCHEMES OF +CME ERROR: <ERR> ....................................................... 28

GSM_MMS_AT_Commands_Manual 4 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

1 Introduction
Quectel module provides MMS application interface for sending and receiving messages including
multimedia objects (image, audio, rich text, etc.). This document is a reference guide to all the AT
commands defined for MMS.

This document is applicable to all Quectel GSM modules.

1.1. General Description

Quectel GSM module supports to transfer MMS message over HTTP protocol. The MMS service supports
the following character sets: US-ASCII, UTF8, UCS2 (Big Endian) and GBK. It is recommended to use
PDU (HEX) mode to input MMS message title if the character set is not US-ASCII.

TA will switch to data mode after executing AT+QMMRR command. To switch back to AT mode, please
input “+++” and this will terminate the current MMS AT command. The interval time between the first “+”
and the character before the first “+” must not be less than 500ms, the interval time between the last “+”
and the character next to the last “+” must not be less than 500ms and the interval time between each “+”
must be less than 1000ms.

1.2. AT Command Syntax


This command returns the list of parameters and value ranges
Test Command AT+<x>=?
set by the corresponding Write Command or internal processes.
This command returns the currently set value of the parameter
Read Command AT+<x>?
or parameters.

Write Command AT+<x>=<…> This command sets the user-definable parameter values.

Execution This command reads non-variable parameters affected by


AT+<x>
Command internal processes in the GSM engine.

GSM_MMS_AT_Commands_Manual 5 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

2 Description of MMS AT Commands

2.1. AT+QMMURL Set the URL of MMSC

AT+QMMURL Set the URL of MMSC


Test Command Response
AT+QMMURL=? +QMMURL: "URL"

OK
Read Command Response
AT+QMMURL? +QMMURL: <mmsc url>

OK
Write Command Response
AT+QMMURL=<mmsc url> OK

If there is an error related to ME functionality:


+CME ERROR: <err>

Parameter

<mmsc url> The URL of MMSC. The maximum length of the parameter is 100 bytes.
<err> Integer type. The error code of the operation. Please refer to Chapter 7.

2.2. AT+QMMPROXY Set the Proxy of MMS

AT+QMMPROXY Set the Proxy of MMS


Test Command Response
AT+QMMPROXY=? +QMMPROXY:
(1),“(0-255).(0-255).(0-255).(0-255)”,(0-65535)

OK

GSM_MMS_AT_Commands_Manual 6 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

Read Command Response


AT+QMMPROXY? +QMMPROXY: <type>,<gateway>,<port>

OK
Write Command Response
AT+QMMPROXY OK
=<type>,<gateway>[,<port>]
If there is an error related to ME functionality:
+CME ERROR: <err>

Parameter

<type> Protocol type. The protocol type is HTTP protocol. The default value is 1.
<gateway> IP address of MMS proxy.
<port> Port of MMS proxy. The range is 0-65535, and the default value is 80.
<err> Integer type. The error code of the operation. Please refer to Chapter 7.

2.3. AT+QMMCFG Configure Parameters for Sending MMS Message

AT+QMMCFG Configure Parameters for Sending MMS Message


Test Command Response
AT+QMMCFG=? +QMMCFG: (list of supported <valid>s),(list of supported
<pri>s),(list of supported <sendrep>s),(list of supported
<readrep>s),(list of supported <visible>s),(list of supported
<class>s)

OK
Read Command Response
AT+QMMCFG? +QMMCFG:
<valid>,<pri>,<sendrep>,<readrep>,<visible>,<class>

OK
Write Command Response
AT+QMMCFG=<valid>[,<pri>][,<sendr OK
ep>][,<readrep>][,<visible>][,<class>]
If there is an error related to ME functionality:
+CME ERROR: <err>

GSM_MMS_AT_Commands_Manual 7 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

Parameter

<valid> The validity period of MMS message


0 1 hour
1 12 hours
2 24 hours
3 2 days
4 1 week
5 Maximum
6 Use the network configuration
<pri> Priority
0 Low
1 Normal
2 High
3 Use the network configuration
<sendrep> Whether to send report.
0 Do not need delivery report
1 Need delivery report
<readrep> Whether to read report
0 No
1 Yes
<visible> Indicate whether to hide address
0 Hide any address
1 Show even secret address
2 Use the network configuration
<class> The class of the MMS message
0 Personal
1 Advertisement
2 Informational
3 Auto
4 Use the network configuration
<err> Integer type. The error code of the operation. Please refer to Chapter 7.

2.4. AT+QMMSCS Set Character Sets and Input Mode

AT+QMMSCS Set Character Sets and Input Mode


Test Command Response
AT+QMMSCS=? +QMMSCS: (list of supported <charset>s),(list of supported
<input mode>s)

OK

GSM_MMS_AT_Commands_Manual 8 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

Read Command Response


AT+QMMSCS? +QMMSCS: <charset>,<input mode>

OK
Write Command Response
AT+QMMSCS=<charset>[,<input OK
mode>]
If there is an error related to ME functionality:
+CME ERROR: <err>

Parameter

<charset> A string parameter which indicates the type of character sets:


"ASCII" US-ASCII character set
"UTF8" UTF8 character set
"UCS2" ISO-10646-UCS-2 character set; this needs to specify Big Endian order.
"GBK" GBK character set
<input mode> The mode to input or view MMS message title.
0 PDU (HEX) mode
1 Text (BIN) mode
<err> Integer type. The error code of the operation. Please refer to Chapter 7.

NOTE

The parameter settings of this command affect the following commands:


 AT+QMMSW=4,1 which is used to input MMS message title.
 AT+QMMSW=4 which is used to view MMS message title.
 AT+QMMSW=5,1 which is used to append a text file "test.txt”.

2.5. AT+QMMSW Write MMS Message

AT+QMMSW Write MMS Message


Test Command Response
AT+QMMSW=? +QMMSW: (list of supported <function>s)

OK
Write Command Response
1) If MMS title is written (<function>=4 If the operation is successful, response:
and <operate>=1): OK
AT+QMMSW=<function>,<operate>
After response “>”, input the data to be If there is an error related to ME functionality:

GSM_MMS_AT_Commands_Manual 9 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

sent. Tap CTRL+Z to send, and tap ESC +CME ERROR: <err>
to cancel the operation.

2)Otherwise:
AT+QMMSW=<function>[,<operate>][
,<oprstring>]

Parameter

<function> Operation type


0 Clean all the content of MMS message
1 Operate “TO address”
2 Operate “CC address”
3 Operate “BCC address”
4 Operate title
5 Operate file appended
<operate> It is omitted if <function> is 0.
0 Clean
1 Write
<oprstring> It is address string if <function> is 1, 2 or 3, the length of which must be less than 50.
It is file name if <function> is 5, the length of which must be less than 13.
<err> Integer type. The error code of the operation. Please refer to Chapter 7.

NOTES

1. The maximum quantity of "TO address", "CC address" and "BCC address" is 6.
2. Address could be a subscriber number or an email address (e.g. [email protected]).
3. The file to be appended must have been stored in UFS. It is strongly recommended that DOS 8.3
format should be used for the file name.
4. The maximum length of MMS message title is 100.
5. The character set of the MMS message title or the contents of a text file are specified by
AT+QMMSCS. For example, If the contents of a text file uses UTF8 character set,
AT+QMMSCS="UTF8", 0 must be executed firstly.

2.6. AT+QMMSEND Send MMS Message

AT+QMMSEND Send MMS Message


Test Command Response
AT+QMMSEND=? +QMMSEND: (list of supported <operate>s)

OK

GSM_MMS_AT_Commands_Manual 10 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

Write Command Response


AT+QMMSEND=<operate> OK

If there is an error related to ME functionality:


+CME ERROR: <err>

Maximum Response Time 75s

Parameter

<operate> Operation type.


1 Start to send.
<err> Integer type. The error code of the operation. Please refer to Chapter 7.

NOTES

1. The response OK means starting to send MMS message. When MMS message sending has
finished, an unsolicited result code "+QMMNOTIFY: 1,<mms index>,<error code>" will be returned.
2. If <error code> equals to 0, it means sending MMS message successfully.

2.7. AT+QMMRM Manage the Received MMS Message

AT+QMMRM Manage the Received MMS Message


Test Command Response
AT+QMMRM=? +QMMRM: (list of supported <operate>s)

OK
Write Command Response
AT+QMMRM=<operate>[,<from>][,<to If <operate>=1 is to list MMS message, response:
>] +QMMRM:<mms index>,<from address>,<ind>,<date>,
<time>,<message size>[…]

OK
Otherwise
OK

If there is an error related to ME functionality:


+CME ERROR: <err>

GSM_MMS_AT_Commands_Manual 11 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

Parameter

<operate> Operation type


0 Delete MMS message
1 List MMS message
<from> The beginning of the MMS message to be operated. The minimum value of the
parameter is 1.
<to> The end of the MMS message to be operated. The minimum value of the parameter
is 1.
<mms index> The index of MMS message
<from address> Origination address
<ind> Whether the MMS message is downloaded successfully.
0 Failed to download the MMS message
1 Successfully download the MMS message
<date> Download date. Its format is MM/DD/YYYY. E.g.“07/25/2009”(GMT)
<time> Download time. Its format is HH:MM:SS. E.g.“10:25:56”(GMT)
<message size> MMS message size in bytes
<err> Integer type. The error code of the operation. Please refer to Chapter 7.

2.8. AT+QMMRR Read a Received MMS Message

AT+QMMRR Read a Received MMS Message


Test Command Response
AT+QMMRR=? +QMMSRR: (list of supported <operate>s)

OK
Write Command Response
AT+QMMRR=<operate>[,<mms The following is the format to view "Origination address", "TO
index>][,<para>][,<file name>] address" and "CC address" (<operate>=1,2, or 3; <para> is
omitted):
+QMMRR: 1,<address>

OK

The following is the format to view MMS message title


(<operate>=4):
+QMMRR: 4,<charset>,<title data>

OK

The following is the format to list append file (<operate>=5;


<para> is omitted):

GSM_MMS_AT_Commands_Manual 12 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

+QMMRR: 5,<file index>,<file name>,<charset>,<file size>


[…]

OK

The following is the format to read the content of a file (AT


command AT+QMMRR=6, <mms index>,<para> is
entered):
CONNECT
TA switches to data mode, and the bin data of the file will be
outputted. After the file is read, TA will return to command
mode and reply the following codes:
+QMMRR: 6,<download size>,<checksum>

OK

The following is the format to copy the content of file to UFS


(AT command AT+QMMRR=6,<mms index>,<para>,<file
name> is entered):
OK
If there is an error related to ME functionality:
+CME ERROR: <err>

Parameter

<operate> Operation type


1 View origination address
2 View “TO address”
3 View “CC address”
4 View MMS title
5 List “Append file”
6 Read append file data of MMS message
<mms index> Serial number of receiving MMS message. The minimum value of the parameter
is 1.
<para> If <operate> is 6, it indicates file index.
If <operate> is 4, it indicates output mode.
0 PDU (HEX) mode
1 Text (BIN) mode
If <operate> is not 4 or 6, <para> is omitted.
<file name> It is valid only if <operate> is 6
<download size> The size of the downloaded data
<checksum> The checksum of the downloaded data. <checksum> is 16 bit checksum based
on bitwise XOR.
<err> Integer type. The error code of the operation. Please refer to Chapter 7.

GSM_MMS_AT_Commands_Manual 13 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

2.9. AT+QMMRECV Receive an MMS Message from MMSC

AT+QMMRECV Receive an MMS Message from MMSC


Test Command Response
AT+QMMRECV=? +QMMRECV: (list of supported <mms index>s),(list of
supported <operate>s)

OK
Write Command Response
AT+QMMRECV=<mms OK
index >,<operate>
If there is an error related to ME functionality:
+CME ERROR: <err>

Parameter

<mms index> MMS message index which starts from 1


<operate> Operation type
1 Start to receive MMS message
<err> Integer type. The error code of the operation. Please refer to Chapter 7.

NOTES

1. The response OK means starting to receive MMS message. When MMS message receiving has
finished, an unsolicited result code “+QMMNOTIFY: 2,<mms index>,<error code>” will be returned.
2. If <error code> equals to 0, it means receiving MMS message successfully.

2.10. AT+QMMPRI Set Priority of MMS Message and Call

AT+QMMPRI Set Priority of MMS Message and Call


Test Command Response
AT+QMMSRI=? +QMMSRI: (list of supported <pri>s)

OK
Read Command Response
AT+QMMSRI? +QMMSRI: <pri>

OK
Write Command Response
AT+QMMSRI=<pri> OK

GSM_MMS_AT_Commands_Manual 14 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

If there is an error related to ME functionality:


+CME ERROR: <err>

Parameter

<pri> Priority
0 Call has higher priority than MMS message
1 MMS message has higher priority than call
<err> Integer type. The error code of the operation. Please refer to Chapter 7.

2.11. AT+QMMDUR Set DUR Attribute Value in the SMIL Script

AT+QMMDUR Set DUR Attribute Value in the SMIL Script


Test Command Response
AT+QMMDUR=? +QMMDUR: (list of supported <durattribute>s)

OK
Read Command Response
AT+QMMDUR? +QMMDUR: <durattribute>

OK
Write Command Response
AT+QMMDUR=<durattribute> OK

If there is an error related to ME functionality:


+CME ERROR: <err>

Parameter

<durattribute> DUR attribute value. The range is 0-4294967295, and the default value is 120000.
Unit: ms.
<err> Integer type. The error code of the operation. Please refer to Chapter 7.

GSM_MMS_AT_Commands_Manual 15 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

2.12. AT+QMMSMS Set MMS’s SMS Transactor

AT+QMMSMS Set MMS’s SMS Transactor


Test Command Response
AT+QMMSMS=? +QMMSEND: (list of supported <smstosim>s)

OK
Read Command Response
AT+QMMSMS? +QMMSMS: <smstosim>

OK
Write Command Response
AT+QMMSMS=<smstosim> OK

If there is an error related to ME functionality:


+CME ERROR: <err>

Parameter

<smstosim> Set MMS‟s SMS transactor to handle the received MMS


0 Handle the received MMS as MMS messages
1 Handle the received MMS as SMS messages
<err> Integer type. The error code of the operation. Please refer to Chapter 7.

NOTE

When AT+QMMSMS=1, all the MMS AT commands in this document cannot be used to download and
read the MMS.

2.13. AT+QMMCTYP Enable to Output TEXT in UCS2

AT+QMMCTYP Enable to Output TEXT in UCS2


Test Command Response
AT+QMMCTYP=? +QMMCTYP: (list of supported <enableucs2>s),(list of
supported <bigendian>s)

OK
Read Command Response
AT+QMMCTYP? +QMMCTYP: <enableucs2>,<bigendian>

GSM_MMS_AT_Commands_Manual 16 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

OK

Write Command Response


AT+QMMCTYP=<enableucs2>,<bigen OK
dian>
If there is an error related to ME functionality:
+CME ERROR: <err>

Parameter

<enableucs2> Whether to enable to output TEXT in UCS2 or not


0 Disable
1 Enable
<bigendian> Endianness
0 UCS2 big endian
1 UCS2 little endian
<err> Integer type. The error code of the operation. Please refer to Chapter 7.

NOTE

If <enableucs2> is set as 1, when reading MMS, the following content will be outputted as UCS2 format:
1) Title with ASCII and UTF8 encoding (when MMS is read by AT+QMMRR=4,<mms index>[,<output
mode>])
2) Text file with UTF8 encoding (when MMS is read by AT+QMMRR=5,<mms index> and
AT+QMMRR=6,<index>,<fileindex>).

The following example shows the details about the NOTE above.

Example
1) Set AT+QMMCTYP=0,0
AT+QMMRR=4,1 //Read ASCII TXT MMS title.
+QMMRR: 4,"ASCII",6D7574692066696C6500

OK
AT+QMMRR=5,1 //List appended file list +QMMRR: 5,1,"s.smil","UTF8",880,13.
+QMMRR: 5,2,"cont1.txt","UTF8",5,3

+QMMRR: 5,5,"pic1.jpg","",17068,7

OK
AT+QMMRR=6,1,2 //Read UTF8 file.
test1

GSM_MMS_AT_Commands_Manual 17 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

+QMMRR: 6,5,3611

OK

2) Set AT+QMMCTYP=1,1
AT+QMMRR=4,1 //Output MMS title using UCS2 encoding.
+QMMRR: 4,"UCS2","6D007500740069002000660069006C0065000000"

OK
//List appended file list. For UTF8 file, <charset> and <file size> are changed to UCS2 attributes.
AT+QMMRR=5,1
+QMMRR: 5,1,"s.smil","UCS2",1760,13

+QMMRR: 5,2,"cont1.txt","UCS2",10,3

+QMMRR: 5,5,"pic1.jpg","",17068,7

OK
AT+QMMRR=6,1,2 //Use UCS2 format to output TXT file content.
test1
+QMMRR: 6,10,2700

OK

2.14. AT+QMMFTYP Output File Style

AT+QMMFTYP Output File Style


Test Command Response
AT+QMMFTYP=? +QMMFIYP: (list of supported <outputstyle>s)

OK
Read Command Response
AT+QMMFTYP? +QMMFTYP: <outputstyle>

OK
Write Command Response
AT+QMMFTYP=<outputstyle> OK

If there is an error related to ME functionality:


+CME ERROR: <err>
Reference When set
AT+QMMFTYP=1, run AT+QMMRR=5,<mmsindex>

GSM_MMS_AT_Commands_Manual 18 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

to list file, respond:


+QMMRR: 5,<fileindex>,<file name>,<charset>,<filesize>
,<filetype>

Parameter description:
<filetype>:
0 Unknown type
1 Text
2 Text/html
3 Text/plain
4 Text/xml
5 Image
6 Image/gif
7 Image/jpeg
8 Image/tiff
9 Image/pnp
10 Image/wbmp
11 Audio
12 Video
13 SMIL

Parameter

<outputstyle> Whether to output file style


0 Not output
1 Output
<err> Integer type. The error code of the operation. Please refer to Chapter 7.

GSM_MMS_AT_Commands_Manual 19 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

3 Description of URC

URC Meaning

+QMMNOTIFY: 1,<mms index>,0 Sending MMS message successfully, and <mms index> is 0.

+QMMNOTIFY: 1,<mms Sending MMS message failed, and <mms index> is 0. For
index>,<error code> <error code>, please refer to Chapter 7.

+QMMNOTIFY: 2,<mms index>,0 Receiving MMS message successfully.

+QMMNOTIFY: 2,<mms Receiving MMS message failed. For <error code>, please
index>,<error code> refer to Chapter 7.
A new MMS message has arrived, and AT+QMMRECV can be
+QMMNOTIFY: 3,<mms index>,0
used to receive it.
Received a Service Indication (SI) message. For example,
when a new MMS message has arrived, but it has not been
received via the command AT+QMMRECV, MMSC will send
+QMMNOTIFY: 4,0,<error code> an SI message to inform customers. Of course, other service
applications also send SI messages, such as push email,
stock information, news, or some advertising, etc. Customers
can ignore these messages.

GSM_MMS_AT_Commands_Manual 20 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

4 Reliable Transmission
For reliable transmission when using "AT+QMMRR=6, …" command to download the content of a file, it‟s
recommended that users turn on hardware flow control capabilities, while also open MCU hardware flow
control function. Use AT+IFC=2,2<CRLF> command to open the hardware flow control function.

Generally, serial transmission is reliable, bur for further reliability, Quectel provides additional ways to
verify the data transmission reliability by the command‟s response information.

When using "AT+QMMRR=6, …" command to download a file, the module will report "+QMMRR:
6,<download size>,<checksum>" information tips at the end of data transmission. Then MCU can judge
whether the data has been lost by comparing the value of <download size> and <checksum>.

<download size> is the data length that the module downloaded. MCU compares <download size> with
the actual length of the file that MCU has received. If the two unequal, it means the module lost data.

<checksum> is calculated by doing XOR for every 2 bytes. Similarly MCU calculates the actual file‟s
checksum as the example below, and then compares this value with <checksum> which module reports.
If the two checksums are not equal, the received data may be problematic. Users can re-download data.

Example for calculating checksum:


If the data length of the downloaded file is 9, the 16 hex values are as follows:
0x23 0x13 0x65 0x B6 0x76 0x88 0xA3 0xEF 0x55

So, checksum is calculated as follows:


checksum = 0x2313 XOR 0x65B6 XOR 0x7688 XOR 0xA3EF XOR 0x5500

Every two data form a group and do XOR with another group. If the last group is less than 2 bytes,
supplement it with 0x00.

GSM_MMS_AT_Commands_Manual 21 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

5 Examples

5.1. Configure Parameters


AT+QIFGCNT=0
OK

AT+QICSGP=1,"CMWAP" //Set APN.


OK

AT+QMMURL=”http://mmsc.monternet.com” //Set the MMSC URL.


OK

AT+QMMPROXY=1,“10.0.0.172”,80 //Use HTTP protocol to send MMS message. Set the IP


address and port of MMS proxy to “10.0.0.172” and 80.
OK

5.2. File Transmission Operation

For more details, please refer to document [4].

AT+QFUPL=”test.txt”,3222 //Upload the text file test.txt.


CONNECT
<input file bin data>
+QFUPL: 3222,B3E4

OK

AT+QFDWL=”test.txt” //Download the file test.txt.


CONNECT
<output file bin data>
+QFDWL: 3222,B3E4

OK

AT+QFUPL=”test2.txt”,4222 //Upload the text file test2.txt.

GSM_MMS_AT_Commands_Manual 22 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

CONNECT
<input file bin data>
+QFUPL: 4222,13E4

OK

AT+QFUPL=”pic1.jpg”,13222 //Upload the picture file pic1.jpg.


CONNECT
<input file bin data>
+QFUPL: 13222,D5E4

OK

5.3. Write and Send an MMS Message


AT+QMMSW=0 //Clean the content of MMS message.
OK

AT+QMMSW=1,1,"13072168083" //Add the first "TO address".


OK

AT+QMMSW=1,1,"13156789900" //Add the second "TO address".


OK

AT+QMMSW=1,1,”[email protected]” //Add the third "TO address".


OK

AT+QMMSCS="UTF8",1 //The character set is UTF8, and the input mode is Text
(BIN) mode.
OK

AT+QMMSW=4,1 //Input MMS message title.


>abcd<Ctrl-Z>
OK

AT+QMMSW=5,1,"pic1.jpg" //Add the first file to MMS message, and this file is jpg
file.
OK

AT+QMMSCS="UTF8" //Character set must be selected before adding text file.


OK

AT+QMMSW=5,1,"test.txt" //Add the second file to MMS message, and the character

GSM_MMS_AT_Commands_Manual 23 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

set of this file is UTF8


OK

AT+QMMSW=5,1,"test2.txt" //Add the third file to MMS message, and the character
set of this file is UTF8
OK

AT+QMMSEND=1 //Send the MMS message.


OK

+QMMNOTIFY: 1,0,0 //Send the MMS message successfully.

AT+QIDEACT //Deactivate GPRS context.


DEACT OK

5.4. Receive MMS Message


+QMMNOTIFY: 3,1 //Receive an MMS push message, indicating a new MMS, and the index is 1.
AT+QMMRECV=1,1 //Receive MMS message from MMSC.
OK

+QMMNOTIFY: 2,1,0 //Receive MMS message successfully.

AT+QIDEACT //Deactivate GPRS context.


DEACT OK

5.5. Manage Received MMS Message


AT+QMMRM=1 //List MMS message.
+QMMRM: 1,"+8613950062882",1,"7/23/2009","0:39:4",3745

OK

AT+QMMRR=1,1 //Read MMS message “Original address”.


+QMMRR: 1,” +8613950062882”

OK

AT+QMMRR=4,1,1 //Read MMS message title.


+QMMRR: 4,”UTF8”,”abcde”

OK

GSM_MMS_AT_Commands_Manual 24 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

AT+QMMRR=5,1 //List the files in the MMS message.


+QMMRR: 5,1,”test.txt”,”UTF8”,3222 //It includes one file whose index is 1.

OK

AT+QMMRR=6,1,1 //Get the data of the file 1 (defined by the second “1” in
the parameter) in the MMS 1 (defined by the first “1” in
the parameter).
CONNECT
<output file bin data>
+QMMRR: 6,3222,B3E4

OK

GSM_MMS_AT_Commands_Manual 25 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

6 Appendix A Reference

Table 1: Related Documents

SN Document Name Remark

The introduction of AT commands for Mxx


[1] Quectel_Mxx_AT_Commands_Manual
modules
The introduction of how to use the internal
[2] Quectel_GSM_TCP(IP)_Application_Note
TCP/IP stack for GSM modules
WAP MMS protocol standard package of
[3] wap-209-mmsencapsulation-20020105-a
documents
The introduction of the AT commands of the file
[4] Quectel_GSM_File_AT_Commands_Manual
system for GSM modules

Table 2: Terms and Abbreviations

Abbreviation Description

BIN Output/input data is the content of the binary data

DUR The DUR attribute defines the duration of displaying file in SMIL script

"HEX" Character strings consist only of hexadecimal numbers from 00 to FF,


HEX
e.g. string “Hello” HEX is “48656C6C6F”

MCU Microcontroller Unit

MMS Multimedia Message Service

MMSC Multimedia Message Service Center

A server which provides access to various messaging systems. It may


MMS Proxy-Relay operate as WAP origin server in which case it may be able to utilize features
of the WAP system

SMIL Synchronized Multimedia Integration Language

URL Uniform Resource Locator

UFS User File Storage

GSM_MMS_AT_Commands_Manual 26 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

XOR Exclusive OR

GSM_MMS_AT_Commands_Manual 27 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

7 Appendix B Summary of Error Codes


Final result code +CME ERROR: <err> indicates an error related to mobile equipment or network. The
operation is similar to ERROR result code. None of the following commands in the same command line is
executed. Neither ERROR nor OK result code shall be returned. The listed <err> codes here are just
related with MMS. About other <err> codes, please refer to document [1].

Table 3: Different Coding Schemes of +CME ERROR: <err>

Code of <err> Meaning

3901 Timeout

3902 URL too long

3903 Invalid URL

3904 Unsupported proxy

3905 Invalid proxy address

3906 IP address error

3907 DNS error

3908 Parameter error

3909 TO addresses exceeded

3910 CC addresses exceeded

3911 BCC addresses exceeded

3912 Appended file capacity exceeded

3913 File name too long

3914 The number of files exceeded

3915 Non-existent address

3916 UFS storage full

GSM_MMS_AT_Commands_Manual 28 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

3917 Drive full

3918 Drive error

3919 File not found

3920 Invalid file name

3921 File already existed

3922 Failed to create file

3923 Failed to write file

3924 Failed to open file

3925 Failed to read file

3926 MMS busy

3927 Sending MMS busy

3928 Sending MMS stopped

3929 Already stopped to send

3930 Receiving MMS busy

3931 Receiving MMS stopped

3932 Already stopped to receive

3933 HTTP response failure

3934 Invalid MMS response

3935 MMS response error

3936 Invalid push message

3937 Already downloaded

3938 Network busy

3939 Failed to open network

3940 Network no configured

3941 Network deactivated

3942 Network error

GSM_MMS_AT_Commands_Manual 29 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

3943 Network shutdown

3944 UART busy

3945 UART escaped

3946 Failed to create socket

3947 Failed to connect socket

3948 Failed to read socket

3949 Failed to write socket

3950 Socket closed

3951 MMS length error

3952 Failed to encode MMS

3953 Failed to decode MMS

3954 Failed to decode HTTP

3955 Failed to decode push message

3956 PDU (HEX) align error

3957 PDU (HEX) character error

3958 String too long

3959 MMS full

3960 Non-existent MMS

3961 Invalid address

3962 Voice call busy

3963 ALLOC memory failed

3901 Timeout

3902 URL too long

3903 Invalid URL

3904 Unsupported proxy

3905 Invalid proxy address

GSM_MMS_AT_Commands_Manual 30 / 31
GSM/GPRS Module Series
GSM MMS AT Commands Manual

3906 IP address error

3907 DNS error

3908 Parameter error

3909 TO addresses exceeded

3910 CC addresses exceeded

3911 BCC addresses exceeded

3912 Appended file capacity exceeded

GSM_MMS_AT_Commands_Manual 31 / 31

You might also like