sim900: AT commands for FTP

Status
Not open for further replies.

syeda amna

Full Member level 4
hi
I am trying to download and upload a file to an FTP server. i m using FileZilla server. I have done these steps. All queries are working well. what are the errors?
Code:
AT
OK

AT+CGATT=1
OK
AT+CGDCONT=1,"IP","UFONEGPRS"
OK
OK
AT+SAPBR=3,1,"Contype","GPRS"
OK
AT+SAPBR=3,1,"APN","UFONEGPRS"
OK
AT+SAPBR=1,1
OK
AT+FTPCID=1
OK
AT+FTPSERV="127.0.0.1"
OK
AT+FTPPORT=21
OK
AT+FTPUN="amna"
OK
AT+FTPPW="amna"
OK
AT+FTPPUTNAME="AMNA"
OK
AT+FTPPUTPATH="d:\fILEZILLA"
OK
AT+FTPPUT=1
OK
AT+FTPPUT=2,100
ERROR
AT+FTPPUT=2,100
ERROR
AT+FTPPUT=2,100
ERROR

+FTPPUT:1,63

AT+FTPGETNAME="amna.txt"
OK
AT+FTPGETPATH="D:\"
OK
AT+FTPGET=1
OK
AT+FTPGET=2,512
ERROR

+FTPGET:1,63

Last edited:

Plz help me

Echo wang

Member level 2
hi
I am trying to download and upload a file to an FTP server. i m using FileZilla server. I have done these steps. All queries are working well. what are the errors?
Code:
AT
OK

AT+CGATT=1
OK
AT+CGDCONT=1,"IP","UFONEGPRS"
OK
OK
AT+SAPBR=3,1,"Contype","GPRS"
OK
AT+SAPBR=3,1,"APN","UFONEGPRS"
OK
AT+SAPBR=1,1
OK
AT+FTPCID=1
OK
AT+FTPSERV="127.0.0.1"
OK
AT+FTPPORT=21
OK
AT+FTPUN="amna"
OK
AT+FTPPW="amna"
OK
AT+FTPPUTNAME="AMNA"
OK
AT+FTPPUTPATH="d:\fILEZILLA"
OK
AT+FTPPUT=1
OK
AT+FTPPUT=2,100
ERROR
AT+FTPPUT=2,100
ERROR
AT+FTPPUT=2,100
ERROR

+FTPPUT:1,63

AT+FTPGETNAME="amna.txt"
OK
AT+FTPGETPATH="D:\"
OK
AT+FTPGET=1
OK
AT+FTPGET=2,512
ERROR

+FTPGET:1,63

AT+CSQ
+CSQ: 21,0

OK
AT+CREG?
+CREG: 0,1

OK
AT+CGATT?
+CGATT: 1

OK
AT+CSTT

OK
AT+CIICR

OK
AT+CIFSR
172.20.199.189

GET:
AT+SAPBR=3,1,"CONTYPE","GPRS"

OK
AT+SAPBR=3,1,"APN","CMNET"

OK
AT+SAPBR=1,1

OK
AT+FTPCID=1

OK
AT+FTPTYPE="A"

OK
AT+FTPSERV="simcom.exavault.com"

OK
AT+FTPUN="zyf"

OK
AT+FTPPW="zyf"

OK
AT+FTPGETNAME="123.txt"

OK
AT+FTPGETPATH="/"

OK
AT+FTPGET=1

OK

+FTPGET:1,64
AT+FTPGETNAME="123.txt"

OK
AT+FTPGETPATH="/"

OK
AT+FTPGET=1
OK

+FTPGET:1,1
AT+FTPGET=2,1024

+FTPGET:2,1024
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
OK
AT+FTPGET=2,1024

+FTPGET:2,240
a
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

OK
AT+FTPGET=2,1024

+FTPGET:2,0

OK

+FTPGET:1,0

PUT:
AT+SAPBR=3,1,"CONTYPE","GPRS"

OK
AT+SAPBR=3,1,"APN","CMNET"

OK
AT+SAPBR=1,1

OK
AT+FTPCID=1

OK
AT+FTPTYPE="A"

OK
AT+FTPSERV="simcom.exavault.com"

OK
AT+FTPUN="zyf"

OK
AT+FTPPW="zyf"

OK
AT+FTPPUTNAME="111.txt"

OK
AT+FTPPUTPATH="/"

OK
AT+FTPPUT=1

OK

+FTPPUT:1,1,1360
AT+FTPPUT=2,10

+FTPPUT:2,10

OK

+FTPPUT:1,1,1360
AT+FTPPUT=2,0

OK

+FTPPUT:1,0

syeda amna

syeda amna

Points: 2

syeda amna

Full Member level 4
Many many thanks for your help.

what will be the value its value "AT+FTPSERV= " ?? i m using Filezilla server. it is on localhost, so i put "127.0.0.1". Is it ok?

what will be the host in "simcom.exavault.com"?

Last edited:

Echo wang

Member level 2
Many many thanks for your help.

what will be the value its value "AT+FTPSERV= " ?? i m using Filezilla server. it is on localhost, so i put "127.0.0.1". Is it ok?

what will be the host in "simcom.exavault.com"?

