MC65&M65&M08-R: DFOTA Application Note
MC65&M65&M08-R: DFOTA Application Note
Rev. MC65&M65&M08-R_DFOTA_Application_Note_V1.0
Date: 2020-07-08
Status: Released
www.quectel.com
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA 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.
MC65&M65&M08-R_DFOTA_Application_Note 1 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
Revision History
Oven TAO/
1.0 2020-07-08 Initial
Simon HU
MC65&M65&M08-R_DFOTA_Application_Note 2 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
Contents
1 Introduction .......................................................................................................................................... 6
4 Examples ............................................................................................................................................ 15
4.1. DFOTA over HTTP .................................................................................................................... 15
4.2. DFOTA over Local File System ................................................................................................. 16
6 Appendix A References..................................................................................................................... 19
MC65&M65&M08-R_DFOTA_Application_Note 3 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
Table Index
MC65&M65&M08-R_DFOTA_Application_Note 4 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
Figure Index
MC65&M65&M08-R_DFOTA_Application_Note 5 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
1 Introduction
Quectel MC65&M65&M08-R modules support DFOTA (Delta Firmware Upgrade Over-The-Air) function,
which allows you to upgrade or downgrade the firmware wirelessly. This document mainly describes how
to upgrade the firmware of Quectel MC65&M65&M08-R modules via DFOTA.
Before firmware updating, a delta firmware package which contains only the differences between the
source and the target firmware versions has to be obtained. In this way, the amount of data transmitted
and the time taken can be reduced.
NOTE
For MC65&M65&M08-R modules, the maximum number of DFOTA is 800. It is recommended not to
upgrade the firmware frequently because the Flash may be damaged when the number of DFOTA
exceeds 800.
MC65&M65&M08-R_DFOTA_Application_Note 6 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
The following chart illustrates the DFOTA procedure when the firmware package is stored on an HTTP
server.
HTTP
Server
MC65&M65&M08-R_DFOTA_Application_Note 7 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
As shown in the above figure, the following steps need to be performed to update the firmware when the
firmware package is stored on an HTTP server:
Before updating, check the source firmware version with ATI command and confirm the target firmware
version, and then send the two firmware versions to Quectel or the module agents to get a delta firmware
package.
Since Quectel does not provide such servers, an HTTP server needs to be established before using
DFOTA function. Then put the delta firmware package on the server, and record the storage path.
Before firmware upgrading, check whether the module has registered on the network after it is powered
on.
For more details about the above commands, please refer to document [1].
If the module has registered on the network, the PDP context can be configured and activated, otherwise
please check the insertion of the (U)SIM card and the connection of Antenna. If needed, please contact
Quectel Technical Supports Team.
MC65&M65&M08-R_DFOTA_Application_Note 8 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
After module registers on the network, configure and activate the PDP context to get IP address.
For more details about the above commands, please refer to document [1].
After getting the IP address, execute AT+QFOTADL command and then the module will download the
delta firmware package from the HTTP server wirelessly and upgrade the firmware. For more details
about this command, please refer to Chapter 3.
The following chart illustrates the DFOTA procedure when the firmware package is stored on local file
system.
MC65&M65&M08-R_DFOTA_Application_Note 9 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
Before updating, check the source firmware version with ATI command and confirm the target firmware
version, and then send the two firmware versions to Quectel or the module agents to get a delta firmware
package.
For more details about this command, please refer to document [2].
After the delta is uploaded, execute AT+QFOTADL command to upgrade the firmware.
MC65&M65&M08-R_DFOTA_Application_Note 10 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
When the delta firmware package is stored on HTTP server, executing AT+QFOTADL=<HTTP_URL> will
make the module download the delta firmware package from the HTTP server. If downloading is
successful, the module will update the firmware. When updating completes successfully, the module will
reboot, otherwise it will return an error, exit from DFOTA and continue to run on the source firmware
version.
+QIND: "FOTA","HTTPSTART"
+QIND: "FOTA","DOWNLOADING",<percent>
+QIND: "FOTA","DOWNLOADING",<percent>
...
+QIND: "FOTA","HTTPEND",<FOTA_err>
+PDP DEACT
+QIND: "FOTA","START"
+QIND: "FOTA","UPDATING",<percent>
+QIND: "FOTA","UPDATING",<percent>
...
+QIND: "FOTA","END",<FOTA_err>
MC65&M65&M08-R_DFOTA_Application_Note 11 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
Parameter
<HTTP_URL> String format. The max length is 255 bytes. It should be started with
“HTTP://”, for example:
“HTTP://<HTTP_server_URL>/<HTTP_port>/<HTTP_file_path>”.
<HTTP_server_URL> String type. The IP address or domain name of the HTTP server.
<HTTP_port> Integer type. The port of the HTTP server. Range: 1-65535. Default value: 80.
<HTTP_file_path> String type. The file name in HTTP server.
<FOTA_err> Integer type. The error code during downloading or upgrading.
0 Downloaded or updated successfully.
Others Error code. Please refer to Chapter 5 for more details.
<percent> Integer type. The download or upgrade progress in percentage. Range:
1-100. Unit: %.
NOTE
If the module is powered off during +QIND: "FOTA","UPDATING",<percent>, process, the module will
automatically enter forced upgrade mode. When it is powered on next time, it will continue to update. The
update interface is shown as below:
+QIND: "FOTA","START"
+QIND: "FOTA","UPDATING",2%
+QIND: "FOTA","UPDATING",4%
...
+QIND: "FOTA","END",0
MC65&M65&M08-R_DFOTA_Application_Note 12 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
When the delta firmware package is stored on Local File System, executing AT+QFOTADL=<para> will
make the module update the firmware. When updating completes successfully, the module will reboot,
otherwise it will return an error, exit from DFOTA and continue to run on the source firmware version.
+QIND: "FOTA","START"
+QIND: "FOTA","UPDATING",<percent>
+QIND: "FOTA","UPDATING",<percent>
...
+QIND: "FOTA","END",<FOTA_err>
Parameter
NOTES
MC65&M65&M08-R_DFOTA_Application_Note 13 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
+QIND: "FOTA","UPDATING",2%
+QIND: "FOTA","UPDATING",4%
...
+QIND: "FOTA","END",0
MC65&M65&M08-R_DFOTA_Application_Note 14 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
4 Examples
+CGREG: 0,1
+CPIN: READY
OK
AT+QIFGCNT=0
OK
AT+QICSGP=1,"CMNET" //Configure the PDP context.
OK
AT+QIREGAPP
OK
AT+QIACT //Activate the PDP context to get IP address.
OK
//Execute AT+QFOTADL command to enable DFOTA over HTTP, and then the module will start to
download the delta firmware package and update firmware.
AT+QFOTADL="http://www.quectel.com:8111/DFOTA/A2B.pack"
OK
+QIND: "FOTA","DOWNLOADING",10%
...
+QIND: "FOTA","DOWNLOADING",100%
MC65&M65&M08-R_DFOTA_Application_Note 15 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
+PDP DEACT
+QIND: "FOTA","UPDATING", 4%
...
+QIND: "FOTA","UPDATING", 100%
//Execute AT+QFUPL command to upload the delta firmware package to the local file system.
+QFUPL: 156104,4300
OK
//Execute AT+QFOTADL to enable DFOTA over Local File System, and then the module will start to
upgrade firmware.
AT+QFOTADL=1
OK
+QIND: "FOTA","UPDATING", 4%
...
+QIND: "FOTA","UPDATING", 100%
MC65&M65&M08-R_DFOTA_Application_Note 16 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
MC65&M65&M08-R_DFOTA_Application_Note 17 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
<FOTA_err> Meaning
6509 No memory
MC65&M65&M08-R_DFOTA_Application_Note 18 / 19
GSM/GPRS/GNSS Module Series
MC65&M65&M08-R DFOTA Application Note
6 Appendix A References
Abbreviation Description
IP Internet Protocol
MC65&M65&M08-R_DFOTA_Application_Note 19 / 19