페이지 선택
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in pages
AT Commands for  FTP Application

 

 

No Command Description
C1001 AT+FTPPORT Set FTP control port
C1002 AT+FTPMODE Set active or passive FTP mode
C1003 AT+FTPTYPE Set the type of data to be transferred
C1004 AT+FTPPUTOPT Set FTP put type
C1005 AT+FTPCID Set FTP bearer profile identifier
C1006 AT+FTPREST Set resume broken download
C1007 AT+FTPSERV Set FTP server address
C1008 AT+FTPUN Set FTP user name
C1009 AT+FTPPW Set FTP password
C1010 AT+FTPGETNAME Set download file name
C1011 AT+FTPGETPATH Set download file path
C1012 AT+FTPPUTNAME Set upload file name
C1013 AT+FTPPUTPATH Set upload file path
C1014 AT+FTPGET Download file
C1015 AT+FTPPUT Set upload file
C1016 AT+FTPDELE Delete specified file in FTP server
C1017 AT+FTPSIZE Get the size of specified file in FTP server
C1018 AT+FTPSTATE Get the FTP state
C1019 AT+FTPEXTPUT Extend upload file
C1020 AT+FTPMKD Make directory on the remote machine
C1021 AT+FTPRMD Remove directory on the remote machine
C1022 AT+FTPLIST List contents of directory on the remote machine
C1023 AT+FTPEXTGET Extend download file
C1024 AT+FTPETPUT Upload File
C1025 AT+FTPETGET Download File
C1026 AT+FTPQUIT Quit current FTP session
C1027 AT+FTPRENAME Rename the Specified File on the Remote Machine
C1028 AT+FTPMDTM Get The Last Modification Timestamp Of Specified File On The Remote Machine

 

 

 

 

C1001      AT+FTPPORT      Set FTP Control Port

 

T) AT+FTPPORT=? OK
R) AT+FTPPORT?

+FTPPORT: <value>

 

OK

Parameters

See Write Command

W) AT+FTPPORT=<value>

OK

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<value>      

The value of FTP Control port, from 1 to 65535.

Default value is 21

Parameter Saving Mode NO_SAVE
Reference

Note

Numbers above 65535 are illegal as the port identification fields are 16 bits long in the TCP header.

 

 

 

 

C1002     AT+FTPMODE      Set Active Or Passive FTP Mode

 

T) AT+FTPMODE=? OK
R) AT+FTPMODE?

+FTPMODE: <value>

 

OK

Parameters

See Write Command

W) AT+FTPMODE=<value> 

OK

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<value>      

0     Active FTP mode

1     Passive FTP mode

Parameter Saving Mode NO_SAVE

 

 

 

 

C1003     AT+FTPTYPE      Set The Type Of Data To Be Transferred

 

T) AT+FTPTYPE=? OK
R) AT+FTPTYPE?

+FTPTYPE: <value>

 

OK

Parameters

See Write Command

W) AT+FTPTYPE=<value>

OK

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<value>      

“A”     For FTP ASCII sessions

“I”     For FTP Binary sessions

Parameter Saving Mode NO_SAVE
Reference

Note

When this value is set to A, all the data sent by the stack to the FTP server is made of 7 bits characters

(NVT-ASCII: the MSB is set to 0).

As a consequence binary data containing 8 bits characters will be corrupted during the transfer if the

FTPTYPE is set to A.

 

 

 

 

C1004     AT+FTPPUTOPT      Set FTP Put Type

  

T) AT+FTPPUTOPT=? OK
R) AT+FTPPUTOPT?

+FTPPUTOPT: <value>

 

OK

Parameters

See Write Command

W) AT+FTPPUTOPT=<value>

OK

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<value>  

“APPE”     For appending file

“STOU”     For storing unique file

STOR”     For storing file

Parameter Saving Mode NO_SAVE

 

 

 

 

C1005     AT+FTPCID      Set FTP Bearer Profile Identifier

 

T) AT+FTPCID=? OK

Parameters

See Write Command

R) AT+FTPCID?

+FTPCID: <value>

 

OK

Parameter

See Write Command

W) AT+FTPCID=<value>

OK

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<value>     Bearer profile identifier refer to AT+SAPBR

Parameter Saving Mode NO_SAVE

 

 

 

 

