sim900: AT commands for FTP

Status
Not open for further replies.

syeda amna

Full Member level 4
Joined
Jun 1, 2010
Messages
222
Helped
24
Reputation
48
Reaction score
22
Trophy points
1,308
Location
Pakistan
basicelectronicsguide.blogspot.com
Activity points
2,551
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

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

+FTPGET:1,63
 
Last edited:




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="/"

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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
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

Just for your reference!
 
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:

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"?

simcom.exavault.com is our server address, you can use your server.
127.0.0.1 is not the one.
 


hi.
thanks for your code.
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!
please guide me.
 

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?

 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…