EC2x&EG25-G&EG9x&
EM05 FILE
AT Commands Manual
LTE Standard Module Series
Rev. EC2x&EG25-G&EG9x& EM05_FILE_AT_Commands_Manual_V1.0
Date: 2019-07-05
Status: Released
www.quectel.com
LTE Standard Module Series
EC2x&EG25-G&EG9x&EM05 FILE AT Commands Manual
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: info@quectel.com
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: 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. 2019. All rights reserved.
EC2x&EG25-G&EG9x&EM05_FILE_AT_Commands_Manual 1 / 26
LTE Standard Module Series
EC2x&EG25-G&EG9x&EM05 FILE AT Commands Manual
About the Document
History
Revision
Date
Author
Description
1.0
2019-07-05
Asa WANG/
Initial
Mandy WANG
Wayne WEI/
EC2x&EG25-G&EG9x&EM05_FILE_AT_Commands_Manual 2 / 26
LTE Standard Module Series
EC2x&EG25-G&EG9x&EM05 FILE AT Commands Manual
Contents
About the Document ................................................................................................................................... 2
Contents ....................................................................................................................................................... 3
Table Index ................................................................................................................................................... 4
1
Introduction .......................................................................................................................................... 5
1.1.
1.2.
1.3.
Applicable Modules ................................................................................................................. 5
The Process of Using File AT Commands .............................................................................. 6
Description of Data Mode ........................................................................................................ 6
2 Description of FILE AT Commands ................................................................................................... 8
2.1.
2.2.
2.3.
2.4.
2.5.
2.6.
2.7.
2.8.
2.9.
AT+QFLDS Get the Space Information of the Storage......................................................... 8
AT+QFLST List the File Information in the Storage .............................................................. 9
AT+QFDEL Delete the File(s) in the Storage ..................................................................... 11
AT+QFUPL Upload a File to the Storage ........................................................................... 11
AT+QFDWL Download a File from the Storage .................................................................. 13
AT+QFOPEN Open a File .................................................................................................. 14
AT+QFREAD Read a File ................................................................................................... 15
AT+QFWRITE Write a File .................................................................................................. 16
AT+QFSEEK Set a File Pointer to the Specified Position .................................................. 16
2.10.
AT+QFPOSITION Get the Offset of a File Pointer ............................................................. 17
2.11.
2.12.
2.13.
AT+QFTUCAT Truncate a File from the File Pointer .......................................................... 18
AT+QFCLOSE Close a File ................................................................................................ 18
AT+QFMOV Move a File..................................................................................................... 19
3 Examples ............................................................................................................................................ 21
3.1.
Upload and Download a File .............................................................................................. 21
3.1.1. Upload a File .................................................................................................................. 21
3.1.1.1. Non ACK Mode ..................................................................................................... 21
3.1.1.2. ACK Mode ............................................................................................................ 21
3.1.2. Download a File ............................................................................................................. 22
3.2.
Write and Read a File .......................................................................................................... 22
3.2.1. Write and Read a UFS File ............................................................................................ 22
3.2.2. Write and Read a RAM File ........................................................................................... 22
4 Summary of ERROR Codes .............................................................................................................. 24
5 Appendix A Reference ....................................................................................................................... 26
EC2x&EG25-G&EG9x&EM05_FILE_AT_Commands_Manual 3 / 26
LTE Standard Module Series
EC2x&EG25-G&EG9x&EM05 FILE AT Commands Manual
Table Index
TABLE 1: SUMMARY OF ERROR CODES ...................................................................................................... 24
TABLE 2: TERMS AND ABBREVIATIONS ........................................................................................................ 26
EC2x&EG25-G&EG9x&EM05_FILE_AT_Commands_Manual 4 / 26
LTE Standard Module Series
EC2x&EG25-G&EG9x&EM05 FILE AT Commands Manual
1 Introduction
Quectel EC2x&EG25-G&EG9x&EM05 modules provide AT commands to operate files on different
physical storage mediums. This document is a reference guide to these commands.
The supported storage mediums are as follows:
UFS: User File Storage directory. It is a special directory on the flash file system.
SD: SD card directory.
RAM: Random Access Memory. It is faster but much smaller than the UFS. And the files in RAM will
be lost when rebooting the module.
The file name will indicate the storage location. When the file name begins with “RAM:”, it means that the
file is stored in RAM. When the file name begins with “SD:”, it means that the file is stored in SD card. If
there are no prefix characters in the file name, then the file is stored in UFS.
NOTE
Storage medium SD is not supported on EG9x module.
1.1. Applicable Modules
This document is applicable to the following Quectel modules:
EC2x: EC25/EC21/EC20 R2.0/EC20 R2.1
EG25-G
EG9x: EG91/EG95
EM05
EC2x&EG25-G&EG9x&EM05_FILE_AT_Commands_Manual 5 / 26
LTE Standard Module Series
EC2x&EG25-G&EG9x&EM05 FILE AT Commands Manual
1.2. The Process of Using File AT Commands
The following procedures can be followed to create, read and write a file in the storage:
1. A file can be uploaded to the storage by AT+QFUPL, and can be outputted/downloaded through the
serial interface by AT+QFDWL.
2. Open the file by AT+QFOPEN, and then the file can be written or read at any time and any location
until the file is closed by AT+QFCLOSE.
When the file is opened by AT+QFOPEN, it can be set as overwrite mode, read-only mode or
other modes by the parameter . (For more information about , please refer to
Chapter 2.6). After the file is opened, a parameter is assigned to it. Then the file
can be operated by .
After the file is opened, it can be written by AT+QFWRITE and can be read by AT+QFREAD
from the current file position.
The file position can be set by AT+QFSEEK and the current file position can be queried by
AT+QFPOSITION.
AT+QFTUCAT is used to truncate a file from the file pointer.
AT+QFCLOSE is used to close the file, after which the becomes meaningless any
more.
There are several commands to manage files in the storage:
1. AT+QFLDS: get the space information of the storage.
2. AT+QFLST: list the file information in the storage.
3. AT+QFDEL: delete the file(s) in the storage.
1.3. Description of Data Mode
The COM port of EC2x/EG25-G/EG9x/EM05 module has two working modes: AT command mode and
data mode. In AT command mode, the inputted data via COM port will be treated as AT command. While
in data mode, it will be treated as data.
Inputting “+++” or pulling up DTR (AT&D1 should be set first) can make the COM port exit from data mode.
To prevent the “+++” from being misinterpreted as data, the following sequence should be followed:
1) Do not input any character within 1s or longer before inputting “+++”.
2)
Input “+++” within 1s, and no other characters can be inputted during the time.
3) Do not input any character within 1s after “+++” has been inputted.
EC2x&EG25-G&EG9x&EM05_FILE_AT_Commands_Manual 6 / 26
LTE Standard Module Series
EC2x&EG25-G&EG9x&EM05 FILE AT Commands Manual
When AT+QFUPL, AT+QFDWL, AT+QFREAD and AT+QFWRITE are executed, the COM port will enter
data mode. If customers are using “+++” or DTR to make the port exit from data mode, the executing
procedure of these commands will be interrupted before the response is returned. In such case, the COM
port cannot reenter data mode by executing ATO command.
EC2x&EG25-G&EG9x&EM05_FILE_AT_Commands_Manual 7 / 26