C1006     AT+FTPREST      Set Resume Broken Download

  

T) AT+FTPREST=? OK
R) AT+FTPREST?

+FTPREST: <value>

 

OK

Parameters

See Write Command

W) AT+FTPREST=<value>

OK

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<value>     Broken point to be resumed

Parameter Saving Mode NO_SAVE

 

 

 

 

C1007     AT+FTPSERV      Set FTP Server Address

 

T) AT+FTPSERV=? OK
R) AT+FTPSERV?

+FTPSERV: <value>

 

OK

Parameters

See Write Command

W) AT+FTPSERV=<value>

OK

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<value>     32-bit number in dotted-decimal notation (i.e. xxx.xxx.xxx.xxx) or alphanumeric

ASCII text string up to 49 characters if DNS is available

Parameter Saving Mode NO_SAVE

 

 

 

 

C1008     AT+FTPUN      Set FTP User Name

  

T) AT+FTPUN=? OK

Parameters

See Write Command

R) AT+FTPUN?

+FTPUN: <value>

 

OK

Parameters

See Write Command

W) AT+FTPUN=<value>

OK

 

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<value>     Alphanumeric ASCII text string up to 49 characters.

Parameter Saving Mode NO_SAVE

 

 

 

 

C1009     AT+FTPPW      Set FTP Password

 

T) AT+FTPPW=? OK

Parameters

See Write Command

R) AT+FTPPW?

+FTPPW: <value>

 

OK

Parameters

See Write Command

W) AT+FTPPW=<value>

OK

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<value>     Alphanumeric ASCII text string up to 49 characters.

Parameter Saving Mode NO_SAVE

 

 

 

 

C1010     AT+FTPGETNAME      Set Download File Name

  

T) AT+FTPGETNAME=? OK
R) AT+FTPGETNAME?

+FTPGETNAME: <value>

 

OK

Parameters

See Write Command

W) AT+FTPGETNAME=<value>

OK

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<value>     Alphanumeric ASCII text string up to 99 characters

Parameter Saving Mode NO_SAVE

 

 

 

 

C1011     AT+FTPGETPATH      Set Download File Path

 

T) AT+FTPGETPATH=? OK
R) AT+FTPGETPATH?

+FTPGETPATH: <value>

 

OK

Parameters

See Write Command

W) AT+FTPGETPATH=<value>

OK

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<value>     Alphanumeric ASCII text string up to 255 characters

Parameter Saving Mode NO_SAVE

 

 

 

 

C1012     AT+FTPPUTNAME      Set Upload File Name 

   

T) AT+FTPPUTNAME=? OK
R) AT+FTPPUTNAME?

+FTPPUTNAME: <value>

 

OK

Parameters

See Write Command

W) AT+FTPPUTNAME=<value>

OK

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<value>     Alphanumeric ASCII text string up to 99 characters

Parameter Saving Mode NO_SAVE

 

 

 

 

C1013     AT+FTPPUTPATH      Set Upload File Path

 

T) AT+FTPPUTPATH=? OK
R) AT+FTPPUTPATH?

+FTPPUTPATH: <value>

 

OK

Parameters

See Write Command

W) AT+FTPPUTPATH=<value>

OK

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<value>     Alphanumeric ASCII text string up to 255 characters

Parameter Saving Mode NO_SAVE

 

 

 

 

C1014     AT+FTPGET      Download File

  

T) AT+FTPGET=? OK
W) AT+FTPGET=<mode>[,<reqlength>]

If mode is 1 and it is a successful FTP get session:

OK

 

+FTPGET: 1,1

 

If data transfer finished:

+FTPGET: 1,0

 

If mode is 1 and it is a failed FTP get session:

OK

 

+FTPGET: 1,<error>

 

If mode is 2:

+FTPGET: 2,<cnflength>

012345678…

OK

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<mode>    

1     For opening FTP get session

2     For reading FTP download data.

<reqlength>     Requested number of data bytes (1-1460)to be read

<cnflength>

Confirmed number of data bytes to be read, which may be less than <length>.

0 indicates that no data can be read.

<error>     

61     Net error

62     DNS error

63     Connect error

64     Timeout

65     Server error

66     Operation not allow

70     Replay error

