Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to use STOR or APPE command with AT command ?

Status
Not open for further replies.

litham

Newbie level 6
Joined
Jun 17, 2009
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,376
Hi all,
I try to send data with FTP command over AT commands,
After CONECT OK, setting remot USER and PASS. I switch into passive mode with PASV.
But
After creating file with APPE comnd, and insering lines into it, the file still empty!!
okey,
How can I use the STOR commands to send data. how to specify the local file path?
Code:
at+cipstatus            
OK  

STATE: IP CLOSE               
at+cipshut          
SHUT OK       
at+cstt       
OK  
at+ciicr        
OK  
at+cifsr        
10.230.83.160             
at+cipstart="tcp","XXX.XXX.XXX.XXX","21"                                       
OK  
220 (vsFTPd 2.0.1)                  

CONNECT OK          
at+cipsend          
> USER *******                 

SEND OK       
331 Please specify the password.                                
at+cipsend          
> pass *******

SEND OK       
230 Login successful.                     
at+cipsend          
> pwd     

SEND OK       
257 "/"       
at+cipsend          
> PASV      

SEND OK       
227 Entering Passive Mode (XXX,XXX,XXX,XX,XX,XX)                                                
at+cipsend          
> APPE filetext               

SEND OK       
at+cipsend          
> zehfzkjlehf             
SEND OK       
at+cipsend          
> PASV      

SEND OK       
AT+CIPSEND         
> APPE HOLA           

SEND OK       
425 Failed to establish connection.                                   
500 Unknown command.                    
A425 Use PORT or PASV first.
AT+CIPSEND
> PASV
      
SEND OK
227 Entering Passive Mode (XXX,XXX,XXX,XXX,XXX,XXX)
AT+CIPSEND
> APPE JOLA

SEND OK
500 Unknown command.
AT+CIPSEND
> APPE ASAS

SEND OK
AT+CIPSEND
> EFHZEJFH

SEND OK
AT+CIPSEND
> ABOR

SEND OK
I find the files, but theyr are empty, any idea ?

thanks in advance
best regards
 

You need to establish two connections to the FTP server to transfer files - one for commands, and one for data.

After you send the 'PASV ' command the server returns an IP address and Port number as described below:
Syntax: PASV
Tells the server to enter "passive mode". In passive mode, the server will wait for the client to establish a connection with it rather than attempting to connect to a client-specified port. The server will respond with the address of the port it is listening on, with a message like:
227 Entering Passive Mode (a1,a2,a3,a4,p1,p2)
where a1.a2.a3.a4 is the IP address and p1*256+p2 is the port number.
You need to open another connection using this IP and port and send the data over that connection.
 

Hi thanks for replay,

the problem is how to switch between data mode and commande mode? whene I use +cipccon=2 it returns ERROR

can you tell me what missed in my AT Commads?
 

The problem you have is that the Sim Com modules only allow multi TCP connections when when is a client connection and one is a server connection. It does not support 2 simultaneous client connections. Regarding the "CIPCCON" command, from the manual:
Note that there may exist two connections at one time: one connection is as client connecting with remote server, the other connection is as server connecting with remote client. Using this Command to choose through which connection data is sent.

It may work if you use the PORT command instead of the PASV command AND your provider allows your device to act as a server - accept incoming connections.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top