Showing posts with label AT Commands. Show all posts
Showing posts with label AT Commands. Show all posts

SIM900 AT Commands Fot FTP

INTRODUCTION:

The task assigned to me quite straight forward. But due to lack of experience and knowledge it became difficult for me. I learnt a lot. I decided to write a report. May be it will helpful for a beginner. 

REQUIRE TOOLS:

·         SIM900 GSM MODULE
·         SIM (GPRS ENABLED)
·         FTP Server (I used free FTP host provided by serversfree.com)
·         HyperTerminal

SETUP Hyper Terminal:

Figure 1: Hyper Terminal


Figure 2: FTP Host


Figure 3: File Manager


AT COMMANDS FOR DOWNLOADING A FILE:



AT 

OK 

AT+CSQ     

+CSQ: 16,0         

OK 
AT+CGATT?        
+CGATT: 1        

OK 
AT+CSTT      
OK 
AT+CIICR       
OK 
AT+CIFSR       
10.10.209.129            

AT+SAPBR=3,1,"CONTYPE","GPRS"                            
OK 
AT+SAPBR=3,1,"APN","ufone.internet"        //           write your APN                            
OK 
AT+SAPBR=1,1           
OK 
AT+FTPCID=1          
OK 
AT+FTPTYPE="A"             
OK 
AT+FTPSERV="amna.bugs3.com"            //write your FTP server domain              
OK 
AT+FTPUN="xxx"                    
OK 
AT+FTPPW="xxx"                  
OK 
AT+FTPGETNAME="download.txt"                           
OK
AT+FTPGETPATH="/public_html/"                //write the correct directory path.
OK
At+FTPGET=1                                                 //starts FTP session
OK

+FTPGET:1,1
AT+FTPGET=2,1024                                     // gets 1024 bytes of data
+FTPGET:2,5
Hello                                                             //getting text from the document
OK

+FTPGET:1,0                                                       //closes FTP session


AT COMMANDS FOR DOWNLOADING A FILE FRON A FTP SERVER:
AT+FTPPUTNAME="upload.txt"                         
OK 
AT+FTPPUTPATH           
ERROR    
AT+FTPPUTOPT="STOR"                  
OK 
AT+FTPPUTPATH="D:"                 
OK 
AT+FTPPUT=1          
OK

+FTPPUT:1,1,1360                  //FTP session is ready for upload. It can upload 1360 bytes at a time
AT+FTPPUT=2,11
+FTPPUT:2,11

OK

Popular Posts