71     User error

72     Password error

73     Type error

74     Rest error

75     Passive error

76     Active error

77     Operate error

78     Upload error

79     Download error

80     Manual quit

Parameter Saving Mode NO_SAVE
Max Response Time 75 seconds(In case no response is received from server)
Reference

Note

When “+FTPGET: 1,1” is shown, then use “AT+FTPGET=2,<reqlength>” to read data.

If the module still has unread data, “+FTPGET: 1,1” will be shown again in a certain time.

 

 

 

 

C1015     AT+FTPPUT      Set Upload File

 

T) AT+FTPPUT=? OK
W) AT+FTPPUT=<mode>[,<reqlength>]

If mode is 1 and it is a successful FTP get session:

OK

 

+FTPPUT: 1,1,<maxlength>

 

If mode is 1 and it is a failed FTP get session:

OK

 

+FTPPUT: 1,<error>

 

If mode is 2 and <reqlength> is not 0

+FTPPUT: 2,<cnflength>

…… //Input data

OK

+FTPPUT: 1,1,1360

 

If mode is 2 and <reqlength> is 0, it will respond OK, and FTP session will be closed

OK

 

If data transfer finished.

+FTPPUT: 1,0

 

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<mode>          

1     For opening FTP put session

2     For writing FTP upload data.

<reqlength>     Requested number of data bytes(0-<maxlength>) to be transmitted

<cnflength>     Confirmed number of data bytes to be transmitted

<maxlength>     The max length of data can be sent at a time. It depends on the network status.

<error>     See “AT+FTPGET

Parameter Saving Mode NO_SAVE
Max Response Time 75 seconds(In case no response is received from server)
Reference

Note

When “+FTPPUT: 1,1,<maxlength>” is shown, then use “AT+FTPPUT=2, <reqlength>” to write data.

 

 

 

 

C1016     AT+FTPDELE      Delete Specified File In FTP Server

 

T) AT+FTPDELE=? OK

Parameters

See Execution Command

E) AT+FTPDELE

If successed:

OK

 

+FTPDELE: 1,0

 

If failed:

OK

 

+FTPDELE: 1,<error>

 

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<error>     See “AT+FTPGET

Parameter Saving Mode NO_SAVE
Max Response Time 75 seconds(In case no response is received from server)
Reference

Note

The file to be deleted is specified by the “AT+FTPGETNAME” and “AT+FTPGETPATH” commands.

 

 

 

 

C1017     AT+FTPSIZE      Get The Size Of Specified File In FTP Server

 

T) AT+FTPSIZE=? OK

Parameters

See Execution Command

E) AT+FTPSIZE

If successed:

OK

 

+FTPSIZE: 1,0,<size>

 

If failed:

OK

 

+FTPSIZE: 1,<error>,0

 

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<error>     See “AT+FTPGET

<size>     The file size. Unit: byte

Parameter Saving Mode NO_SAVE
Max Response Time 75 seconds(In case no response is received from server)
Reference

Note

The file is specified by the “AT+FTPGETNAME” and “AT+FTPGETPATH” commands.

 

 

 

 

 

C1018     AT+FTPSTATE      Get The FTP State

 

T) AT+FTPSTATE=? OK

Parameters

See Execution Command

E) AT+FTPSTATE

+FTPSTATE: <state>

 

OK

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<state>

0     Idle

1     In the FTP session, including FTPGET, FTPPUT, FTPDELE and FTPSIZE operation.

Parameter Saving Mode NO_SAVE

 

 

 

 

C1019     AT+FTPEXTPUT      Extend Upload File

 

T) AT+FTPEXTPUT=? OK
W) AT+FTPEXTPUT=<mode>[,<pos>,<len>,<time out>]

If mode is 0 or 1

OK

 

If mode is 2

+FTPEXTPUT: <address>,<len>

…… //Input data

OK

 

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<mode>      

0     use default FTPPUT method

1     use extend FTPPUT method

2     send data to RAM through serial port, then FTPPUT method will get the data from RAM.

<pos>     data offset address 0-300k

<len>     data length 0-300k

<timeout>     timeout value of serial port. 1000ms-1000000ms

<file name>     File name length should less or equal 50 characters.

<err>     See “AT+FTPGET”

