| Author |
Message |
litham
Joined: 17 Jun 2009 Posts: 13
|
26 Jun 2009 16:46 how to use STOR or APPE command with AT command ? |
|
|
|
|
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
|
|
| Back to top |
|
 |
GSM Man
Joined: 15 Apr 2009 Posts: 357 Helped: 46 Location: New Jersey, USA
|
26 Jun 2009 20:36 Re: how to use STOR or APPE command with AT command ? |
|
|
|
|
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:
| Quote: |
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.
|
|
| Back to top |
|
 |
litham
Joined: 17 Jun 2009 Posts: 13
|
29 Jun 2009 11:18 Re: how to use STOR or APPE command with AT command ? |
|
|
|
|
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?
|
|
| Back to top |
|
 |
Google AdSense

|
29 Jun 2009 11:18 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
GSM Man
Joined: 15 Apr 2009 Posts: 357 Helped: 46 Location: New Jersey, USA
|
29 Jun 2009 21:24 Re: how to use STOR or APPE command with AT command ? |
|
|
|
|
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:
| Quote: |
| 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.
|
|
| Back to top |
|
 |