Quectel EC2x&EG9x&EM05 DFOTA User Guide V1.0

Quectel_EC2x%26EG9x%26EM05_DFOTA_User_Guide_V1.0

Quectel_EC2x%26EG9x%26EM05_DFOTA_User_Guide_V1.0

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 17

DownloadQuectel EC2x&EG9x&EM05 DFOTA User Guide V1.0
Open PDF In BrowserView PDF
EC2x&EG9x&EM05 DFOTA
User Guide
LTE Module Series
Rev. Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide_V1.0
Date: 2018-01-12
Status: Released

www.quectel.com

LTE Module Series
EC2x&EG9x&EM05 DFOTA User Guide

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: info@quectel.com

Or our local office. For more information, please visit:
http://quectel.com/support/sales.htm

For technical support, or to report documentation errors, please visit:
http://quectel.com/support/technical.htm
Or Email to: support@quectel.com

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. 2018. All rights reserved.

Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide

1 / 16

LTE Module Series
EC2x&EG9x&EM05 DFOTA User Guide

About the Document
History
Revision

Date

Author

Description

1.0

2018-01-12

Ramos ZHANG/
Demi QU

Initial

Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide

2 / 16

LTE Module Series
EC2x&EG9x&EM05 DFOTA User Guide

Contents
About the Document ................................................................................................................................... 2
Contents ....................................................................................................................................................... 3
Table Index ................................................................................................................................................... 4
1

Introduction .......................................................................................................................................... 5

2

Firmware Upgrade Procedure via DFOTA ......................................................................................... 6
2.1. Get Delta Firmware Package ...................................................................................................... 7
2.2. Put Delta Package on FTP/HTTP(S) Server .............................................................................. 7
2.3. Execute AT Command to Upgrade the Firmware ....................................................................... 7

3

Description of DFOTA AT Commands ............................................................................................... 8
3.1. AT+QFOTADL= Upgrade Firmware When Delta Package is Stored on FTP Server8
3.2. AT+QFOTADL= Upgrade Firmware When Delta Package is Stored on HTTP(S)
Server ………………………………………………………………………………………………………… 10
3.3. AT+QFOTADL= Upgrade Firmware When Delta Package is Stored on Local File
System ................................................................................................................................................. 11

4

Abnormalities and Important Note ................................................................................................... 13
4.1. Abnormalities ............................................................................................................................ 13
4.1.1. Wrong Delta Firmware Package .................................................................................... 13
4.1.2. Failure of Firmware Upgrade ......................................................................................... 13
4.2. Important Note .......................................................................................................................... 14

5

Summary of error Codes ................................................................................................................... 15

6

Appendix A References..................................................................................................................... 16

Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide

3 / 16

LTE Module Series
EC2x&EG9x&EM05 DFOTA User Guide

Table Index
TABLE 1: SUMMARY OF ,  AND  CODES ................................................ 15
TABLE 2: RELATED DOCUMENTS .................................................................................................................. 16
TABLE 3: TERMS AND ABBREVIATIONS ........................................................................................................ 16

Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide

4 / 16

LTE Module Series
EC2x&EG9x&EM05 DFOTA User Guide

1

Introduction

Quectel EC2x&EG9x&EM05 modules support DFOTA (Delta Firmware Upgrade Over-the-air) function,
which allows customers to upgrade the firmware over the air. It can upgrade the firmware to a new version,
and revert to the old version as well.
Before firmware upgrading, customers only need to prepare the firmware package which contains the
differences between the original and target firmware versions. This reduces the amount of data
transmitted and accelerates the speed of firmware upgrade.
This document is applicable to following Quectel modules:




EC2x (including EC25, EC21, EC20 R2.0 and EC20 R2.1)
EG9x (including EG91 and EG95)
EM05

Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide

5 / 16

LTE Module Series
EC2x&EG9x&EM05 DFOTA User Guide

2

Firmware Upgrade Procedure via
DFOTA

The following chart illustrates the firmware upgrade procedure via DFOTA.

FTP/HTTP(S)
Server
2. Put the package on FTP/HTTP (S) server

1. Get delta firmware package
LTE/WCDMA/
GSM/GPRS
(FTP/HTTP(S))
4. Automatically download
from FTP/HTTP(S) server via
LTE/WCDMA/GSM/GPRS
network

Ext.
MCU

3. Execute AT+QFOTADL
command

Quectel
Module
5. Automatically
upgrade the
module’s firmware

Figure 1: Firmware Upgrade Procedure via DFOTA

As shown in the above figure, customers only need to perform the following steps to upgrade the
firmware.

Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide

6 / 16

