Quectel BC65&BC92&BC95-GR DFOTA Upgrade Guide

NB-IoT Module Series

Version: 1.2

Date: 2024-09-25

Status: Released

Contact Information and Legal Notices

Quectel Wireless Solutions Co., Ltd.
Building 5, Shanghai Business Park Phase III (Area B), No.1016 Tianlin Road, Minhang District, Shanghai 200233, China
Tel: +86 21 5108 6236
Email: info@quectel.com

For more information on local offices, 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: support@quectel.com.

Legal Notices

The information provided is based on your requirements and Quectel makes every effort to ensure its quality. Users are responsible for using independent analysis and evaluation in designing intended products. Reference designs are provided for illustrative purposes only. Before using any hardware, software, or service guided by this document, please read this notice carefully. Quectel provides this document and related services on an "as available" basis and may revise it at its sole discretion without prior notice.

Use and Disclosure Restrictions

License Agreements

Documents and information provided by Quectel shall be kept confidential unless specific permission is granted and shall not be accessed or used for any purpose except as expressly provided herein.

Copyright

Quectel and third-party products may contain copyrighted material. Such material shall not be copied, reproduced, distributed, merged, published, translated, or modified without prior written consent. Quectel and the third party hold exclusive rights over copyrighted material. No license is granted under any patents, copyrights, trademarks, or service mark rights. Purchasing in any form does not grant a license other than the normal non-exclusive, royalty-free license to use the material. Quectel reserves the right to take legal action for noncompliance with these requirements.

Trademarks

This document does not confer any rights to use any trademark, trade name, name, abbreviation, or counterfeit product thereof owned by Quectel or any third party in advertising, publicity, or other aspects.

Third-Party Rights

This document may refer to hardware, software, and/or documentation owned by third parties. Use of such third-party materials is governed by all applicable restrictions and obligations. Quectel makes no warranty or representation, express or implied, regarding third-party materials, including but not limited to warranties of merchantability, fitness for a particular purpose, quiet enjoyment, system integration, information accuracy, and non-infringement of third-party intellectual property rights. Quectel does not represent or warrant to develop, enhance, modify, distribute, market, sell, offer for sale, or otherwise maintain production of its products or any other hardware, software, device, tool, information, or product. Quectel disclaims all warranties arising from the course of dealing or usage of trade.

Privacy Policy

To implement module functionality, certain device data may be uploaded to Quectel's or third-party's servers. Quectel, abiding by relevant laws and regulations, will retain, use, and disclose relevant data solely for performing the service or as permitted by applicable laws. Users should be informed of third parties' privacy and data security policies before data interaction.

Disclaimer

About the Document

Revision History

Version Date Author Description
- 2020-04-13 Fonda FANG Creation of the document
1.0 2020-04-13 Fonda FANG First official release
1.1 2023-10-20 Miles MA Added the applicable module BC95-GR. Updated the document name from "Application Note" to "Upgrade Guide".
1.2 2024-09-25 Howie DONG Added the chapter of DFOTA implementation and user responsibility (Chapter 1.1). Optimized the DFOTA firmware upgrade flowchart to distinguish between the user side and the Quectel side (Figure 1). Optimized the description of the DFOTA firmware upgrade steps and added relevant notes to distinguish between the user side and the Quectel side (Chapter 2). Updated the declaration of AT command examples (Chapter 3.2). Optimized the explanation of the parameters <HTTP_server_URL> and <HTTP_URL> (Chapter 3.3.1 and Chapter 3.3.3). Updated the URL address and related instructions in the command example (Chapter 4).

Introduction

Quectel BC65, BC92, and BC95-GR modules support the DFOTA (Delta Firmware Over-The-Air) feature, which allows customers to upgrade or downgrade firmware wirelessly. In DFOTA, a delta firmware package, containing only the differences between the current and target firmware versions, is used. This reduces the amount of data transmitted and the time consumed. This document describes how to upgrade the firmware of Quectel BC65, BC92, and BC95-GR modules via DFOTA.

DFOTA Implementation and User Responsibility

Quectel follows industry best practices for module firmware updates by enabling users to offer DFOTA updates. Quectel does not have the ability to unilaterally push updates to users' devices; full control of the DFOTA process is handed to users. Quectel solely provides the updated firmware but cannot initiate DFOTA updates on users' devices. Users can determine when to push updates to the Quectel modules using the DFOTA mechanism by configuring parameters for updates hosted on their own infrastructures.

DFOTA Procedure

The following chart illustrates the firmware upgrade procedure via DFOTA when the firmware package is stored on an HTTP server.

