Quectel WCDMA UG FTP Series At Command Manual

Umts/hspa module

Advertisement

WCDMA UGxx FTP
AT Commands Manual
UMTS/HSPA Module Series
Rev. WCDMA_UGxx_FTP_AT_Commands_Manual_V1.3
Date: 2016-05-05
www.quectel.com

Advertisement

Table of Contents
loading

Summary of Contents for Quectel WCDMA UG FTP Series

  • Page 1 WCDMA UGxx FTP AT Commands Manual UMTS/HSPA Module Series Rev. WCDMA_UGxx_FTP_AT_Commands_Manual_V1.3 Date: 2016-05-05 www.quectel.com...
  • Page 2 QUECTEL OFFERS THIS 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.
  • Page 3: About The Document

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual About the Document History Revision Date Author Description 2014-12-13 Jonathan WEN Initial Changed the document name from “UG95” 2015-03-06 Jessica GENG to “UGxx”. 2015-04-01 Jessica GENG Updated applicable modules. 2016-05-05 Sophie ZHU Added Error Code 631 WCDMA_UGxx_FTP_AT_Commands_Manual Confidential / Released...
  • Page 4: Table Of Contents

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual Contents About the Document ........................... 2 Contents ............................... 3 Table Index ..............................5 Introduction ............................6 1.1. The Process of FTP Operation....................6 1.2. Description of FTPS ........................ 7 1.3. Description of Data Mode ......................8 1.4.
  • Page 5 UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual Summary of Error Codes ........................41 Summary of FTP Protocol Error Codes ................... 43 Appendix A Reference ........................44 WCDMA_UGxx_FTP_AT_Commands_Manual Confidential / Released 4 / 44...
  • Page 6 UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual Table Index TABLE 1: SUMMARY OF ERROR CODES ....................41 TABLE 2: SUMMARY OF FTP PROTOCOL ERROR CODES ..............43 TABLE 3: RELATED DOCUMENTS ......................44 TABLE 4: TERMS AND ABBREVIATIONS ....................44 WCDMA_UGxx_FTP_AT_Commands_Manual Confidential / Released 5 / 44...
  • Page 7: Introduction

    WCDMA UGxx FTP AT Commands Manual Introduction This document is applicable to Quectel UGxx modules. 1.1. The Process of FTP Operation As the module provides FTP protocol, you can operate file and directory on FTP server by these FTP AT commands.
  • Page 8: Description Of Ftps

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual successfully, you can delete the file by AT+QFDEL (For more details, please refer to Quectel_WCDMA_UGxx_FILE_AT_Commands_Manual). b) You can upload a file to FTP server from COM port by AT+QFTPPUT too. Then the module will enter into data mode.
  • Page 9: Description Of Data Mode

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual If module logs in FTPS server successfully, all other operations are the same as FTP client. 1.3. Description of Data Mode The mode of the COM port includes AT command mode and data mode. The difference between them is that 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.
  • Page 10: Dns Parse Fails

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual The module only supports three PDP contexts activated simultaneously, so you must make sure the number of activated PDP contexts is less than 3. If the result of checking is OK, but the result of executing AT+QIACT command still fails, please reboot the module to resolve this issue.
  • Page 11: Description Of At Command

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual Description of AT Command 2.1. AT+QFTPCFG FTP Configurations Configure FTP server, user account, file type, transfer mode and context ID. If the Write Command just takes one parameter, it will query the specified information AT+QFTPCFG FTP Configurations Test Command Response...
  • Page 12 UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual Write Command Response AT+QFTPCFG=“transmode”[,<transm If <transmode> is not omitted: ode>] +CME ERROR: <err> Else query the current settings: +QFTPCFG: “transmode”,<transmode> Write Command Response AT+QFTPCFG=“contextid”[,<contextI If <contextID> is not omitted: D>] +CME ERROR: <err> Else query the current settings: +QFTPCFG: “contextid”,<contextID>...
  • Page 13 UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual +CME ERROR: <err> Else query the current settings: +QFTPCFG: “sslctxid”,<sslctxID> Parameter <username> String type, the user name for the authentication. The maximum size of the parameter is 50 bytes <password> String type, the password for the authentication. The maximum size of the parameter is 50 bytes <contextID>...
  • Page 14: At+Qftpopen Login To Ftp Server

    Integer type, for reference only, indicates the original error code from FTP server which is defined in FTP protocol (Please refer to Chapter 5). If it is 0, it is meaningless Example “quectel.3322.org”,21 AT+QFTPOPEN= //Login to FTP server +QFTPOPEN: 0,0...
  • Page 15: At+Qftpcwd Set The Current Directory On Ftp Server

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual 2.3. AT+QFTPCWD Set the Current Directory on FTP Server Set the current directory on FTP server. If OK is returned, “+QFTPCWD: <err>,<protocol_error>” should be output in <timeout> set by AT+QFTPCFG. All the files and directory operation will be set in the current directory.
  • Page 16: At+Qftpput Upload A File To Ftp Server

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual +QFTPPWD: 0,<path_name> Else fail to get current directory: +QFTPPWD: <err>,<protocol_error> +CME ERROR: <err> Parameter String type, a directory path on FTP server. The root path of FTP server is “/” <path_name> <err>...
  • Page 17 UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual Write Command Response AT+QFTPPUT=<file CONNECT name>,“COM:”[,<startpos>[,<upload <Input file data> len >,<beof>]] If successfully upload the data: +QFTPPUT: 0,<transferlen> Else fail to upload the data: +QFTPPUT: <err>,<protocol_error> +CME ERROR: <err> Write Command Response AT+QFTPPUT=<file_name>,<local_na me>[,<startpos>]...
  • Page 18 UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual The last packet of data, when data reached <uploadlen>, module will exit from data mode and close data connection, “+QFTPPUT: 0,<transferlen>” will be output <transferlen> Integer type, length of successfully transferred data <err>...
  • Page 19: At+Qftpget Download A File From Ftp Server

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual AT+QFLST=“RAM:*” +QFLST: “RAM:test1.txt”,1000 AT+QFTPPUT=“test.txt”, “RAM:test1.txt”,0 //Upload “RAM:test1.txt” to FTP server and save it as “test.txt” on FTP server. +QFTPPUT: 0,1000 AT+QFTPDEL=“test.txt” +QFTPDEL: 0,0 2.6. AT+QFTPGET Download a File from FTP Server Download file from...
  • Page 20 UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual If successfully download the file: +QFTPGET: 0,<transferlen> Else fail to download the file: +QFTPGET: <err>,<protocol_error> +CME ERROR: <err> Write Command Response AT+QFTPGET=<file_name>,<local_na me>[,<startpos >] <local_name> is not “COM:” If successfully download the file: +QFTPGET: 0,<transferlen>...
  • Page 21: At+Qftpsize Get The File Size On Ftp Server

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual Example //Download a file and output to COM port. AT+QFTPGET=“test.txt”, “COM:”,0 CONNECT <Output file data > +QFTPGET: 0,1000 //Download a file and output to COM port twice, each time in 500 bytes. AT+QFTPGET=“test.txt”,“COM:”,0,500 //The size of “test.txt”...
  • Page 22: At+Qftpdel Delete The File On Ftp Server

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual AT+QFTPSIZE Get the File Size on FTP Server Test Command Response AT+QFTPSIZE=? +QFTPSIZE: <file_name> Write Command Response AT+QFTPSIZE=<file_name> If successfully get the file size: +QFTPSIZE: 0,<file_size> Else fail to get the file size: +QFTPSIZE: <err>,<protocol_error>...
  • Page 23: At+Qftpmkdir Make A Folder On Ftp Server

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual +QFTPDEL: <err>,<protocol_error> +CME ERROR: <err> Parameter <file_name> String type, the file name in FTP server. The maximum size of the parameter is 50 bytes <err> Integer type, indicates the operation error code. It is the type of error (Please refer to the Chapter 4) <protocol_error>...
  • Page 24: At+Qftprmdir Delete An Empty Folder On Ftp Server

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual meaningless 2.10. AT+QFTPRMDIR Delete an Empty Folder on FTP Server Delete an empty folder on FTP server. If “OK” is returned, “+QFTPRMDIR: <err>,<protocol_error>” should be output in <timeout> set by AT+QFTPCFG. Otherwise, you should close the FTP connection, deactivate and reactive the network.
  • Page 25 UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual set by AT+QFTPCFG indicates the maximum interval time between two packets of received/transmitted data. AT+QFTPLIST List Contents of Directory on FTP Server Test Command Response AT+QFTPLIST=? +QFTPLIST: <dirname>,<local_name> Write Command Response AT+QFTPLIST= <dirname>[,“COM:”] CONNECT <Output content data>...
  • Page 26: At+Qftpnlst List File Names Of Directory On Ftp Server

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual to the Chapter 4) <protocol_error> Integer type, for reference only, indicates the original error code from FTP server which is defined in FTP protocol (Please refer to Chapter 5). If it is 0, it is meaningless Example //Get contents of current directory on FTP server and output to COM port.
  • Page 27 UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual Write Command Response AT+QFTPNLST=<dirname>[,“COM:” ] CONNECT <Output content data> If successfully list file names: +QFTPNLST: 0,<transfer_size> Else fail to list file names: +QFTPNLST: <err>,<protocol_error> +CME ERROR: <err> Write Command Response AT+QFTPNLST=<dirname>,<local_na me>...
  • Page 28: At+Qftprename Rename A File Or Folder On Ftp Server

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual CONNECT <Output content data > +QFTPNLST: 0,1000 //Get file name of specified directory on FTP server and save to RAM. AT+QFTPNLST=“TESTDIR”,“RAM:test2.txt” +QFTPNLST: 0,1000 AT+QFLST=“RAM:*” +QFLST: “RAM:test2.txt”,1000 2.13. AT+QFTPRENAME Rename a File or Folder on FTP Server Rename a file or folder on FTP server.
  • Page 29: At+Qftplen Get The Transferred Data Length

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual the Chapter 4) <protocol_error> Integer type, for reference only, indicates the original error code from FTP server which is defined in FTP protocol (Please refer to Chapter 5). If it is 0, it is meaningless 2.14.
  • Page 30: At+Qftpclose Logout From Ftp Server

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual +CME ERROR: <err> Parameter <ftpstat> Integer type, indicates the current status of FTP services Opening an FTP service The FTP service is opened and idle Transferring data with FTP server Closing the FTP service The FTP service is closed <err>...
  • Page 31: At+Qftpmlsd List Standardized File And Directory Information

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual 2.17. AT+QFTPMLSD List Standardized File and Directory Information List standardized file and directory information of directory on FTP server. If the <local_name> is “COM:”, “CONNECT” should be output within <timeout> set by AT+QFTPCFG. Else “OK” will be returned first. “+QFTPMLSD: 0,<transfer_size>”...
  • Page 32: At+Qftpmdtm Get The File Modification Time On Ftp Server

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual <local_name> String type, the local position to save data from FTP server. The maximum size of the parameter is 60 bytes. The default value is “COM:”. If it is “COM:”, the data will be output to COM port.
  • Page 33 UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual Write Command Response AT+QFTPMDTM=<file_name> If successfully get the file modification time: +QFTPMDTM: 0,<modify_time> Else fail to get the file modification time: +QFTPMDTM: <err>,<protocol_error> +CME ERROR: <err> Parameter <file_name> String type, the file name in FTP server. The maximum size of the parameter is 50 bytes <modify_time>...
  • Page 34: Example

    AT+QFTPCFG=“account”,“test”,“test” //Set user name and password. AT+QFTPCFG=“filetype”,1 //Set file type as Binary. AT+QFTPCFG=“transmode”,1 //Set transfer mode as Passive mode. AT+QFTPCFG=“rsptimeout”,90 //Set response timeout value. //Step 3: Login to FTP server. AT+QFTPOPEN=“quectel.3322.org”,21 +QFTPOPEN: 0,0 WCDMA_UGxx_FTP_AT_Commands_Manual Confidential / Released 33 / 44...
  • Page 35: Folder Operation

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual 3.2. Folder Operation AT+QFTPCWD=“/” //Set current directory. +QFTPCWD: 0,0 AT+QFTPPWD //Query current directory. +QFTPPWD: 0,”/” //Create a folder as “TEST” in FTP server. AT+QFTPMKDIR=“TEST” +QFTPMKDIR: 0,0 AT+QFTPRENAME=“TEST”, “TEST_NEW” //Rename a folder. +QFTPRENAME: 0,0 AT+QFTPRMDIR=“TEST_NEW”...
  • Page 36: List File Information Or File Names

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual //Delete “test_new.txt” on FTP server. AT+QFTPDEL=“test_new.txt” +QFTPDEL: 0,0 3.4. List File Information or File Names AT+QFTPCWD=“/” //Set current directory. +QFTPCWD: 0,0 AT+QFTPLIST=“.” //List file information of current directory and output to COM. CONNECT <Output content data>...
  • Page 37: Upload A File To Ftp Server

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual +QFTPNLST: 0,1000 3.5. Upload a File to FTP Server AT+QFTPCWD=“/” +QFTPCWD: 0,0 AT+QFTPSTAT +QFTPSTAT: 0,1 //Upload a file from COM. AT+QFTPPUT=“test_my.txt”, “COM:”,0 //All data will be saved as “test.txt” in FTP server. CONNECT <Input file data >...
  • Page 38 UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual +QFTPSIZE: 0,1500 //Upload a file from COM to FTP server twice, each time in 1024 bytes. AT+QFTPPUT=“test.txt”, “COM:”,0,1024,0 //It is not the last 1024 bytes of “test.txt”. CONNECT <Input file data> //Data length reaches1024.
  • Page 39: Download A File From Ftp Server

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual AT+QFDEL=“RAM:test_ram.txt” //Delete local RAM file. 3.6. Download a File from FTP Server AT+QFTPCWD=“/” +QFTPCWD: 0,0 //Download a file from FTP server and output to COM. AT+QFTPGET=“test_my.txt”, “COM:” CONNECT <Output file data> +QFTPGET: 0,1000 //Download a file and output to COM port twice, each time in 500 bytes.
  • Page 40: Logout From Ftp Server

    UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual //Download a file from FTP server and save it to RAM, the start position is 450. AT+QFTPGET=“test_my1.txt”, “RAM:test1.txt”,450 //Download file and save to RAM as “test.txt”. +QFTPGET: 0,550 AT+QFTPLEN +QFTPLEN: 0,550 AT+QFLST=“RAM:*”...
  • Page 41 //Configure SSL security level as 0, which mean the SSL CA cert is not needed . AT+QSSLCFG=“sslversion”,1,1 //Configure SSL version as 1, which means TLS1.0. //Step 4: Login to FTPS server. AT+QFTPOPEN=“quectel.3322.org”,990 +QFTPOPEN: 0,0 WCDMA_UGxx_FTP_AT_Commands_Manual Confidential / Released 40 / 44...
  • Page 42 UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual Summary of Error Codes The error code <err> indicates an error related to mobile equipment or network. The details about <err> are described in the following table. Table 1: Summary of Error Codes <err>...
  • Page 43 UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual Requested action aborted: local error in processing Requested action not taken: insufficient system storage Syntax error, command unrecognized Syntax error in parameters or arguments Command not implemented Bad sequence of commands Command parameter not implemented Not logged in Need account for storing files...
  • Page 44 UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual Summary of FTP Protocol Error Codes The protocol error code <protocol error> indicates an error replied from FTP server. Please refer to RFC959 (File Transfer Protocol).The details about <protocol error> are described in the following table. Table 2: Summary of FTP Protocol Error Codes <protocol error>...
  • Page 45 UMTS/HSPA Module Series WCDMA UGxx FTP AT Commands Manual Appendix A Reference Table 3: Related Documents Document Name Remark RFC959 File Transfer Protocol Quectel_WCDMA_UGxx_TCPIP_AT_ Introduction about UGxx TCPIP AT commands Commands_Manual Quectel_WCDMA_UGxx_FILE_AT_ Introduction about UGxx file AT commands Commands_Manual Quectel_WCDMA_UGxx_AT_Commands_ UGxx AT commands manual Manual Table 4: Terms and Abbreviations...

Table of Contents