LTE Module Series
EC2x&EG9x&EM05 DFOTA User Guide

Step 1: Get the delta firmware package from Quectel.
Step 2: Put the delta firmware on FTP/HTTP(S) server.
Step 3: Execute AT+QFOTADL command. Then the module will automatically download the package
from FTP/HTTP(S) server via LTE/WCDMA/GSM/GPRS network (Step 4) and finally
automatically upgrade the module’s firmware (Step 5).

2.1. Get Delta Firmware Package
Before upgrading, customers need to check the current firmware version (the original version) by
executing ATI command, and also need to know the target firmware version. Then the two firmware
versions should be provided for Quectel or the module supplier, to get the delta firmware package.

2.2. Put Delta Package on FTP/HTTP(S) Server
When using the DFOTA function, customers need to setup an FTP/HTTP(S) server by themselves, for
Quectel does not provide such a server. Then please put the delta firmware package on the server, and
record the FTP/HTTP(S) path. The module will get the delta package from the path after executing
corresponding AT command.

2.3. Execute AT Command to Upgrade the Firmware
After putting the delta firmware package on the FTP/HTTP(S) server, customers need to execute
AT+QFOTADL command. Then the module will download the firmware package from the FTP/HTTP(S)
server over the air and upgrade the firmware automatically. For more details, please refer to Chapter 3.

Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide

7 / 16

LTE Module Series
EC2x&EG9x&EM05 DFOTA User Guide

3

Description of DFOTA AT Commands

AT+QFOTADL command enables automatic firmware upgrade for module via DFOTA. After executing the
command, the module will automatically download the package from FTP/HTTP(S) server, reboot
automatically and then enter into recovery mode. When the upgrade package is checked OK and the
firmware upgrade is successful, the module will reboot and enter into normal mode.

AT+QFOTADL Upgrade Firmware via DOFTA
Test Command
AT+QFOTADL=?

Response
OK

3.1. AT+QFOTADL=

Upgrade Firmware When Delta Package is

Stored on FTP Server
If the delta firmware package is stored on an FTP server, AT+QFOTADL= should be executed to
enable automatic firmware upgrade via DFOTA. Then the module will download the delta package from
the FTP server over the air and upgrade the firmware automatically.

AT+QFOTADL=
Server
Write Command
AT+QFOTADL=

Upgrade Firmware When Delta Package is Stored on FTP
Response
OK
+QIND: "FOTA","FTPSTART"
+QIND: "FOTA","FTPEND",
+QIND: "FOTA","START"
+QIND: "FOTA","UPDATING",
+QIND: "FOTA","UPDATING",
...
+QIND: "FOTA","END",
If there is any error, response:
ERROR

Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide

8 / 16

LTE Module Series
EC2x&EG9x&EM05 DFOTA User Guide

Parameter










String format. The max length is 255 bytes. It should be started with "FTP://", for
example: “FTP://:@:/”.
String type. The user name for authentication. The maximum size of the
parameter is 50 bytes.
String type. The password for authentication. The maximum size of the parameter
is 50 bytes.
String type. The IP address or domain name of the FTP server. The maximum
size of the parameter is 50 bytes.
Integer type. The port of the FTP server. The default value is 21. The range is
1-65535.
String type. The file name on FTP server. The maximum size of the parameter is
50 bytes.
Integer type. The FTP error code. 0 means upgraded successfully. Please refer to
Chapter 5 for details.
Integer type. The upgrade progress in percentage.
Integer type. 0 means upgraded successfully. Any other value means an error.
Please refer to Chapter 5 for details.

Example
//Upgrade firmware when delta firmware package is stored on an FTP server.
//The FTP server address is “ftp://test:test@124.74.41.170:21/Jun/update-v12-to-v13.zip".
//Execute AT+QFOTADL command to enable automatic firmware upgrade via DFOTA, and then the
module will start to download the delta package and upgrade firmware automatically.
AT+QFOTADL="ftp://test:test@124.74.41.170:21/Jun/update-v12-to-v13.zip"
OK
+QIND: "FOTA","FTPSTART"
//Start to download the delta package from FTP server.
+QIND: "FOTA","FTPEND",0
//Finish downloading the delta package.
//The module will reboot and the USB port will be re-initialized. If the current port is USB port, MCU should
close and reopen it.
+QIND: "FOTA","START"
+QIND: "FOTA","UPDATING",1
+QIND: "FOTA","UPDATING",2
...
+QIND: "FOTA","UPDATING",100
+QIND: "FOTA","END",0

//Start to upgrade the firmware.

//Finish upgrading the firmware.

Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide

9 / 16