Figure 1: DFOTA Procedure
This flowchart depicts the DFOTA process. On the User Side, a user's host obtains a delta firmware package from Quectel Technical Support or a user MCU file, uploads it to a user-owned HTTP server, and then sends an AT+QFOTADL command to trigger the automatic firmware upgrade on the module. On the Quectel Side, the module checks its network status (NB-IoT/GSM), automatically downloads the firmware package from the user-owned HTTP server via the NB-IoT/GSM network, and then automatically upgrades its firmware.

Customers need to perform the following steps to upgrade the firmware when the firmware package is stored on an HTTP server:

NOTE:

Acquire Delta Firmware Package

Before firmware upgrading, the current firmware version needs to be checked by executing ATI, and the target firmware version needs to be decided. Customers should then send the two firmware versions to Quectel Technical Support to obtain the corresponding firmware package.

Upload Delta Package to HTTP Server

NOTE: Please record the HTTP path (URL) to which the delta firmware package is uploaded for the AT+QFOTADL command in Chapter 3.

Check Network Status

After the module is powered on, ensure it is registered on the network before firmware upgrading.

Relevant AT commands are listed below:

Execute AT Command to Upgrade the Firmware

After the network status is confirmed to be ready, execute AT+QFOTADL on the host to initiate the automatic over-the-air download and upgrade of the module's delta firmware package. For more details about the DFOTA AT commands, please refer to Chapter 3.3.

Description of DFOTA AT Commands

AT Command Introduction

Definitions

AT Command Syntax

All command lines must start with AT or at and end with <CR>. Information responses and result codes always start and end with a carriage return character and a line feed character: <CR><LF><response><CR><LF>. In tables presenting commands and responses, only the commands and responses are presented, and <CR> and <LF> are deliberately omitted.

Command Type Syntax Description
Test Command AT+<cmd>=? Test the existence of the corresponding command and return information about the type, value, or range of its parameter.
Read Command AT+<cmd>? Check the current parameter value of the corresponding command.
Write Command AT+<cmd>=<p1>[,<p2>[,<p3>[...]]] Set user-definable parameter value.
Execution Command AT+<cmd> Return a specific information parameter or perform a specific action.

Declaration of AT Command Examples

The AT command examples in this document are provided to help users learn about the AT commands. The examples should not be taken as Quectel's recommendations for program flow or module status settings. Multiple examples for one AT command may be provided, but this does not imply correlation or a required sequence. URLs, domain names, IP addresses, usernames/accounts, and passwords in examples are for illustrative purposes only and should be modified to reflect actual usage and specific needs.

DFOTA AT Commands

The AT+QFOTADL command enables automatic firmware upgrade for Quectel modules via DFOTA. After execution, the package is downloaded from the HTTP server. Upon successful download, the module starts its firmware upgrade. If successful, the module reboots; otherwise, it returns an error and exits DFOTA.

AT+QFOTADL=<HTTP_URL> DFOTA via HTTP Server

If the delta firmware package is stored on an HTTP server, execute AT+QFOTADL=<HTTP_URL> to initiate the DFOTA upgrade. The module will download the delta firmware package wirelessly from the HTTP server and upgrade the firmware automatically.

DFOTA via HTTP Server
Test Command AT+QFOTADL=?
Write Command AT+QFOTADL=<HTTP_URL>
Response OK
+QIND: "FOTA","HTTPSTART"
+QIND: "FOTA","DOWNLOADING",<percent>
+QIND: "FOTA","DOWNLOADING",<percent>
...
+QIND: "FOTA","HTTPEND",<HTTP_err>

Characteristics

Parameter

Description
<HTTP_URL> String format. The URL where the firmware package is stored on the HTTP server. Maximum length is 511 bytes. It should start with "http://" in the format: "http://<HTTP_server_URL>:<HTTP_port>/<HTTP_file_path>".
<HTTP_server_URL> String type. The IP address or domain of the HTTP server owned and operated by you.
<HTTP_port> Integer type. The port of the HTTP server. Default value is 80. Range is 1-65535.
<HTTP_file_path> String type. The file path in the HTTP server.
<HTTP_err> Integer type. The HTTP error code. 0 means downloaded successfully. Any other value indicates an error. Refer to Chapter 5 for details.
<percent> Integer type. The download or upgrade progress in percentage.
<FOTA_err> Integer type. 0 means upgraded successfully. Any other value indicates an error. Refer to Chapter 5 for details.

NOTE: If the module is powered off when reporting +QIND: "FOTA","UPDATING",<percent>, it will automatically enter force upgrade mode upon next power-on and continue the upgrading progress. The URC of the upgrade process is shown as below:
+QIND: "FOTA","START"
+QIND: "FOTA","UPDATING",0%

