background image

                                                                                                                                             

UMTS/HSPA  Module  Series 

                                                                                WCDMA  UGxx  FTP  AT  Commands  Manual

 

 

WCDMA_UGxx_FTP_AT_Commands_Manual                    Confidential / Released                      29 / 44 

 
 

 

Parameter

 

<ftpstat>               

Integer type, indicates the current status of FTP services 

 

0   

Opening an FTP service 

 

1   

The FTP service is opened and idle 

 

2   

Transferring data with FTP server 

 

3   

Closing the FTP service 

 

4

   

The FTP service is closed 

<err> 

Integer type, indicates the operation error code. It is the type of error (Please refer to 

the Chapter 4)

 

 

2.16. AT+QFTPCLOSE    Logout from FTP Server 

 
Logout from FTP server. If “OK” is returned, “+QFTPCLOSE: <err>,<protocol_error>” should be output in 
<timeout> set by AT+QFTPCFG. Otherwise, you should deactivate and reactive the network. 

Parameter

 

<err>         

 

Integer type, indicates the operation error code. It is the type of error (Please refer 

 

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 

 

or 

+CME ERROR: <err>

 

AT+QFTPCLOSE    Logout from FTP Server           

Test Command     

AT+QFTPCLOSE=? 

Response 

 

OK

 

Execute Command 

AT+QFTPCLOSE 

Response   

OK 

 

+QFTPCLOSE: <err>,<protocol_error> 

or 

+CME ERROR: <err>

 

Quectel 

Confidential

Summary of Contents for 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: ...MERS 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 T...

Page 3: ... Released 2 44 About the Document History Revision Date Author Description 1 0 2014 12 13 Jonathan WEN Initial 1 1 2015 03 06 Jessica GENG Changed the document name from UG95 to UGxx 1 2 2015 04 01 Jessica GENG Updated applicable modules 1 3 2016 05 05 Sophie ZHU Added Error Code 631 Quectel Confidential ...

Page 4: ...18 2 7 AT QFTPSIZE Get the File Size on FTP Server 20 2 8 AT QFTPDEL Delete the File on FTP Server 21 2 9 AT QFTPMKDIR Make a Folder on FTP Server 22 2 10 AT QFTPRMDIR Delete an Empty Folder on FTP Server 23 2 11 AT QFTPLIST List Contents of Directory on FTP Server 23 2 12 AT QFTPNLST List File Names of Directory on FTP Server 25 2 13 AT QFTPRENAME Rename a File or Folder on FTP Server 27 2 14 AT ...

Page 5: ... Series WCDMA UGxx FTP AT Commands Manual WCDMA_UGxx_FTP_AT_Commands_Manual Confidential Released 4 44 4 Summary of Error Codes 41 5 Summary of FTP Protocol Error Codes 43 6 Appendix A Reference 44 Quectel Confidential ...

Page 6: ...nds Manual WCDMA_UGxx_FTP_AT_Commands_Manual Confidential Released 5 44 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 Quectel Confidential ...

Page 7: ...contextid contextID You should activate the PDP context first Step 2 Configure FTP service settings 1 Configure account information by AT QFTPCFG account username password 2 Configure file type by AT QFTPCFG filetype file_type The file type means the transferred data between FTP server and client is binary data or ASCII data 3 Configure the transfer mode by AT QFTPCFG transmode transmode The trans...

Page 8: ...f a directory by AT QFTPLIST 4 List file names of a directory by AT QFTPNLST 5 Rename a directory by AT QFTPRENMAE 6 Delete a directory by AT QFTPRMDIR Step 6 Close connection with FTP server Close the connection with FTP server by AT QFTPCLOSE and the URC QFTPCLOSE 0 0 will be reported it indicates the operation is successful Step 3 to Step 6 can be repeated Step 7 Deactivate PDP context Deactiva...

Page 9: ...M which means data will be received from or output to COM port the module will enter into data mode You can exit from data mode by inputting or changing DTR level from low to high Else you can reenter data mode by executing ATO command when executing AT QFTPGET AT QFTPLIST and AT QFTPNLST You can t reenter data mode by ATO when executing AT QFTPPUT 1 4 Error Handling 1 4 1 Executing FTP AT Command...

Page 10: ...DNS Parse Fails When executing AT QFTPOPEN command if QFTPOPEN 604 0 is returned please check the following aspects 1 Make sure the domain name of FTP server is valid 2 Query the status of PDP context by executing AT QIACT command to make sure the specified PDP context has been activated successfully 1 4 4 Error Response of FTP Server If the protocol_error in QFTPXX err protocol_error is not 0 it ...

Page 11: ...est Command AT QFTPCFG Response QFTPCFG account username password QFTPCFG filetype 0 1 QFTPCFG transmode 0 1 QFTPCFG contextid 1 20 QFTPCFG rsptimeout 20 180 QFTPCFG ssltype 0 1 QFTPCFG sslctxid 0 5 OK Write Command AT QFTPCFG account usernam e password Response If username and password are not omitted OK or CME ERROR err Else query the current settings QFTPCFG account username password OK Write C...

Page 12: ...esponse If contextID is not omitted OK or CME ERROR err Else query the current settings QFTPCFG contextid contextID OK Write Command AT QFTPCFG rsptimeout timeou t Response If timeout is not omitted OK or CME ERROR err Else query the current settings QFTPCFG rsptimeout timeout OK Write Command AT QFTPCFG ssltype ssl_type Response If ssl_type is not omitted OK or CME ERROR err Else query the curren...

Page 13: ...the range is 20 180 the unit is second and the default value is 90s Generally it is the timeout value for most QFTPXXX xx xx after the result code OK is returned except the commands QFTPPUT QFTPGET QFTPLST QFTPNLST The rules for these four commands are shown as below 1 When the command has been sent but CONNECT has not been output yet this parameter indicates the maximum interval time for CONNECT ...

Page 14: ...gin to FTP Server Test Command AT QFTPOPEN Response QFTPOPEN hostname port OK Write Command AT QFTPOPEN hostname port Response OK QFTPOPEN err protocol_error or CME ERROR err hostname String type the IP address or domain name of the FTP server The maximum size of the parameter is 50 bytes port Integer type the port of the FTP server The default value is 21 err Integer type indicates the operation ...

Page 15: ... QFTPCWD Set the Current Directory on FTP Server Test Command AT QFTPCWD Response QFTPCWD path_name OK Write Command AT QFTPCWD path_name Response OK QFTPCWD err protocol_error or CME ERROR err path_name String type a directory path on FTP server The maximum size of the parameter is 100 bytes The root path of FTP server is err Integer type indicates the operation error code It is the type of error...

Page 16: ...T QFTPCFG If the local_name is not COM OK will be output first QFTPPUT 0 transferlen will be output after data being transferred completely If the module has entered data mode the timeout set by AT QFTPCFG indicates the maximum interval time between two packets of received transmitted data If the local name is not COM the timeout set by AT QFTPCFG indicates the maximum interval time between two pa...

Page 17: ...the parameter is 60 bytes If it is COM the file data will be input from COM port If it starts with RAM the file is from RAM After being uploaded successfully you should delete the file by AT QFDEL For details please refer to Quectel_ WCDMA_UGxx_FILE_AT_Commands_Manual startpos Integer type the start position of file to be put The default value is 0 If the uploadlen and beof is specified the startp...

Page 18: ... Upload a file from RAM to FTP server AT QFUPL RAM test1 txt 1000 300 1 Upload a file to RAM the file will be saved as test1 txt and the maximum size of file is 1000 300 indicates timeout 1 indicates ACK mode Please refer to Quectel_WCDMA_UGxx_FILE_AT_Commands_Manual CONNECT Input 1000 bytes data QFUPL 1000 707 1 The last packet of data when data reached uploadlen module will exit from data mode a...

Page 19: ... to RAM by AT QFTPGET filename RAM localname After file being transferred completely the module will output QFTPGET 0 transferlen If the local_name is COM CONNECT should be output in timeout set by AT QFTPCFG If the local_name is not COM OK will be output first QFTPGET 0 transferlen will be output after data being transferred completely If the module has entered data mode the timeout set by AT QFT...

Page 20: ... specified module will output downloadlen bytes to COM and exit from data mode You can continue to get data from startpos by the same AT command if there is data left transferlen Integer type the actually transferred data length If it is less than downloadlen it means the whole file is transferred completely err Integer type indicates the operation error code It is the type of error Please refer t...

Page 21: ...first 500 bytes CONNECT Output file data OK QFTPGET 0 500 AT QFTPGET test txt COM 500 500 Download 500 1000 bytes CONNECT Output file data OK QFTPGET 0 500 Download a file and save it to RAM AT QFTPGET test txt RAM test2 txt 0 OK QFTPGET 0 1000 AT QFLST RAM QFLST RAM test2 txt 1000 OK 2 7 AT QFTPSIZE Get the File Size on FTP Server Get the file size on FTP server If OK is returned QFTPSIZE 0 file_...

Page 22: ...ccessfully get the file size QFTPSIZE 0 file_size Else fail to get the file size QFTPSIZE err protocol_error or CME ERROR err file_name String type the file name in FTP server The maximum size of the parameter is 50 bytes file_size Integer type the size of file on FTP server err Integer type indicates the operation error code It is the type of error Please refer to the Chapter 4 protocol_error Int...

Page 23: ...TPMKDIR err protocol_error should be output in timeout set by AT QFTPCFG Otherwise you should close the FTP connection deactivate and reactive the network Parameter QFTPDEL err protocol_error or CME ERROR err AT QFTPMKDIR Make a File Folder on FTP Server Test Command AT QFTPMKDIR Response QFTPMKDIR folder_name OK Write Command AT QFTPMKDIR folder_name Response OK QFTPMKDIR err protocol_error or CM...

Page 24: ...size will be output after contents being transferred completely If the module has entered data mode the timeout set by AT QFTPCFG indicates the maximum interval time between two packets of received transmitted data If the local name is not COM the timeout meaningless AT QFTPRMDIR Delete an Empty Folder on FTP Server Test Command AT QFTPRMDIR Response QFTPRMDIR folder_name OK Write Command AT QFTPR...

Page 25: ...OK If successfully list contents of the directory QFTPLIST 0 transfer_size Else fail to list contents of the directory QFTPLIST err protocol_error or CME ERROR err dirname String type the folder name on FTP server The maximum size of the parameter is 100 bytes If it is it will get the content of current directory set by AT QFTPCWD local_name String type the local position to save data from FTP ser...

Page 26: ...eout set by AT QFTPCFG Else OK will be returned first QFTPNLST 0 transfer_size will be output after file names being transferred completely If the module has entered data mode the timeout set by AT QFTPCFG indicates the maximum interval time between two packets of received transmitted data If the local_name is not COM the timeout set by AT QFTPCFG indicates the maximum interval time between two pa...

Page 27: ...erver The maximum size of the parameter is 100 bytes If it is it will get the content of current directory set by AT QFTPCWD 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 If it starts with RAM the data will be saved to RAM Then you can read the file by AT...

Page 28: ...in timeout set by AT QFTPCFG Otherwise you should close the FTP connection deactivate and reactive the network Parameter AT QFTPRENAME Rename a File or Folder on FTP Server Test Command AT QFTPRENAME Response QFTPRENAME old_name new_name OK Write Command AT QFTPRENAME old_name ne w_name Response OK QFTPRENAME err protocol_error or CME ERROR err old_name String type the old file name or folder name...

Page 29: ...rror code It is the type of error Please refer to the Chapter 4 2 15 AT QFTPSTAT Get the Status of FTP Service Get the status of FTP service 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 AT QFTPLEN Get the Transferred Data Length Test Command AT Q...

Page 30: ... FTP Server Logout from FTP server If OK is returned QFTPCLOSE err protocol_error should be output in timeout set by AT QFTPCFG Otherwise you should deactivate and reactive the network Parameter err Integer type indicates the operation error code It is the type of error Please refer to the Chapter 4 protocol_error Integer type for reference only indicates the original error code from FTP server wh...

Page 31: ...st Standardized File and Directory Information Test Command AT QFTPMLSD Response QFTPMLSD dirname local_name OK Write Command AT QFTPMLSD dirname COM Response CONNECT Output content data OK If successfully list standardized file and directory information QFTPMLSD 0 transfer_size Else fail to list standardized file and directory information QFTPMLSD err protocol_error or CME ERROR err Write Command...

Page 32: ...TP connection deactivate and reactive the network 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 If it starts with RAM the data will be saved to RAM Then you can read the file by AT QFREAD For more details please refer to Quectel_WCDMA_UGxx_FILE_AT_Command...

Page 33: ...RROR err file_name String type the file name in FTP server The maximum size of the parameter is 50 bytes modify_time String type the file modification time on FTP server The format is YYYYMMDDHHMMSS or YYYYMMDDHHMMSS NNN err Integer type indicates the operation error code It is the type of error Please refer to the Chapter 4 protocol_error Integer type for reference only indicates the original err...

Page 34: ...lly AT QIACT Query the state of PDP context QIACT 1 1 1 10 7 157 1 OK AT QFTPCFG contextid 1 Set the PDP context ID as 1 The PDP context ID must be activated before OK Step 2 Configure user account and transfer settings AT QFTPCFG account test test Set user name and password OK AT QFTPCFG filetype 1 Set file type as Binary OK AT QFTPCFG transmode 1 Set transfer mode as Passive mode OK AT QFTPCFG r...

Page 35: ...te a folder as TEST in FTP server OK QFTPMKDIR 0 0 AT QFTPRENAME TEST TEST_NEW Rename a folder OK QFTPRENAME 0 0 AT QFTPRMDIR TEST_NEW Delete a folder OK QFTPRMDIR 0 0 3 3 File Operation AT QFTPCWD Set current directory OK QFTPCWD 0 0 AT QFTPPWD Query current directory OK QFTPPWD 0 AT QFTPSIZE test_my1 txt Query size of test_my1 txt on FTP server OK QFTPSIZE 0 1000 AT QFTPRENAME test_my1 txt test_...

Page 36: ...PLIST 0 1000 AT QFTPLIST RAM list txt List file information of current directory and output to RAM list txt OK QFTPLIST 0 1000 AT QFTPLIST TEST_2 COM List file information of TEST_2 and output to COM CONNECT Output content data OK QFTPLIST 0 1000 AT QFTPNLST List file names of current directory and output to COM CONNECT Output content data OK QFTPNLST 0 1000 AT QFTPNLST RAM nlst txt List file info...

Page 37: ... 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 OK QFTPPUT 0 1000 AT QFTPLEN QFTPLEN 0 1000 OK AT QFTPSIZE test_my txt OK QFTPSIZE 0 1000 Upload a file from COM and the start position is 1000 AT QFTPPUT test_my txt COM 1000 All data will be saved as test txt in FTP server CONNECT Input file data OK QFTPPUT 0 500 AT QFTPSIZE tes...

Page 38: ... OK Data length reaches 1024 QFTPPUT 0 1024 Upload a file from RAM to FTP server AT QFUPL RAM test_ram txt 1000 300 1 Upload a file to RAM the file will be saved as test_ram txt and the maximum of file size is 1000 300 indicates timeout 1 indicates ACK mode Please refer to Quectel_WCDMA_ UGxx_FILE_AT_Commands_Manual CONNECT Input 1000 bytes data QFUPL 1000 707 OK AT QFLST RAM QFLST RAM test_ram tx...

Page 39: ...ata OK 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 is 1000 bytes download the first 500 bytes CONNECT Output file data OK QFTPGET 0 500 AT QFTPGET test txt COM 500 500 Download 500 1000 bytes CONNECT Output file data OK QFTPGET 0 500 Download a file from FTP server and save to RAM AT QFTPGET test_my1 txt RAM ...

Page 40: ...7 Logout from FTP Server AT QFTPCLOSE Logout from FTP server OK QFTPCLOSE 0 0 AT QIDEACT 1 Deactivate the PDP context which was activated for FTP OK 3 8 FTPS Configuration Step 1 Configure and activate the PDP context AT QICSGP 1 1 UNINET 1 Configure PDP context 1 APN is UNINET for China Unicom OK AT QIACT 1 Activate PDP context 1 OK Activate successfully AT QIACT Query the state of PDP context QI...

Page 41: ...lue OK Step 3 FTPS configuration AT QFTPCFG ssltype 1 Set SSL type as 1 module plays as FTPS client OK AT QFTPCFG sslctxid 1 Select SSL context 1 OK AT QSSLCFG ciphersuite 1 0xffff Configure SSL cipher suite type as 0xffff which supports all cipher suite type OK AT QSSLCFG seclevel 1 0 Configure SSL security level as 0 which mean the SSL CA cert is not needed OK AT QSSLCFG sslversion 1 1 Configure...

Page 42: ...des err Meaning 0 Operate successfully 601 Unknown error 602 FTP service would block 603 FTP service busy 604 DNS parse fails 605 Network error 606 Control connection closed 607 Data connection closed 608 Socket closed by peer 609 Timeout error 610 Invalid parameter 611 Fail to open file 612 File position invalid 613 File error 614 Service not available closing control connection 615 Open data con...

Page 43: ...rage 620 Syntax error command unrecognized 621 Syntax error in parameters or arguments 622 Command not implemented 623 Bad sequence of commands 624 Command parameter not implemented 625 Not logged in 626 Need account for storing files 627 Requested action not taken 628 Requested action aborted page type unknown 629 Requested file action aborted 630 Requested file name invalid 631 SSL authenticatio...

Page 44: ...25 Open data connection fails 426 Connection closed transfer aborted 450 Requested file action not taken 451 Requested action aborted local error in processing 452 Requested action not taken insufficient system storage 500 Syntax error command unrecognized 501 Syntax error in parameters or arguments 502 Command not implemented 503 Bad sequence of commands 504 Command parameter not implemented 530 ...

Page 45: ...File Transfer Protocol 2 Quectel_WCDMA_UGxx_TCPIP_AT_ Commands_Manual Introduction about UGxx TCPIP AT commands 3 Quectel_WCDMA_UGxx_FILE_AT_ Commands_Manual Introduction about UGxx file AT commands 4 Quectel_WCDMA_UGxx_AT_Commands_ Manual UGxx AT commands manual Abbreviation Description FTP File Transfer Protocol PDP Packet Data Protocol DTR Data Terminal Ready PPP Point to Point Protocol DNS Dom...

Reviews: