0% found this document useful (0 votes)
92 views

MMS AT Commands

Uploaded by

Ansar Ahmed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views

MMS AT Commands

Uploaded by

Ansar Ahmed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

LTE Standard MMS

Application Note

LTE Standard Module Series

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:

Quectel Wireless Solutions Co., Ltd.


Building 5, Shanghai Business Park Phase III (Area B), No.1016 Tianlin Road, Minhang District, Shanghai,
China 200233
Tel: +86 21 5108 6236
Email: [email protected]

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


http://www.quectel.com/support/sales.htm

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


http://www.quectel.com/support/technical.htm
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 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

About the Document

Revision History

Version Date Author Description


Duke XIN/
1.0 2017-12-08 Initial
Haley HUANG
1. Added AT command syntax (Chapter 1.2).
2. Added commands AT+QMMSCFG?,
AT+QMMSEDIT?, AT+QMMSEND? and
Domingo DENG/
1.1 2020-02-20 AT+QMMSCFG="connecttimeout" (Chapter 2).
Cara TAO
3. Added parameter <function_configure> and
updated the response description for
AT+QMMSEDIT (Chapter 2.2).

LTE_Standard_MMS_Application_Note 2 / 26
LTE Standard Module Series
LTE Standard MMS Application Note

Contents

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


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

1 Introduction ......................................................................................................................................... 5
1.1. The Process of Sending MMS Messages ................................................................................. 5
1.2. AT Command Syntax ................................................................................................................. 6

2 Description of MMS AT Commands .................................................................................................. 7


2.1. AT+QMMSCFG Configure Parameters of MMS ..................................................................... 7
2.2. AT+QMMSEDIT Edit MMS Messages .................................................................................. 10
2.3. AT+QMMSEND Send MMS Messages ................................................................................. 12

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

4 Error Handling ................................................................................................................................... 21


4.1. Executing MMS AT Commands Fails ...................................................................................... 21
4.2. PDP Activation Fails ................................................................................................................. 21
4.3. Error Response of AT+QMMSEND.......................................................................................... 21

5 Summary of <err> Code ................................................................................................................... 23

6 Description of HTTP(S) Response Codes ...................................................................................... 25

7 Appendix A References.................................................................................................................... 26

LTE_Standard_MMS_Application_Note 3 / 26
LTE Standard Module Series
LTE Standard MMS Application Note

Table Index

Table 1: Types of AT Commands and Responses ....................................................................................... 6


Table 2: Summary of Error Codes .............................................................................................................. 23
Table 3: Description of HTTP(S) Response Code ..................................................................................... 25
Table 4: Related Documents ...................................................................................................................... 26
Table 5: Terms and Abbreviations .............................................................................................................. 26

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.

This document is applicable to the following Quectel LTE Standard modules.

 EC2x (EC25, EC21, EC20 R2.0 and EC20 R2.1)


 EG9x (EG95 and EG91)
 EM05
 EG2x (EG25-G and EG21-G)

1.1. The Process of Sending MMS Messages

Step 1: Configure and activate a PDP context.


1) Configure <APN>, <username>, <password> and other parameters of a PDP context by
AT+QICSGP. For more details, please refer to
Quectel_LTE_Standard_TCP(IP)_Application_Note. If QoS settings need to be updated,
configure them by AT+CGQMIN, AT+CGEQMIN, AT+CGQREQ and AT+CGEQREQ commands.
For more details, please refer to Quectel_LTE_Standard_AT_Commands_Manual.
2) Activate the PDP context by AT+QIACT.
3) Configure the PDP context ID for MMS by AT+QMMSCFG="contextid",<contextID>.

Step 2: Configure URL and proxy of MMSC.


1) Configure the URL of MMSC by AT+QMMSCFG="mmsc",<URL>.
2) Configure the proxy of MMSC by AT+QMMSCFG="proxy",<gateway>,<port>.
3) Configure sending parameters by AT+QMMSCFG="sendparam",<valid>,<pri>,<sendrep>,
<visible>,<class>.

Step 3: Edit MMS messages.


1) Add recipients address by AT+QMMSEDIT=1,1,<optstring>.
2) Add CC recipients address by AT+QMMSEDIT=2,1,<optstring>.
3) Add BCC recipients address by AT+QMMSEDIT=3,1,<optstring>.
4) Edit the title by AT+QMMSEDIT=4,1,<optstring>. The character set should be specified as title
by AT+QMMSCFG="character",<charset> first.
5) Add attachments by AT+QMMSEDIT=5,1,<optstring>. The attachments can be RAM, UFS or
SD files. And the files can be uploaded to RAM, UFS or SD card by AT+QFUPL command. After

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.

1.2. AT Command Syntax

Table 1: Types of AT Commands and Responses

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 module.

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

2 Description of MMS AT Commands

2.1. AT+QMMSCFG Configure Parameters of MMS

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.

AT+QMMSCFG Configure Parameters of MMS