AT+QFOTADL=<para> Local Upgrade

If the delta firmware package already exists in the UFS directory of the module filesystem and is named "fota.pack", the upgrade process will be triggered by executing AT+QFOTADL=1. If the package name is not "fota.pack", rename it using the filesystem-related AT command.

Local Upgrade
Write Command AT+QFOTADL=<para>
Response OK
+QIND: "FOTA","START"
+QIND: "FOTA","UPDATING",<percent>
+QIND: "FOTA","UPDATING",<percent>
...
+QIND: "FOTA","END",<FOTA_err>

Characteristics

Parameter

Description
<para> Integer type. 1 Local Upgrade.
<percent> Integer type. The download or upgrade progress in percentage.
<HTTP_err> Integer type. The HTTP error code. 0 means downloaded successfully. Any other value indicates an error. Refer to Chapter 5 for details.
<FOTA_err> Integer type. 0 means upgraded successfully. Any other value indicates an error. Refer to Chapter 5 for details.

NOTE:

AT+QFOTADL=<para>,<HTTP_URL>[,<filename>] Download MCU File Via HTTP Server

If a file for an external MCU is uploaded to the HTTP server, it can be downloaded by executing AT+QFOTADL=<para>,<HTTP_URL>[,<filename>]. The file will be saved in the UFS directory of the module filesystem. The filename can be specified by the <filename> parameter or acquired from <HTTP_URL>.

Download MCU File Via HTTP Server
Write Command AT+QFOTADL=<para>,<HTTP_URL>[,<filename>]
Response OK
+QIND: "FOTA","HTTPSTART"
+QIND: "FOTA","DOWNLOADING",<percent>
+QIND: "FOTA","DOWNLOADING",<percent>
...
+QIND: "FOTA","HTTPEND",<HTTP_err>
If there is any error: ERROR or +CME ERROR: <HTTP_err>

Characteristics

Parameter

Description
<para> Integer type. 2 Download the file to the module via HTTP server.
<filename> String type. File name. Specify the saving name of the file.
<HTTP_URL> String type. The URL where the firmware package is stored on the HTTP server. Maximum length is 511 bytes. It should start with "http://" in the format: "http://<HTTP_server_URL>:<HTTP_port>/<HTTP_file_path>".
<HTTP_server_URL> String type. The IP address or domain name of the HTTP server owned and operated by you.
<HTTP_port> Integer type. The port of the HTTP server. Default value is 80. Range is 1-65535.
<HTTP_file_path> String type. The file path in the HTTP server.
<HTTP_err> Integer type. The HTTP error code. 0 means download successfully. Any other value indicates an error. Refer to Chapter 5 for details.
<percent> Integer type. The download or upgrade progress in percentage.

NOTE:

Examples

DFOTA via HTTP Server Under NB-IoT Network

You can perform the firmware upgrade after storing the delta firmware package on your HTTP server. The URL http://192.0.2.2:3029/update.pack is used as an example URL below (provided for illustrative purposes only; replace it with a valid URL corresponding to your HTTP server and firmware package).

AT+COPS?
//Query network status.
+COPS: 0,2,"46011",9
//The fourth parameter 9 indicates a NB-IoT network.
OK
//Under NB-IoT network, the module will use the parameter configured by AT+QCGDEFCONT and automatically activate IP.
AT+CGDCONT?
+CGDCONT: 1,"IP","fast.t-mobile.com","192.0.2.2",0,0
OK
//Execute AT+QFOTADL to enable automatic firmware upgrade via DFOTA, and then the module will start to download the delta firmware package and upgrade firmware automatically.
AT+QFOTADL="http://192.0.2.2:3029/update.pack"
OK
+QIND: "FOTA","HTTPSTART"
//Download starts.
+QIND: "FOTA","DOWNLOADING",0%
+QIND: "FOTA","DOWNLOADING",10%
...
+QIND: "FOTA","DOWNLOADING",100%
+QIND: "FOTA","HTTPEND",0
//The package from HTTP server is successfully downloaded.
+QIND: "FOTA","START"
//Upgrade starts.
+QIND: "FOTA","UPDATING",0%
+QIND: "FOTA","UPDATING",10%
...
+QIND: "FOTA","UPDATING",100%
+QIND: "FOTA","END",0
//The firmware is successfully upgraded.

DFOTA via HTTP Server Under GSM Network (for BC92 Only)

You can perform the firmware upgrade after storing the delta firmware package on your HTTP server. Upgrade firmware when the delta firmware package is stored on an HTTP server. The URL http://192.0.2.2:3029/update.pack is used as an example URL below (provided for illustrative purposes only; replace it with a valid URL corresponding to your HTTP server and firmware package).