Parameter Saving Mode NO_SAVE
Max Response Time 75 seconds(In case no response is received from server)
Reference

Note

When extend FTPPUT mode is activated, input data then execute “AT+FTPPUT=1” to transmit, after session

is complete, if successful, it returns “+FTPPUT: 1,0”, otherwise it returns “+FTPPUT: 1,<error>”, <error> see

“AT+FTPGET”.

 

 

 

 

C1020     AT+FTPMKD      Make Directory On The Remote Machine

  

T) AT+FTPMKD=? OK
E) AT+FTPMKD

If success:

OK

 

+FTPMKD: 1,0

 

If failed:

OK

 

+FTPMKD: 1,<error>

 

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<error>     See “AT+FTPGET

Parameter Saving Mode NO_SAVE
Max Response Time 75 seconds(In case no response is received from server)
Reference

Note

The created folder is specified by the “AT+FTPGETPATH” command.

 

 

 

 

C1021     AT+FTPRMD      Remove Directory On The Remote Machine

 

T) AT+FTPRMD=? OK
E) AT+FTPRMD

If success:

OK

 

+FTPRMD: 1,0

 

If failed:

OK

 

+FTPRMD: 1,<error>

 

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<error>     See “AT+FTPGET

Parameter Saving Mode NO_SAVE
Max Response Time 75 seconds(In case no response is received from server)
Reference

Note

The removed folder is specified by the “AT+FTPGETPATH” command.

 

 

 

 

C1022     AT+FTPLIST      List Contents Of Directory On The Remote Machine

 

T) AT+FTPLIST=? OK
W) AT+FTPLIST=<mode>[,<reqlength>]

If mode is 1 and it is a successful FTP get session:

OK

 

+FTPLIST: 1,1

 

If data transfer is finished:

+FTPLIST: 1,0

 

If mode is 1 and it is a failed FTP get session:

OK

 

+FTPLIST: 1,<error>

 

If mode is 2:

+FTPLIST: 2,<cnflength> 012345678…

OK

 

If error is related to ME functionality:

+CME ERROR: <err>

Parameters

<mode>

1     For opening FTP get file list session

2     For reading FTP file list

<reqlength>     Requested number of data bytes (1-1460) to be read

<cnflength>

Confirmed number of data bytes to be read, which may be less than <reqlength>.

0 indicates that no data can be read.

<error>     See “AT+FTPGET

Parameter Saving Mode NO_SAVE
Max Response Time 75 seconds(In case no response is received from server)
Reference

Note

When “+FTPLIST: 1,1” is shown, “AT+FTPLIST=2,<reqlength>” can be used to read data.

If the module still has unread data, “+FTPLIST: 1,1” will be shown again in a certain time.

If using “AT+FTPGETPATH” to set a directory path, it will returned the files contents under this directory;

if set a file path, it will return the information of the file specified.

 

 

 

 

C1023     AT+FTPEXTGET      Extend Download File

 

T) AT+FTPEXTGET=? OK

Parameters

See Write Command

R) AT+FTPEXTGET?

+FTPEXTGET: <mode>,<length>

OK

Parameters

See Write Command

 

 

 

 

 

 

 

 

 

 

 

W)

1) if mode is 0 or 1 AT+FTPEXTGET=<mode>

 

2) if mode is 3

AT+FTPEXTGET=<mode>,<pos>,<len>

If mode is 0:

OK

 

If mode is 1 and successfully download data:

OK

 

+FTPEXTGET: 1,0

 

If mode is 1 and failed to download data:

OK

 

+FTPEXTGET: 1,<error>

 

If mode is 3 and successfully download data:

+FTPEXTGET: 3,<length> 0123456…

OK

If <file name> is already exist in flash:

ERROR

Parameters

<mode>      

0     use default FTPGET method.

1     open extend FTP get session and download data to RAM.

3     read the downloaded data from RAM, then output it to the serial port.

<file name>     File name length should less than or equal to 50 characters.

<pos>     data offset should less than <length>.

<len>     data length 0-300k.

<length>     The length of the downloaded data from the remote machine.

<error>     See “AT+FTPGET”

Parameter Saving Mode NO_SAVE
Max Response Time 75 seconds(In case no response is received from server)
Reference

Note