Test Command Response
AT+QMMSCFG=? +QMMSCFG: "contextid",(range of supported
<contextID>s)
+QMMSCFG: "mmsc",<URL>
+QMMSCFG: "proxy",<gateway>,(range of supported
<port>s)
+QMMSCFG: "character",(list of supported <charset>s)
+QMMSCFG: "sendparam"[,(range of supported
<valid>s),(range of supported <pri>s),(list of supported
<sendrep>s),(list of supported <readrep>s),(range of
supported <visible>s),(range of supported <class>s)]
+QMMSCFG: "supportfield",(list of supported <mode>s)
+QMMSCFG: "connecttimeout",(list of supported
<connect_timeout>s)

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

Write Command Response


AT+QMMSCFG="mmsc"[,<URL>] If <URL> is omitted, query the current settings:
+QMMSCFG: "mmsc",<URL>

OK

If <URL> is specified, configure MMSC URL:


OK
Or
+CME ERROR: <err>
Write Command Response
AT+QMMSCFG="proxy"[,<gateway>,<po If <gateway> and <port> are both omitted, query the
rt>] current settings:
+QMMSCFG: "proxy",<gateway>,<port>

OK

If <gateway> and <port> are specified, configure proxy


gateway and port:
OK
Or
+CME ERROR: <err>
Write Command Response
AT+QMMSCFG="character"[,<charset>] If <charset> is omitted, query the current settings:
+QMMSCFG: "character",<charset>

OK

If <charset> is specified, configure the character format:


OK
Or
+CME ERROR: <err>
Write Command Response
AT+QMMSCFG="sendparam"[,<valid>,< If <valid>, <pri>, <sendrep>, <readrep>, <visible>,
pri>,<sendrep>,<readrep>,<visible>,<cla <class> are all omitted, query the current settings:
ss>] +QMMSCFG: "sendparam",<valid>,<pri>,<sendrep>,<
readrep>,<visible>,<class>

OK

If <valid>, <pri>, <sendrep>, <readrep>, <visible>,


<class> are all specified:
OK
Or

LTE_Standard_MMS_Application_Note 8 / 26
LTE Standard Module Series
LTE Standard MMS Application Note

+CME ERROR: <err>

Write Command Response


AT+QMMSCFG="supportfield"[,<mode>] If <mode> is omitted, query the current settings:
+QMMSCFG: "supportfield",<mode>

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

If <connect_timeout> is specified, configure the timeout


for MMS TCP handshake:
OK
Or
+CME ERROR: <err>
The command takes effect immediately.
Characteristics
The configurations will not be saved.

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.

2.2. AT+QMMSEDIT Edit MMS Messages

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.

AT+QMMSEDIT Edit MMS Messages


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

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>

When <function>=0, delete all content about the MMS


message:
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>

When <function_configure>=1, <optstring> is


specified, which means setting the specified settings of
<function>:
OK
Or
+CME ERROR: <err>
The command takes effect immediately.
Characteristics
The configurations will not be saved.

Parameter

<function> Integer type. Function operation.


0 Delete all
1 Operate "TO address"
2 Operate "CC address"
3 Operate "BCC address"

LTE_Standard_MMS_Application_Note 11 / 26
LTE Standard Module Series
LTE Standard MMS Application Note

4 Operate MMS message title


5 Operate file as attachment
<function_configure> Integer type. Enable/disable <function>.
0 Delete the specified settings of <function>.
1 Set the specified settings of <function>.
<optstring> String type.
If <function>=1, 2 or 3, it is the recipient address. The maximum number of recipients
is 6. The maximum length of address is 50 bytes.
If <function>=4, it is the MMS message title. The maximum length of title is 200
bytes.
If <function>=5, it is the file name of attachment. If the file name is started with
"RAM", "UFS" or "SD" it indicates the file is from RAM, UFS or SD card respectively. It
is strongly recommended to use files from RAM as attachments. The max length of file
name is 80 bytes, the maximum number of attachments is 12, and the maximum size
of attachments is restricted by the operator.
<err> Integer type. The error code of the operation. Please refer to Chapter 5.

2.3. AT+QMMSEND Send MMS Messages

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.

AT+QMMSEND Send MMS Messages


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

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

3.1. Add Recipients

//Add phone number or email address as a recipient. The maximum number of recipients is 6.

AT+QMMSEDIT=1,1,"13856122546" //Add a phone number as a recipient.


OK
AT+QMMSEDIT=1,1,"recipient [email protected]" //Add an email address as a recipient.
OK
AT+QMMSEDIT=1 //Query the recipients address.
+QMMSEDIT: 1,"13856122546"
+QMMSEDIT: 1,"[email protected]"

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

3.2. Add CC Recipients or BCC Recipients

//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

3.3. Edit the Title of MMS Messages

//The character set of title is set by AT+QMMSCFG="character",<charset>. If the <charset> is "ASCII",


add the title as follows:
AT+QMMSCFG="character","ASCII" //Set the charset as "ASCII".
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
//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

3.4. Add Attachments

//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

bytes. 200 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_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 attachments by executing AT+QMMSEDIT=5,0.