AT+COPS?
//Query network status.
+COPS: 0,2,"46000",0
//The fourth parameter 0 indicates a GSM network.
OK
//When BC92 is under GSM network, it is needed to configure PDP and activate IP manually before downloading.
AT+CGDCONT=1,"IP"
//Configure PDP type to "IP".
OK
AT+CGACT=1,1
//Activate the PDP context.
OK
AT+CGDCONT?
+CGDCONT: 1,"IP",,"192.0.2.2",0,0
OK
//Execute AT+QFOTADL to enable automatic firmware upgrade via DFOTA, and then the module will start to download the delta firmware package and upgrade firmware automatically.
AT+QFOTADL="http://192.0.2.2:3029/update.pack"
OK
+QIND: "FOTA","HTTPSTART"
//Download starts.
+QIND: "FOTA","DOWNLOADING",0%
+QIND: "FOTA","DOWNLOADING",10%
...
+QIND: "FOTA","DOWNLOADING",100%
+QIND: "FOTA","HTTPEND",0
//The package from HTTP server is successfully downloaded.
+QIND: "FOTA","START"
//Upgrade starts.
+QIND: "FOTA","UPDATING",0%
+QIND: "FOTA","UPDATING",10%
...
+QIND: "FOTA","UPDATING",100%
+QIND: "FOTA","END",0
//The firmware is successfully upgraded.

Local Upgrade Process

The local upgrade process can be triggered by executing AT+QFOTADL=1. First, ensure that the file already exists in the module filesystem and its name must be "fota.pack"; otherwise, the module will return an error.

AT+QFLST
//Check whether the file exists or not.
+QFLST: "fota.pack",20135
OK
AT+QFOTADL=1
OK
//Trigger the local upgrade process.
+QIND: "FOTA","START"
//Local upgrade starts.
+QIND: "FOTA","UPDATING",0%
+QIND: "FOTA","UPDATING",10%
...
+QIND: "FOTA","UPDATING",100%
+QIND: "FOTA","END",0
//Upgraded successful.

Download MCU File from HTTP Server Under NB-IoT Network

AT+COPS?
+COPS: 0,2,"46011",9
OK
//Query network status. The fourth parameter 9 indicates a NB-IoT network.
//The module will automatically activate the default PDN, which is set by AT+QCGDEFCONT in NB-IoT network.
AT+CGDCONT?
+CGDCONT: 1,"IP","fast.t-mobile.com","192.0.2.2",0,0
OK
//Execute AT+QFOTADL=2,<HTTP_URL> to download the MCU upgrade file from the HTTP server and store it in the module. After the download is complete, the corresponding filesystem AT command can be used to operate this MCU upgrade file.
//The URL of the MCU file on the HTTP server is "http://192.0.2.2:3029/test.bin" (The URL is provided for illustrative purpose only. Please replace it with a valid URL that corresponds to your HTTP(S) server and firmware package.)
AT+QFOTADL=2,"http://192.0.2.2:3029/test.bin"
//Trigger the process.
OK
+QIND: "FOTA","HTTPSTART"
//Download starts.
+QIND: "FOTA","DOWNLOADING",0%
+QIND: "FOTA","DOWNLOADING",10%
...
+QIND: "FOTA","DOWNLOADING",100%
+QIND: "FOTA","HTTPEND",0
AT+QFLST
+QFLST: "test.bin",93368
OK
//The MCU file is successfully downloaded.
//List the files in the module filesystem.

Download MCU File from HTTP Server Under GSM Network (for BC92 Only)

AT+COPS?
+COPS: 0,2,"46000",0
OK
//Query network status. The fourth parameter 0 indicates a GSM network.
//When the BC92 is under a GSM network, please manually configure the PDP and activate the IP before downloading.
AT+CGDCONT=1,"IP"
//Configure PDP type to "IP".
OK
AT+CGACT=1,1
//Active the PDP context.
OK
AT+CGDCONT?
+CGDCONT: 1,"IP",,"192.0.2.2",0,0
OK
//Execute AT+QFOTADL=2,<HTTP_URL> to download the MCU upgrade file from the HTTP server and store it in the module. After the download is complete, the corresponding filesystem AT command can be used to operate this MCU upgrade file.
//The URL of the MCU file on the HTTP server is "http://192.0.2.2:3029/test.bin" (The URL is provided for illustrative purpose only. Please replace it with a valid URL that corresponds to your HTTP(S) server and firmware package.)
AT+QFOTADL=2,"http://192.0.2.2:3029/test.bin"
OK
+QIND: "FOTA","HTTPSTART"
//Download starts.
+QIND: "FOTA","DOWNLOADING",0%
+QIND: "FOTA","DOWNLOADING",10%
...
+QIND: "FOTA","DOWNLOADING",100%
+QIND: "FOTA","HTTPEND",0
AT+QFLST
+QFLST: "test.bin",93368
OK
//The MCU file is successfully downloaded.
//List the files in the module filesystem.

