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.

SIM908 Download FTP file in parts

Status
Not open for further replies.

migsantiago

Newbie level 3
Joined
Jan 29, 2010
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,305
Hello

I was wondering if somebody knew how to download an FTP file in parts... let's say, the file is 1024 bytes in size... I download only 32 bytes from it and then I disconnect the FTP. I come back and then I reconnect the FTP and I start to download from the position 32.

The problem is that there is no way on the SIM908 to disconnect from the FTP server... a timeout has to happen to do so.

I ask the module to connect:

AT+FTPGET=1

It replies:

OK

+FTPGET:1,1

And then I ask it to read 32 bytes from the 1024 bytes file:

AT+FTPGET=2,32
It replies:

+FTPGET:2,32
12345678901234567890123456789012
OK

The problem is that if I ask only for some bytes from the file, the current FTP operation remains active, the SIM908 is still connected to the FTP and it sends the following lines for a while...

+FTPGET:1,1

+FTPGET:1,1

+FTPGET:1,1

+FTPGET:1,1

After those, the FTP connection times out...

+FTPGET:1,64

I haven't been able to find an "FTP GET CLOSE" command so that I can resume the connection later. I tried sending the following commands but they are replied with an ERROR...

AT+FTPGET=2,0

ERROR

AT+FTPGET=1,0

ERROR

AT+FTPGET=1,1

ERROR

AT+FTPGET=2

ERROR

AT+FTPGET=0

ERROR

There is a command which helps to restore a connection AT+FTPREST=x, where x is the index from we want to start reading the file when it's opened again, but my problem is that I cannot close the previous connection.

I am using the SIM908 AT Command manual v1.02. Refer to the attachment below.

I cannot download the full 1024 bytes file since I need to do other stuff with the FTP, I am multitasking other FTP functions.

Do you know how to close an active FTP download?

Thanks.

PS I am using a PIC microcontroller with C to read/send the commands, but I can test them with a terminal as well.
 

Attachments

  • SIM908_AT Command Manual_V1.02.7z
    1.5 MB · Views: 92

Hello

The user Echo Wang advised me on this:

Close it via “AT+SAPBR=0,1”
Then open it again!

I will have to download the full file in one FTP session. Disconnecting the APN with SAPBR is risky since it takes a while for the APN to connect and make correct use of the DNS servers. It will take ages to dowload the 1024 bytes file.

This FTP GET CLOSE command is missing in the SIM908 hardware. :-?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top