127.0.0.1 is not the one.

syeda amna

syeda amna

Points: 2

syeda amna

Full Member level 4
ok. then what will be the value of "AT+FTPSERV= " in case of filezilla server.

syeda amna

Full Member level 4
How to get rid of this error?? +FTPGET:1,77
:???:

Last edited:

syeda amna

Full Member level 4
+FTPGET:1,77 => Operate Error occurs because of incorrect FTP directory format.

Echo wang

Member level 2
+FTPGET:1,77 => Operate Error occurs because of incorrect FTP directory format.

Hi, pls use the FTP in your country. The FTP in the sample locates at Shanghai, you could not connect it.
We have a IP application note,
If needed, pls send e-mail to me: echo.wang@haozetech.com

nta_xyz

Newbie level 5
AT+CSQ
+CSQ: 21,0

OK
AT+CREG?
+CREG: 0,1

OK
AT+CGATT?
+CGATT: 1

OK
AT+CSTT

OK
AT+CIICR

OK
AT+CIFSR
172.20.199.189

GET:
AT+SAPBR=3,1,"CONTYPE","GPRS"

OK
AT+SAPBR=3,1,"APN","CMNET"

OK
AT+SAPBR=1,1

OK
AT+FTPCID=1

OK
AT+FTPTYPE="A"

OK
AT+FTPSERV="simcom.exavault.com"

OK
AT+FTPUN="zyf"

OK
AT+FTPPW="zyf"

OK
AT+FTPGETNAME="123.txt"

OK
AT+FTPGETPATH="/"

OK
AT+FTPGET=1

OK

+FTPGET:1,64
AT+FTPGETNAME="123.txt"

OK
AT+FTPGETPATH="/"

OK
AT+FTPGET=1
OK

+FTPGET:1,1
AT+FTPGET=2,1024

+FTPGET:2,1024
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaaaaaaaaa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K
AT+FTPGET=2,1024

+FTPGET:2,0

OK

+FTPGET:1,0

PUT:
AT+SAPBR=3,1,"CONTYPE","GPRS"

OK
AT+SAPBR=3,1,"APN","CMNET"

OK
AT+SAPBR=1,1

OK
AT+FTPCID=1

OK
AT+FTPTYPE="A"

OK
AT+FTPSERV="simcom.exavault.com"

OK
AT+FTPUN="zyf"

OK
AT+FTPPW="zyf"

OK
AT+FTPPUTNAME="111.txt"

OK
AT+FTPPUTPATH="/"

OK
AT+FTPPUT=1

OK

+FTPPUT:1,1,1360
AT+FTPPUT=2,10

+FTPPUT:2,10

OK

+FTPPUT:1,1,1360
AT+FTPPUT=2,0

OK

+FTPPUT:1,0

hi.
now i can read from ftp and make a file with your code.
but i don`t know how can i write a string like "Hello!!!" in that file!

Twisted_transistor

Member level 1
Hey can anyone pls explain this command to me.. Need it urgently:
AT+CNMI=1,0,0,0

scrod21

Newbie level 1
hi, friend i have a question, i tried your code (sim900: AT commands for FTP) and is a great code but a don't know how upload a file from sd... can you hep me please?

AT+CSQ
+CSQ: 21,0

OK
AT+CREG?
+CREG: 0,1

OK
AT+CGATT?
+CGATT: 1

OK
AT+CSTT

OK
AT+CIICR

OK
AT+CIFSR
172.20.199.189

GET:
AT+SAPBR=3,1,"CONTYPE","GPRS"

OK
AT+SAPBR=3,1,"APN","CMNET"

OK
AT+SAPBR=1,1

OK
AT+FTPCID=1

OK
AT+FTPTYPE="A"

OK
AT+FTPSERV="simcom.exavault.com"

OK
AT+FTPUN="zyf"

OK
AT+FTPPW="zyf"

OK
AT+FTPGETNAME="123.txt"

OK
AT+FTPGETPATH="/"

OK
AT+FTPGET=1

OK

+FTPGET:1,64
AT+FTPGETNAME="123.txt"

OK
AT+FTPGETPATH="/"

OK
AT+FTPGET=1
OK

+FTPGET:1,1
AT+FTPGET=2,1024

+FTPGET:2,1024
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
0123456789aaa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aaaaa
0123456789aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

OK
AT+FTPGET=2,1024

+FTPGET:2,0

OK

+FTPGET:1,0

PUT:
AT+SAPBR=3,1,"CONTYPE","GPRS"

OK
AT+SAPBR=3,1,"APN","CMNET"

OK
AT+SAPBR=1,1

OK
AT+FTPCID=1

OK
AT+FTPTYPE="A"

OK
AT+FTPSERV="simcom.exavault.com"

OK
AT+FTPUN="zyf"

OK
AT+FTPPW="zyf"

OK
AT+FTPPUTNAME="111.txt"

OK
AT+FTPPUTPATH="/"

OK
AT+FTPPUT=1

OK

+FTPPUT:1,1,1360
AT+FTPPUT=2,10

+FTPPUT:2,10

OK

+FTPPUT:1,1,1360
AT+FTPPUT=2,0

OK

+FTPPUT:1,0