Summary of Error Codes

The error code indicates an error related to mobile equipment or network. The details about <FOTA_err> and <HTTP_err> are described in the following tables.

Table 2: Summary of <HTTP_err> Codes

<HTTP_err> Description
0 Downloaded successfully
6500 Unknown mistake
6501 Illegal parameter
6502 Upgrade package is too large
6503 Download failed
6504 Upgrade package not found
6505 Upgrade package failed to write flash
6506 There are no differential packages in the module file system
6507 Differential packet verification error
6509 Allocate memory failed

Table 3: Summary of <FOTA_err> Codes

<FOTA_err> Description
0 Upgraded successfully
6508 Upgrade failed

Appendix References

Table 4: Related Documents

Document Name
[1] Quectel_BC65&BC95-GR_AT_Commands_Manual
[2] Quectel_BC92_AT_Commands_Manual
[3] Quectel_BC65&BC92&BC95-GR_Filesystem_Appliaction_Note

Table 5: Terms and Abbreviations

Abbreviation Description
DFOTA Delta Firmware Over-The-Air
GSM Global System for Mobile Communication
HTTP(S) Hyper Text Transport Protocol (Secure)
IP Internet Protocol
MCU Microcontroller Unit
NB-IoT Narrowband Internet of Things
PDP Packet Data Protocol
UFS User File Storage
URL Uniform Resource Locator
Models: BC65, BC92, BC95-GR, BC95-GR Series NB IoT Module, BC95-GR Series, NB IoT Module, IoT Module

File Info : application/pdf, 23 Pages, 279.48KB

PDF preview unavailable. Download the PDF instead.

Quectel BC65BC92BC95-GR DFOTA Upgrade Guide V1.2

References

Microsoft Word LTSC Microsoft Word LTSC

Related Documents

Preview Quectel EG800Q & EG91xQ Series DFOTA Upgrade Guide
This guide provides detailed instructions for performing DFOTA (Delta Firmware Over-The-Air) upgrades on Quectel EG800Q and EG91xQ series LTE standard modules, including AT command usage and troubleshooting.
Preview Quectel EC2x, EG2x, EG9x, EM05 Series DFOTA Upgrade Guide
A comprehensive guide for Quectel EC2x, EG2x, EG9x, and EM05 series LTE modules, detailing the DFOTA firmware upgrade process, AT commands, and troubleshooting steps for efficient module management.
Preview Quectel BC65: Compact NB-IoT Module with Bluetooth 4.2 (BLE) - Technical Specifications
Discover the Quectel BC65, a compact and low-power NB-IoT module with Bluetooth 4.2 (BLE) connectivity. Ideal for IoT applications like smart metering, wearables, and smart cities.
Preview Quectel BC660K-GL MQTT Application Note for NB-IoT Modules
This application note from Quectel provides comprehensive guidance on implementing the MQTT protocol using AT commands on the BC660K-GL NB-IoT module. It details MQTT data interaction, AT command syntax, error codes, and practical examples for IoT development.
Preview Quectel RM50xQ Series: 5G Sub-6 GHz M.2 IoT/eMBB Modules
Explore the Quectel RM50xQ Series, industrial-grade 5G Sub-6 GHz M.2 modules optimized for IoT and eMBB applications. Features include multi-constellation GNSS, wide band coverage, and high data rates.
Preview Quectel BC660K-GL Hardware Design Guide
Comprehensive hardware design guide for the Quectel BC660K-GL NB-IoT module, detailing its interfaces, features, specifications, and integration guidelines for IoT applications.
Preview Quectel MC25 AT Commands Manual - Comprehensive Guide
Explore the Quectel MC25 AT Commands Manual for detailed information on controlling GSM/GPRS/GNSS module series functionalities, including network services, SMS, calls, and TCP/IP. Essential technical reference for developers.
Preview Quectel BG77xA-GL & BG95xA-GL LPWA Module Introduction
An introduction to Quectel's BG77xA-GL and BG95xA-GL LPWA modules, detailing their technical advantages like low power consumption and extended coverage. This document covers the product portfolio, specifications, network deployment, and diverse IoT application scenarios.