QUECTEL EG06xK LTE-A Standard Module
Introduction
Quectel LTE-A EG06xK, Ex120K and EM06xK family modules support FOTA (Firmware Over-The-Air) function to upgrade the firmware of partitions such as modem, system, boot, sbl, tz and so on. With this function, you (the user) can upgrade the module firmware to a new version or revert the firmware to an old version.
FOTA Implementation and User Responsibility
Quectel follows industry best practices with regard to firmware updates for its modules by enabling users to offer FOTA updates. Please note that Quectel does not have the ability to unilaterally push updates to users’ devices. Quectel hands full control over the FOTA process to users. In the process, Quectel solely provides the updated firmware but cannot initiate FOTA updates on users’ devices.
Users can determine when to push the update to the Quectel modules using the FOTA mechanism by configuring corresponding parameters for the update that the users host on their own infrastructures.
Applicable Modules
Table 1: Applicable Modules
Module Family Module
- EG06xK
EG060K Series
EG065K Series - Ex120K
EG120K Series
EM120K-GL - EM06xK
EM060K Series
EM061K-GL
Firmware Upgrade Procedure Over FOTA
The following chart illustrates the firmware upgrade procedure via FOTA when the firmware package is stored on an FTP/HTTP(S) server.
User Side
As shown in the above figure, the following steps need to be performed to upgrade the firmware when the firmware package is stored on an FTP/HTTP(S) server:
- Step 1: Get the firmware package from Quectel Technical Support (see Chapter 2.1 for details).
- Step 2: Upload the firmware package from the host to your FTP/HTTP(S) server (see Chapter 2.2 for details).
- Step 3: Execute AT+QFOTADL on the host to trigger automatic firmware upgrade on the module (see Chapter 2.3 for details).
- Step 4: The module automatically downloads the firmware package from your FTP/HTTP(S) server via LTE/WCDMA network.
- Step 5: The module internally runs the updating program to automatically upgrade the module firmware.
NOTE
You are responsible for providing and managing the FTP/HTTP(S) server for the firmware upgrade. Quectel does not supply the server or assist with its setup.
Get Firmware Package
Before firmware upgrading, check the original firmware version name with ATI and confirm the target firmware version, and then send the two firmware versions to Quectel Technical Support to obtain the corresponding firmware package.
Upload Firmware Package to FTP/HTTP(S) Server
- Step 1: Please set up an FTP/HTTP(S) server before using the FOTA function. (Quectel does not provide
such servers.) - Step 2: After completing the server setup, upload the firmware package to your server and save the storage path.
Execute AT Command to Upgrade the Firmware
After uploading the firmware package to the FTP/HTTP(S) server, execute AT+QFOTADL on the host to initiate the automatic over-the-air download and upgrade of module firmware package. For more details about the FOTA AT commands, see Chapter 3.3.
Description of FOTA AT Commands
AT Command Introduction
Definitions
- <CR> Carriage return character.
- <LF> Line feed character.
- <…> Parameter name. Angle brackets do not appear on the command line.
- […] Optional parameter of a command or an optional part of TA information response. Square brackets do not appear on the command line. When an optional parameter is not given in a command, the new value equals its previous value or the default settings, unless otherwise specified.
- Underline Default setting of a parameter
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 throughout this document, only the commands and responses are presented, and <CR> and <LF> are deliberately omitted.
Declaration of AT Command Examples
The AT command examples in this document are provided to help you learn about the use of the AT commands introduced herein. The examples, however, should not be taken as Quectel’s recommendations or suggestions about how to design a program flow or what status to set the module into. Sometimes multiple examples may be provided for one AT command. However, this does not mean that there is a correlation among these examples, or that they should be executed in a given sequence. The URLs, domain names, IP addresses, usernames/accounts, and passwords (if any) in the AT command examples are provided for illustrative and explanatory purposes only, and they should be modified to reflect your actual usage and specific needs.
AT+QFOTADL Firmware Upgrade via FOTA
This command enables automatic firmware upgrade via FOTA. After executing the corresponding command, the module will automatically download or load the firmware package from FTP/HTTP(S) server or local file system. After the package is successfully downloaded or loaded, the module will automatically upgrade the firmware and then reboot.
AT+QFOTADL Firmware Upgrade via FOTA | |
Test Command
AT+QFOTADL=? |
Response
OK |
Maximum Response Time | 300 ms |
AT+QFOTADL=<FTP_URL> Upgrade Firmware over FTP Server
If the firmware package is stored on an FTP server, execute AT+QFOTADL=<FTP_URL> to initiate automatic firmware upgrade via FOTA. The module will download the package from the FTP server over the air, and then reboot and upgrade the firmware automatically.
AT+QFOTADL=<FTP_URL> Upgrade Firmware over FTP Server | |
Write Command
AT+QFOTADL=<FTP_URL> |
Response
OK |
|
If there is any error:
ERROR |
|
Maximum Response Time | 300 ms |
Characteristics | – |
Parameter
Example
//You can perform the firmware upgrade after storing the firmware package on your FTP server. “ftp://test:test@192.0.2.2:21/Jun/update-v12-to-v13.zip” is used as an example URL below. (The URL is provided for illustrative purpose only. Please replace it with a valid URL that corresponds to your FTP server and firmware package.) Execute the following command to initiate automatic firmware upgrade via FOTA. The module downloads the firmware package and upgrades the firmware automatically.
OK
- +QIND: “FOTA”,”FTPSTART”
- +QIND: “FOTA”,”FTPEND”,0 //Finish downloading the firmware package from the FTP server.
- //The module reboots automatically and the USB port is re-initialized. If the current port is USB port, MCU should close and reopen it. After the module is rebooted, the first URC should be reported within 90 seconds. Otherwise, it means an unknown error occurs.
- +QIND: “FOTA”,”START”
- +QIND: “FOTA”,”UPDATING”,1
- +QIND: “FOTA”,”UPDATING”,20
- +QIND: “FOTA”,”UPDATING”,100
- +QIND: “FOTA”,”END”,0 //The module automatically restarts to complete the FOTA upgrade.
AT+QFOTADL=<HTTP_URL> Upgrade Firmware over HTTP(S) Server
If the firmware package is stored on an HTTP(S) server, execute AT+QFOTADL=<HTTP_URL> to initiate automatic firmware upgrade via FOTA. The module will download the package from the HTTP(S) server over the air, and then reboot and upgrade the firmware automatically.
AT+QFOTADL=<HTTP_URL> Upgrade Firmware over HTTP(S) Server | |
Write Command
AT+QFOTADL=<HTTP_URL> |
Response
|
Maximum Response Time | 300 ms |
Characteristics | – |
Parameter
AT+QFOTADL=<file_name> Upgrade Firmware over Local File System
If the firmware package has already been stored in the module’s file system, execute AT+QFOTADL=<file_name> to initiate automatic firmware upgrade via FOTA. Then the module will load the package from the local file system, and then reboot and upgrade the firmware automatically.
AT+QFOTADL=<file_name> Upgrade Firmware over Local File System | |
Write Command
AT+QFOTADL=<file_name> |
Response
OK |
+QIND: “FOTA”,”START”
+QIND: “FOTA”,”UPDATING”,<percent> +QIND: “FOTA”,”UPDATING”,<percent> |
…
+QIND: “FOTA”,”END”,<err>
If there is any error: ERROR |
|
Maximum Response Time | 300 ms |
Characteristics | – |
Parameter
NOTE
- Before using this command, make sure that the firmware package is stored in the module. You can upload the package to the module through AT+QFUPL. For details of AT+QFUPL, see document [1].
- Please disconnect the data call of the host first before proceeding with the FOTA upgrade, because when the host performs data call with the module, it causes the internal FOTA upgrade program of the module to be unable to perform data call.
- The first APN is used for data call during FOTA upgrade by default. If the data call with the first APN is occupied by any program of the module, the module cannot use this APN to perform other data call at the same time. Therefore, the module should perform FOTA upgrade after the program disconnects the data call with this APN or after you execute AT+QFOTAPID to switch the channel.
- If Verizon certification uses the first APN to perform data call, it is suggested to use AT+QFOTAPID to switch channels for FOTA upgrade.
- For details of AT+QFOTAPID, please contact Quectel Technical Support.
Example
- //Upgrade firmware when the firmware package is stored on the local file system.
AT+QFOTADL=”/cache/ufs/update-v12-to-v13.zip”
OK - //The module reboots automatically and the USB port is re-initialized. If the current port is USB port, MCU should close and reopen it. After the module is rebooted, the first URC should be reported within 90 seconds. Otherwise, it means an unknown error occurs.
- +QIND: “FOTA”,”START”
- +QIND: “FOTA”,”UPDATING”,1
- +QIND: “FOTA”,”UPDATING”,2
- +QIND: “FOTA”,”UPDATING”,100
- +QIND: “FOTA”,”END”,0 //The module automatically restart to complete the FOTA upgrade.
Exception Handling and Precautions
Exception Handling
To improve the upgrade success rate, the module will set the upgrade flag before starting the upgrade. When an error is reported during the upgrade, the module will automatically restart. After the upgrade flag is found, the module will continue to upgrade. If the upgrade fails for five consecutive times, the upgrade is a complete failure, and the module will delete the flag, exit and try to start the module normally. The upgrade interface is as follows:
- +QIND: “FOTA”,”START”
- +QIND: “FOTA”,”UPDATING”,20
- +QIND: “FOTA”,”END”,<err>
- //The module restarts automatically
- +QIND: “FOTA”,”START”
- +QIND: “FOTA”,”UPDATING”,20
- +QIND: “FOTA”,”UPDATING”,30
- +QIND: “FOTA”,”END”,0
NOTE
The consecutive upgrade times is only valid when an upgrade error is reported, while there is no limit to the number of upgrades in the event of an abnormal power failure. If an abnormal power failure occurs during module upgrade process, the upgrade can also continue after the module is restarted. After the upgrade is successful, the upgrade flag will also be deleted.
Precautions
- After AT+QFOTADL is executed, the host receives URC +QIND: “FOTA”,”START” which means that the upgrade begins, and URC +QIND: “FOTA”,”END”,0 means the upgrade is completed. After the upgrade, the module automatically restarts and enters normal mode. Do not power off the module during the upgrade.
- If the host does not receive any URC within 4 minutes during the upgrade process, you can restart the module.
- It is recommended to set up a flag to mark the firmware upgrade task and remove it after the upgrade is completed successfully.
NOTE
It is recommended not to power off the module during the FOTA upgrade process.
Summary of Error Codes
This chapter introduces the error codes related to Quectel modules or network. The details about <FTP_err>, <HTTP_err> and <err> are described in the following tables.
Table 3: Summary of <FTP_err> Codes
Numerical <FTP_err> Character <FTP_err>
0 Downloaded the firmware package from the FTP server successfully
601 FTP Unknown error
Table 4: Summary of <HTTP_err> Codes
Numerical <HTTP_err> Character <HTTP_err>
0 Downloaded the firmware package from the HTTP(S) server successfully
701 Failed to download the firmware package from the HTTP(S) server
Table 5: Summary of <err> Codes
Firmware upgrading failed. The module will reboot and retry to upgrade the firmware until the upgrade is successful.
550 The firmware package is too large
Appendix References
Table 6: Related Document
Document Name
Quectel_EG06xK&Ex120K&EM06xK_Series_FILE_Application_Note
Table 7: Terms and Abbreviations
Documents / Resources
![]() |
QUECTEL EG06xK LTE-A Standard Module [pdf] User Guide EG06xK, Ex120K, EM06xK, EG06xK LTE-A Standard Module, LTE-A Standard Module, Standard Module, Module |