AT+QMMSEDIT=5,0 //Delete attachments for the MMS message. All
attachments will be deleted.
OK
AT+QMMSEDIT=5 //Query the attachments.
OK
//After the MMS message is sent successfully, RAM files should be deleted by AT+QFDEL.
AT+QFDEL="RAM:test_mms.txt" //Delete the RAM file.
OK
AT+QFDEL="RAM:test_pic.jpg" //Delete the RAM file.
OK
AT+QFLST="RAM:*" //Query the file list of RAM.
OK

3.5. Clear all Contents of MMS Messages

//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

AT+QMMSEDIT=1 //Query recipients.


OK
AT+QMMSEDIT=2 //Query CC recipients.
OK
AT+QMMSEDIT=3 //Query BCC recipients.
OK
AT+QMMSEDIT=4 //Query title of the MMS message.
OK
AT+QMMSEDIT=5 //Query attachments.
OK

3.6. Send MMS Messages

//Step 1: Configure and activate a PDP context.


AT+QICSGP=1,1,"UNIWAP","" ,"",1 //Configure PDP context 1. APN is "UNIWAP" for
China Unicom.
OK
AT+QIACT=1 //Activate PDP context 1.
OK //Activated successfully.

LTE_Standard_MMS_Application_Note 17 / 26
LTE Standard Module Series
LTE Standard MMS Application Note

AT+QIACT? //Query the state of PDP context.


+QIACT: 1,1,1,"10.7.157.1"
OK
AT+QMMSCFG="contextid",1 //Set the PDP context ID as 1. The PDP context ID
must be activated first.
OK
AT+QMMSCFG="contextid" //Query the PDP context ID.
+QMMSCFG: "contextid",1

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

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:*"
+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

+QMMSEND: 0,200 //Indicate the result of sending the MMS message.


//Step 6: Clear content of the MMS message.

AT+QMMSEDIT=0 //Clear the content of the MMS message.

OK

AT+QFDEL="RAM:test_ram.txt" //Delete the RAM file.


OK
AT+QFDEL="RAM:test_pic.jpg" //Delete the RAM file.
OK

LTE_Standard_MMS_Application_Note 20 / 26
LTE Standard Module Series
LTE Standard MMS Application Note

4 Error Handling

4.1. Executing MMS AT Commands Fails

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?.

4.2. PDP Activation Fails

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.

4.3. Error Response of AT+QMMSEND

+QMMSEND: <err>,<httprsp>[,<mmsrsp>] will be returned after executing AT+QMMSEND. If <err> is


not 0, it indicates that MMS sending failed, and please resend it. If resending is not successful, please

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

5 Summary of <err> Code


The error code <err> indicates an error related to mobile equipment or network. The details about <err>
are described in the following table.

Table 2: Summary of Error Codes

<err> Meaning

751 Unknown error

752 URL length error

753 URL error

754 Invalid proxy type

755 Proxy address error

756 Invalid parameter

757 Recipient address full

758 CC recipient address full

759 BCC recipient address full

760 Attachments full

761 File error

762 No recipient

763 File not found

764 MMS busy

765 Server response failed

766 Error response of HTTP(S) post

767 Invalid report of HTTP(S) post

LTE_Standard_MMS_Application_Note 23 / 26
LTE Standard Module Series
LTE Standard MMS Application Note

768 PDP activation failed

769 PDP deactivated

770 Socket creation failed

771 Socket connection failed

772 Socket read failed

773 Socket write failed

774 Socket closed

775 Timeout

776 Encode data error

777 HTTP(S) decode data error

LTE_Standard_MMS_Application_Note 24 / 26
LTE Standard Module Series
LTE Standard MMS Application Note

6 Description of HTTP(S) Response


Codes
The HTTP(S) protocol error code <httprsp> indicates an error replied from MMSC. Please refer to
RFC2616 (Hypertext Transfer Protocol--HTTP/1.1). The details about <httprsp> are described in the
following table.

Table 3: Description of HTTP(S) Response Code

<httprsp> Meaning

200 OK

400 Bad request

403 Forbidden

404 Not found

409 Conflict

411 Length required

500 Internal server error

502 Bad gate way

LTE_Standard_MMS_Application_Note 25 / 26
LTE Standard Module Series
LTE Standard MMS Application Note

7 Appendix A References

Table 4: Related Documents

SN. Document Name Remark

Wap MMS protocol standard package


[1] Wap-209-mmsencapsulation-20020105-a
of documents

[2] RFC2616 Hypertext transfer protocol--HTTP/1.1

[3] Quectel_LTE_Standard_FILE_Application_Note LTE Standard FILE Application Note

Introduction about LTE Standard


[4] Quectel_LTE_Standard_TCP(IP)_Application_Note
TCP/IP Application Note
AT commands manual for LTE
[5] Quectel_LTE_Standard_AT_Commands_Manual
Standard modules

Table 5: Terms and Abbreviations

Abbreviation Description

BCC Blind Carbon Copy

CC Carbon Copy

HTTP Hypertext Transfer Protocol

MMS Multimedia Messaging Service

MMSC Multimedia Messaging Service Center

PDP Packet Data Protocol

SD Secure Digital

UFS User File Storage

URL Uniform Resource Locator

LTE_Standard_MMS_Application_Note 26 / 26

You might also like