The data it can get is 300k at most.

 

 

 

 

C1024     AT+FTPETPUT      Upload File

 

T) AT+FTPETPUT=? OK

Parameters

See Write Command

W) AT+FTPETPUT=<mode> 

If mode is 1 and successfully open PUT session:

OK

 

+FTPETPUT: 1,1

 

If mode is 1 and failed to open PUT session:

OK

 

+FTPETPUT: 1,<error>

 

If mode is 2:

+FTPETPUT: 2,1

//Input data

<ETX> //To notify the module that all data has been sent, switch from data mode to command mode

OK

 

If data transfer finished:

+FTPETPUT: 1,0

 

If data transfer failed:

+FTPETPUT: 1,<error>

Parameters

<mode>      

1     For opening FTPETPUT session.

2     For writing FTP upload data.

<error>     See “AT+FTPEXTGET”

Parameter Saving Mode NO_SAVE
Reference

Note

The TCP/IP stack will only interpret an <ETX> character as the end of the file to be transferred if

it’s not preceded by a <DLE> character.

As a consequence the attached host must send <ETX> characters preceded by <DLE> characters

and it must also code <DLE> characters in <DLE><DLE>.

 

 

 

 

C1025     AT+FTPETGET      Download File

 

T) AT+FTPETGET=? OK

Parameters

See Write Command

W) AT+FTPETGET=<mode> 

If mode is 1 and successfully open GET session:

OK

 

+FTPETGET: 1,1

 

If data transfer finished:

0123456789…

<ETX> //To notify the user that all data transfer has been finished, switch from data mode to command mode.

 

+FTPETGET: 1,0

 

If mode is 1 and failed to download data:

OK

 

+FTPETGET: 1,<error>

Parameters

<mode>      

1     Open FTPETGET session and download data.

<error>     See “AT+FTPEXTGET”

Parameter Saving Mode NO_SAVE
Reference

Note

Each <ETX> character present in the payload data of the FTP flow will be coded by the TCP/IP stack on the

serial port as <DLE><ETX>.

Each <DLE> character will be coded as <DLE><DLE>.

The attached host must then decode the FTP flow to remove these escape characters.

 

 

 

 

C1026     AT+FTPQUIT      Quit Current FTP Session

 

T) AT+FTPQUIT=? OK
E) AT+FTPQUIT

If the current operation is GET method:

OK

 

+FTPGET: 1,80

 

If the current operation is PUT method:

OK

 

+FTPPUT: 1,80

 

If FTP is in idle state:

ERROR

Parameter Saving Mode NO_SAVE

 

 

 

 

C1027     AT+FTPRENAME      Rename The Specified File On The Remote Machine

 

T) AT+FTRENAME=? OK

Parameters

See Execution Command

E) AT+FTPRENAME

If success:

OK

+FTPRENAME: 1,0

 

If failed:

OK

 

+FTPRENAME: 1,<error>

 

If error is related to ME functionality:

+CME ERROR: <err>

Parameter

<error>     See “AT+FTPGET”

Parameter Saving Mode NO_SAVE
Reference

Note

The file is specified by the “AT+FTPGETNAME” and “AT+FTPGETPATH” commands.

The new file name is set by “AT+FTPPUTNAME” and “AT+FTPPUTPATH” command.

 

 

 

 

C1028     AT+FTPMDTM      Get The Last Modification Timestamp Of Specified File On The Remote Machine

 

T) AT+FTPMDTM=? OK

Parameters

See Execution Command

E) AT+FTPMDTM

If success:

OK

 

+FTPMDTM: 1,0,<timestamp>

 

If failed:

OK

 

+FTPMDTM: 1,<error>

 

If error is related to ME functionality:

+CME ERROR: <err>

Parameter

<error>     See “AT+FTPGET”

<timestamp>     The last modification timestamp of the specified file.

Parameter Saving Mode NO_SAVE
Reference

Note

The file is specified by the “AT+FTPGETNAME” and “AT+FTPGETPATH” commands.

 

 

 

 

Adsense

 

 WiFi IoT Module

 

www.mxchip.com

 

 

 Bluetooth Module

www.feasycom.com

 

 

 5G/LTE/CAT-M1/NB-IoT

 

www.simcom.com

 

Viewed Page List