LTE Module Series
EC2x&EG9x&EM05 DFOTA User Guide

3.2. AT+QFOTADL=

Upgrade Firmware When Delta Package

is Stored on HTTP(S) Server
If the delta firmware package is stored on an HTTP(S) server, AT+QFOTADL= command
should be executed to enable automatic firmware upgrade via DFOTA. Then the module will download
the delta package from the HTTP(S) server over the air and upgrade the firmware automatically.

AT+QFOTADL=
HTTP(S) Server
Write Command
AT+QFOTADL=

Upgrade Firmware When Delta Package is Stored on
Response
OK
+QIND: "FOTA","HTTPSTART"
+QIND: "FOTA","HTTPEND",
+QIND: "FOTA","START"
+QIND: "FOTA","UPDATING",
+QIND: "FOTA","UPDATING",
...
+QIND: "FOTA","END",
If there is any error, response:
ERROR

Parameter


String format. The max length is 255 bytes. It should be started with "http://" or
"https://". For example: “http://:/”.
 String type. The IP address or domain name of the HTTP(S) server.

Integer type. The port of the HTTP(S) server. The default value is 80. The range is
1-65535.

String type. The file name in HTTP(S) server.

Integer type. The HTTP(S) error code. 0 means upgraded successfully. Please
refer to Chapter 5 for details.

Integer type. The upgrade progress in percentage.

Integer type. 0 means upgraded successfully. Any other value means an error.
Please refer to Chapter 5 for details.

Example
//Upgrade firmware when delta firmware package is stored on an HTTP server.
//The HTTP server address is “http://www.quectel.com:100/update.zip".
//Execute AT+QFOTADL command to enable automatic firmware upgrade via DFOTA, and then the

Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide

10 / 16

LTE Module Series
EC2x&EG9x&EM05 DFOTA User Guide

module will start to download the delta package and upgrade firmware automatically.
AT+QFOTADL="http://www.quectel.com:100/update.zip"
OK
+QIND: "FOTA","HTTPSTART"
//Start to download the delta package from the HTTP server.
+QIND: "FOTA","HTTPEND",0
//Finish downloading the delta package.
//The module will be rebooted and the USB port will be re-initialized. If the current port is USB port, MCU
should close and reopen it.
+QIND: "FOTA","START"
+QIND: "FOTA","UPDATING",1
+QIND: "FOTA","UPDATING",2
...
+QIND: "FOTA","UPDATING",100
+QIND: "FOTA","END",0

//Start to upgrade the firmware.

//Finish upgrading the firmware.

3.3. AT+QFOTADL=

Upgrade Firmware When Delta Package

is Stored on Local File System
If the delta firmware package has already been stored in the module’s file system,
AT+QFOTADL= command should be executed to enable automatic firmware upgrade via
DFOTA. Then the module will download the delta package from the local file system over the air and
upgrade the firmware automatically.

AT+QFOTADL=
Local File System
Write Command
AT+QFOTADL=

Upgrade Firmware When Delta Package is Stored on
Response
OK
+QIND: "FOTA","START"
+QIND: "FOTA","UPDATING",
+QIND: "FOTA","UPDATING",
...
+QIND: "FOTA","END",
If there is any error, response:
ERROR

Parameter


String type. The max length is 90 bytes. It should be started with "/data/ufs/" in

Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide

11 / 16

LTE Module Series
EC2x&EG9x&EM05 DFOTA User Guide




UFS.
Integer type. The upgrade progress in percentage.
Integer type. 0 means upgraded successfully. Any other value means an error.
Please refer to Chapter 5 for details.

Example
//Upgrade firmware when delta firmware package is stored on local file system.
AT+QFOTADL="/data/ufs/update-v13-to-v12.zip"
OK
+QIND: "FOTA","START"
+QIND: "FOTA","UPDATING",1
+QIND: "FOTA","UPDATING",2
...
+QIND: "FOTA","UPDATING",100
+QIND: "FOTA","END",0

//Start to upgrade the firmware.

//Finish upgrading the firmware.

Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide

12 / 16

LTE Module Series
EC2x&EG9x&EM05 DFOTA User Guide

4

Abnormalities and Important Note

4.1. Abnormalities
4.1.1.

Wrong Delta Firmware Package

After executing AT+QFOTADL command and delta firmware package is downloaded, the module will
reboot automatically and then enter into recovery mode. The module checks the upgrade package first, if
there is something wrong with the package, the URC (+QIND: "FOTA","END",) of an error code (504,
505 or 510) will be reported, then the module will reboot automatically, enter into recovery mode and
re-check the package for maximally five times. If the package is still wrong after five retries, the module
will reboot and enter into normal mode. In such case, please confirm the delta firmware package and
re-put it on FTP/HTTP(S) server.

4.1.2.

Failure of Firmware Upgrade

After the upgrade package is checked OK, then it starts to upgrade firmware. If it is failed to upgrade the
firmware, the URC (+QIND: "FOTA","END",) of an error code (502, 511, 520-530 or 540-546) will be
reported, then the module will reboot automatically, enter into recovery mode and retry to upgrade for
maximally five times. If upgrade is still unsuccessful after five retries, the module will stop firmware
upgrade and restore to the original version.

NOTE
During an upgrading process, once the delta firmware package is downloaded, the module can only retry
for maximally five times in total, among which retry times for package checking and firmware upgrading
are both included.
As mentioned in Chapter 2, it is a completely automatic process after executing AT+QFOTADL command.
Therefore, any +QIND: "FOTA","END", URCs sent from the module to the Ext. MCU can be ignored.

Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide

13 / 16

LTE Module Series
EC2x&EG9x&EM05 DFOTA User Guide

4.2. Important Note
The URC of +QIND: "FOTA","START" indicates the firmware upgrade process really starts. If the Ext.
MCU receives this URC after executing AT+QFOTADL command, please do NOT power off the module
until the firmware is upgraded successfully and +QIND: "FOTA","END",0 is received. Then the module will
reboot and enter into normal mode automatically.
During upgrading process, if the Ext. MCU does not receive any URC in four minutes after the last URC is
returned, then the module can be rebooted.
Meanwhile, it is recommended to set a flag on Ext. MCU to mark the task of the firmware upgrading, and
clean it after successful upgrading.

Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide

14 / 16

LTE Module Series
EC2x&EG9x&EM05 DFOTA User Guide

5

Summary of error Codes

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

Table 1: Summary of ,  and  Codes


Meaning

0

FTP download operation successful

601

FTP unknown error



Meaning

0

HTTP(S) download operation successful

701

HTTP(S) unknown error



Meaning

0

DFOTA upgrade successful

502

The upgrade process exits for some unpredictable errors

504

Something wrong with the upgrade package file

505

Something wrong with the upgrade package file

510

The patch does not match the source file in the module, need to check whether the
upgrade package is wrong.

511

The file system has no enough space for upgrading

520-530,
540-546

Firmware upgrading failed

Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide

15 / 16

LTE Module Series
EC2x&EG9x&EM05 DFOTA User Guide

6

Appendix A References

Table 2: Related Documents
SN

Document Name

Remark

[1]

Quectel_EC25&EC21_AT_Commands_Manual

EC25&EC21 AT commands manual

[2]

Quectel_EC20_R2.0_AT_Commands_Manual

EC20 R2.0 AT commands manual

[3]

Quectel_EC20_R2.1_AT_Commands_Manual

EC20 R2.1 AT commands manual

[4]

Quectel_EG9x_AT_Commands_Manual

EG91 and EG95 AT commands manual

[5]

Quectel_EM05_AT_Commands_Manual

EM05 AT commands manual

Table 3: Terms and Abbreviations
Abbreviation

Description

DFOTA

Delta Firmware Upgrade Over the Air

Ext. MCU

External Microprogrammed Control Unit

FTP

File Transfer Protocol

GPRS

General Packet Radio Service

HTTP

Hyper Text Transport Protocol

LTE

Long Term Evolution

SD

Secure Digital

UFS

User File System

WCDMA

Wideband Code Division Multiple Access

Quectel_EC2x&EG9x&EM05_DFOTA_User_Guide

16 / 16



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.6
Linearized                      : No
Encryption                      : Standard V4.4 (128-bit)
User Access                     : Print, Copy, Extract, Print high-res
Author                          : kelly
Create Date                     : 2018:01:12 17:10:01+08:00
Modify Date                     : 2018:01:12 17:13:03+08:00
Language                        : zh-CN
XMP Toolkit                     : Adobe XMP Core 4.2.1-c041 52.342996, 2008/05/07-20:48:00
Format                          : application/pdf
Creator                         : kelly
Creator Tool                    : Microsoft® Word 2013
Metadata Date                   : 2018:01:12 17:13:03+08:00
Producer                        : Microsoft® Word 2013
Document ID                     : uuid:3112b9c1-580b-4930-8b8c-9b62b6972f1a
Instance ID                     : uuid:404fb187-9b2a-4890-b792-e6fb31c7db39
Page Mode                       : UseOutlines
Page Count                      : 17
EXIF Metadata provided by EXIF.tools

Navigation menu