MMS AT Commands
MMS AT Commands
Application Note
Rev. LTE_Standard_MMS_Application_Note_V1.1
Date: 2020-02-20
Status: Released
www.quectel.com
LTE Standard Module Series
LTE Standard MMS Application Note
Our aim is to provide customers with timely and comprehensive service. For any
assistance, please contact our company headquarters:
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 WIRELESS SOLUTIONS 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. 2020. All rights reserved.
LTE_Standard_MMS_Application_Note 1 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
Revision History
LTE_Standard_MMS_Application_Note 2 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
Contents
1 Introduction ......................................................................................................................................... 5
1.1. The Process of Sending MMS Messages ................................................................................. 5
1.2. AT Command Syntax ................................................................................................................. 6
3 Examples ........................................................................................................................................... 14
3.1. Add Recipients ......................................................................................................................... 14
3.2. Add CC Recipients or BCC Recipients .................................................................................... 14
3.3. Edit the Title of MMS Messages .............................................................................................. 15
3.4. Add Attachments ...................................................................................................................... 15
3.5. Clear all Contents of MMS Messages ..................................................................................... 17
3.6. Send MMS Messages .............................................................................................................. 17
7 Appendix A References.................................................................................................................... 26
LTE_Standard_MMS_Application_Note 3 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
Table Index
LTE_Standard_MMS_Application_Note 4 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
1 Introduction
Quectel LTE Standard modules provide MMS application interface for sending messages including
multimedia objects (image, audio, rich text, etc.). This document is a reference guide to all the AT
commands defined for MMS.
LTE_Standard_MMS_Application_Note 5 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
sending MMS messages successfully, the file should be deleted by AT+QFDEL command. If the
attachment is a text file, the character set should be specified by
AT+QMMSCFG="character",<charset> first. For more details, please refer to
Quectel_LTE_Standard_FILE_AT_Commands_Manual.
Step 4: Send MMS messages by AT+QMMSEND=<timeout>. It may take some time to send MMS
messages successfully. MMS messages should be sent again before output of
"+QMMSEND:<err>,<httprsp>[,<mmsrsp>]" which indicates the ending of sending MMS
messages.
Step 5: Clear the content of an MMS message by AT+QMMSEDIT=0 and delete the files as
attachments by AT+QFDEL. For more details, please refer to Quectel_
LTE_Standard_FILE_AT_Commands_Manual.
Step 2 to Step 5 can be repeated, and Step 4 to Step 5 can be repeated too.
Write Command AT+<x>=<…> This command sets the user-definable parameter values.
NOTES
1. <...>: Parameter name. Angle brackets < > are not included in the actual command line. The
parameter with an underscore "_" takes the default value.
2. [...]: Optional parameters. Square brackets [ ] are not included in the actual command line. The
default values will be used when optional parameters are omitted unless otherwise stated.
LTE_Standard_MMS_Application_Note 6 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
The command can be used to configure PDP context ID, MMSC, proxy, character type and other MMS
parameters. If the Write Command only executes one parameter, it will query the current settings.
OK
Read Command Response
AT+QMMSCFG? OK
Write Command Response
AT+QMMSCFG="contextid"[,<contextID If <contextID> is omitted, query the current settings:
>] +QMMSCFG: "contextid",<contextID>
OK
If <contextID> is specified:
OK
Or
+CME ERROR: <err>
LTE_Standard_MMS_Application_Note 7 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
OK
OK
OK
OK
LTE_Standard_MMS_Application_Note 8 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
OK
If <mode> is specified:
OK
Or
+CME ERROR: <err>
Write Command Response
AT+QMMSCFG="connecttimeout"[,<con If <connect_timeout> is omitted, query the current
nect_timeout>] settings:
+QMMSCFG:"connecttimeout",<connect_timeout>
OK
Parameter
<contextID> Integer type. The PDP context ID. The range is 1-16, and the default value is 1.
<URL> String type. The address of MMSC. The maximum length of URL is 100 bytes.
<gateway> String type. The IP address of MMS proxy. The maximum length of gateway is 50
bytes.
<port> Integer type. The port of MMS proxy. The range is 1-65535, and the default value is
80.
<charset> String type. The type of character set.
"ASCII" US-ASCII character set
"UTF8" UTF8 character set
"UCS2" ISO-10646-UCS-2 character set, big-endian order needs to be specified
"GBK" GBK character set
<valid> Integer type. The validity period of the MMS message.
0 1 hour
1 12 hours
2 24 hours
LTE_Standard_MMS_Application_Note 9 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
3 2 days
4 1 week
5 Maximum
6 Depend on network configuration
<pri> Integer type. The priority of the MMS message.
0 Low
1 Normal
2 High
3 Depend on network configuration
<sendrep> Integer type. Whether to deliver the report.
0 No
1 Yes
<readrep> Integer type. Whether to read report.
0 No
1 Yes
<visible> Integer type. Whether to hide address.
0 Hide any address
1 Show all addresses, including BCC address
2 Depend on network configuration
<class> Integer type. The class of the MMS message.
0 Personal
1 Advertisement
2 Informational
3 Automatical
4 Depend on network configuration
<mode> Integer type. The header option of MMS x-up-calling-id.
0 Not add the header option of MMS x-up-calling-id
1 Add the header option of MMS x-up-calling-id
<connect_timeout> Integer type. The timeout for MMS TCP handshake. The range is 1-125, and
the default value is 125. Unit: s.
<err> Integer type. The error code of the operation. Please refer to Chapter 5.
The command can be used to add the recipient address, edit title and add attachments for MMS
messages. The character set of title or text file is set by AT+QMMSCFG="character",<charset>. For
example, if the content of a text file uses UTF8 character set, AT+QMMSCFG="character","UTF8" must
be executed first.
LTE_Standard_MMS_Application_Note 10 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
supported <function_configure>s),<optstring>
OK
Read Command Response
AT+QMMSEDIT? OK
Write Command If <function_configure> and <optstring> are omitted:
AT+QMMSEDIT=<function>[,<function_con When <function> is not 0, query the specified settings
figure>[,<optstring>]] of <function>:
List of [+QMMSEIDT: <function>,<optstring>]
OK
Or
+CME ERROR: <err>
If <function_configure> is specified:
When <function_configure>=0, <optstring> needs to
be omitted, which means deleting the specified settings
of <function>:
OK
Or
+CME ERROR: <err>
Parameter
LTE_Standard_MMS_Application_Note 11 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
This command is used to send MMS messages. Customers should not re-execute AT+QMMSEND until
+QMMSEND: <err>,<httprsp>,<mmsrsp> is returned. When the <timeout> is reached, if the process of
sending MMS messages has not finished yet, MMS sending will be interrupted.
OK
Read Command Response
AT+QMMSEND? OK
Write Command Response
AT+QMMSEND=<timeout> OK
+QMMSEND: <err>,<httprsp>[,<mmsrsp>]
Or
+CME ERROR: <err>
The command takes effect immediately.
Characteristics
The configurations will not be saved.
LTE_Standard_MMS_Application_Note 12 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
Parameter
<timeout> Integer type. The maximum time to send MMS messages. The range is 1-65535. Unit:
second.
<httprsp> Integer type. The response code of HTTP(S), for reference only. For example, 200
indicates HTTP(S) posts data successfully. Please refer to Chapter 6.
<mmsrsp> String type. The response string from MMSC when MMS messages are failed to be
sent, and is for reference only.
<err> If MMS messages are sent successfully, <err> is 0. Otherwise, <err> indicates the
error code of the operation. Please refer to Chapter 5.
LTE_Standard_MMS_Application_Note 13 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
3 Examples
//Add phone number or email address as a recipient. The maximum number of recipients is 6.
OK
//Delete the recipients by executing AT+QMMSEDIT=1,0.
AT+QMMSEDIT=1,0 //Delete a recipient.
OK
AT+QMMSEDIT=1 //Query the recipients’ address.
OK
//The operation of adding CC recipients differs from adding BCC recipients only in <function> value. For
CC recipients, the <function> value is 2. For BCC recipients, it is 3.
AT+QMMSEDIT=2,1,"13856122546" //Add a phone number as a CC recipient.
OK
AT+QMMSEDIT=2 //Query the CC recipient address.
+QMMSEDIT: 2,"13856122546"
OK
//Delete the CC recipient by executing AT+QMMSEDIT=2,0.
AT+QMMSEDIT=2,0 //Delete the CC recipient.
OK
AT+QMMSEDIT=2 //Query the CC recipient address.
LTE_Standard_MMS_Application_Note 14 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
OK
OK
//If the <charset> is not ASCII, the <optstring> should be the hex string of the inputted data.
AT+QMMSCFG="character", "UTF8" //Set the charset as "UTF8".
OK
AT+QMMSEDIT=4,1,"7465737420454D3035206D6D73" //Edit the title of MMS message.
"7465737420454D3035206D6D73" is
the hex string of "test EM05 MMS" in
UTF8.
OK
AT+QMMSEDIT=4 //Query the title of the MMS message.
+QMMSEDIT: 4,"UTF8","7465737420454D3035206D6D73"
OK
//Delete the title by executing AT+QMMSEDIT=4,0.
AT+QMMSEDIT=4,0 //Delete the title of the MMS message.
OK
AT+QMMSEDIT=4 //Query the title of the MMS message.
OK
//Customers can add attachments for an MMS message. The attachments can be RAM, UFS and SD files,
but it is strongly recommended to use RAM files. The maximum number of attachments is 12, and the
maximum length of file name is 80 bytes. The total size of attachments may be restricted by the operator.
In the following example, the attachment is an RAM text file:
AT+QFUPL="RAM:test_mms.txt",100,200,1 //Upload a file to RAM. The file will be saved as
test_mms.txt and the maximum size of file is 100
LTE_Standard_MMS_Application_Note 15 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
OK
AT+QFLST="RAM:*" //Query the file list of RAM.
+QFLST: "RAM:test_mms.txt",100
OK
AT+QMMSCFG="character","ASCII" //Set the charset as "ASCII" for RAM:test_mms.txt.
OK
AT+QMMSEDIT=5,1,"RAM:test_mms.txt" //Add attachments for the MMS message.
OK
AT+QMMSEDIT=5 //Query the attachments.
+QMMSEDIT: 5,"RAM:test_mms.txt"
OK
//In the following example, the attachment is an RAM JPG file:
AT+QFUPL="RAM:test_pic.jpg",200,300,1 //Upload a file to RAM. The file will be saved as
test_pic.jpg and the maximum size of file is 200 bytes.
300 indicates timeout value, and 1 indicates ACK mode.
For more details, please refer to
Quectel_LTE_Standard_FILE_Application_Note.
CONNECT
<Input 200 bytes data>
+QFUPL: 200,0
OK
AT+QFLST="RAM:*" //Query the file list of RAM.
+QFLST: "RAM:test_mms.txt",100
+QFLST: "RAM:test_pic.jpg",200
OK
AT+QMMSEDIT=5,1,"RAM:test_pic.jpg" //RAM:test_pic.jpg is not a text file. There is no need to
specify the character set.
OK
AT+QMMSEDIT=5 //Query the attachments.
+QMMSEDIT: 5,"RAM:test_mms.txt"
+QMMSEDIT: 5,"RAM:test_pic.jpg"
OK
LTE_Standard_MMS_Application_Note 16 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
//Delete the content, recipients, CC recipients, BCC recipients, title and attachments of an MMS message
by AT+QMMSEDIT=0.
AT+QMMSEDIT=0 //Clear all contents of the MMS message.
OK
LTE_Standard_MMS_Application_Note 17 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
OK
//Step 2: Configure the URL and proxy of MMSC.
AT+QMMSCFG="mmsc","mmsc.myuni.com" //Configure the URL of MMSC. "mmsc.myuni.com"
is for China Unicom.
OK
AT+QMMSCFG="mmsc" //Query the URL of MMSC.
+QMMSCFG: "mmsc","mmsc.myuni.com"
OK
AT+QMMSCFG="proxy","10.0.0.172",80 //Configure the proxy address and port of MMSC.
"10.0.0.172:80" is for China Unicom.
OK
AT+QMMSCFG="proxy" //Query the proxy address and port of MMSC.
+QMMSCFG: "proxy","10.0.0.172",80
OK
//Step 3: Configure sending parameters.
AT+QMMSCFG="sendparam",6,2,0,0,2,4 //Configure the sending parameters.
OK
AT+QMMSCFG="sendparam" //Query the sending parameters.
+QMMSCFG: "sendparam",6,2,0,0,2,4
OK
//Step 4: Edit the MMS message.
AT+QMMSEDIT=1,1,"13856122546" //Add a phone number as a recipient.
OK
AT+QMMSEDIT=2,1,"[email protected]" //Add an email address as a CC recipient.
OK
AT+QMMSEDIT=3,1,"[email protected]" //Add an email address as a BCC recipient.
OK
AT+QMMSEDIT=1 //Query the recipient address.
+QMMSEDIT: 1,"13856122546"
OK
AT+QMMSEDIT=2 //Query the CC recipient address.
LTE_Standard_MMS_Application_Note 18 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
+QMMSEDIT: 2,"[email protected]"
OK
AT+QMMSEDIT=3 //Query the BCC recipient address.
+QMMSEDIT: 3,"[email protected]"
OK
AT+QMMSCFG="character","ASCII" //Configure the character type as ASCII for title.
OK
AT+QMMSEDIT=4,1,"test EM05 mms" //Edit the title of the MMS message.
OK
AT+QMMSEDIT=4 //Query the title of the MMS message.
+QMMSEDIT: 4,"ASCII","test EM05 mms"
OK
//Add attachments.
AT+QFUPL="RAM:test_ram.txt",100,300,1 //Upload a file to RAM. The file will be saved as
test_ram.txt and the maximum size of file is 100
bytes. 300 indicates timeout value, and 1
indicates ACK mode. For more details, please
refer to
Quectel_LTE_Standard_FILE_Application_Note.
CONNECT
<Input 100 bytes data>
+QFUPL: 100,0
OK
AT+QFLST="RAM:* " //Query the file list of RAM.
+QFLST: "RAM:test_ram.txt",100
OK
AT+QMMSCFG="character","ASCII" //Configure the character type as ASCII for
RAM:test_ram.txt.
OK
AT+QMMSEDIT=5,1,"RAM:test_ram.txt" //Add attachments for the MMS message.
test_ram.txt is an RAM file.
OK
AT+QMMSEDIT=5 //Query the attachments.
+QMMSEDIT: 5,"RAM:test_ram.txt"
OK
AT+QFUPL="RAM:test_pic.jpg",200,300,1 //Upload a file to RAM. The file will be saved as
test_pic.jpg and the maximum size of file is 200
bytes. 300 indicates timeout value, and 1
LTE_Standard_MMS_Application_Note 19 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
OK
AT+QFLST="RAM:*"
+QFLST: "RAM:test_ram.txt",100 //Query the file list of RAM.
+QFLST: "RAM:test_pic.jpg",200
OK
AT+QMMSEDIT=5,1,"RAM:test_pic.jpg" //RAM:test_pic.jpg is not a text file. There is no
need to specify the character set.
OK
AT+QMMSEDIT=5 //Query the attachments.
+QMMSEDIT: 5,"RAM:test_ram.txt"
+QMMSEDIT: 5,"RAM:test_pic.jpg"
OK
//Step 5: Send the MMS message.
AT+QMMSEND=100 //Send the MMS message.
OK
OK
LTE_Standard_MMS_Application_Note 20 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
4 Error Handling
When executing MMS AT commands, if response "ERROR" is received from the module, please check
whether the (U)SIM card is inserted, and whether it is +CPIN: READY returned when executing
AT+CPIN?.
If it is failed to activate a PDP context by AT+QIACT command, please check the following configurations:
1. Query whether PS domain is attached or not by AT+CGATT? command. If not, please execute
AT+CGATT=1 to attach PS domain.
2. Query the PS domain status by AT+CGREG? command and make sure the PS domain has been
registered.
3. Query the PDP context parameters by AT+QICSGP command and make sure the APN of specified
PDP context has been set.
4. Make sure the specified PDP context ID is neither used by PPP nor activated by AT+CGACT
command.
5. According to 3GPP specifications, the module only supports three PDP contexts activated
simultaneously, so customers must make sure the number of activated PDP contexts is less than 3.
If all above configurations are correct, but activating the PDP context by AT+QIACT command still fails,
please reboot the module to resolve this issue. After rebooting the module, please execute the
configurations mentioned above for at least three times and each time at an interval of 10 minutes to
avoid frequently rebooting the module.
LTE_Standard_MMS_Application_Note 21 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
deactivate the PDP context by AT+QIDEACT command and re-activate it by AT+QIACT command, then
send the MMS message again.
LTE_Standard_MMS_Application_Note 22 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
<err> Meaning
762 No recipient
LTE_Standard_MMS_Application_Note 23 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
775 Timeout
LTE_Standard_MMS_Application_Note 24 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
<httprsp> Meaning
200 OK
403 Forbidden
409 Conflict
LTE_Standard_MMS_Application_Note 25 / 26
LTE Standard Module Series
LTE Standard MMS Application Note
7 Appendix A References
Abbreviation Description
CC Carbon Copy
SD Secure Digital
LTE_Standard_MMS_Application_Note 26 / 26