0

FONA FTP from SD card
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: FONA FTP from SD card

by adafruit_support_mike on Thu Jan 10, 2019 5:46 am

Error code 1,64 is a timeout, and error code 1,77 is an error with a specific operation.

Post the code you're using between CODE tags and we'll see what we can find.

adafruit_support_mike
 
Posts: 54732
Joined: Thu Feb 11, 2010 2:51 pm

Re: FONA FTP from SD card

by JerrySantaCruz on Thu Jan 10, 2019 9:33 pm

Hi Eric,

the problem is that after you send the FTPPUT=1 you get two replies. fona.sendCheckReply gets the first one, but then you have to use fona.getReply to get the second one.

fona.sendCheckReply("AT+FTPPUT=1","OK" , 10000); //this opens the FTP session
fona.getReply("+FTPPUT:1,1,1360",30000);

You'll find the meaning of your error codes (64 and 77) in the SIM800 command manual here: https://learn.adafruit.com/adafruit-fon ... /downloads

Good luck!

Jerry

JerrySantaCruz
 
Posts: 27
Joined: Tue Aug 16, 2016 4:46 pm

Re: FONA FTP from SD card

by blong99 on Sun Jan 13, 2019 11:35 pm

I have successully done FTP on a project using a SIM900 chip not SIM800.

Currently trying to use the same code in another Arduino project for the SIM800 now but need a new SIM as old SIM provider is unreliable
and that just adds to my development hassles.

The FTPPUT=1 command and its response is a pain . The SIM 900 works fine and responds quickly (a few seconds).

Bear with me a few days (waiting for SIM card to arrive from company for whom I am doing the development)
and then would be happy to share my completed code when it works.

Also I am uploading a file from the SD card and not using readLine.

The FTPPUT,1,1,1360 response is NOT always 1360 .... the 3rd argument "1360" is max bytes that can be taken by provider in
one chunk. My code on sim900 loops the file from SD card in chunks of "whatever" and then sends final leftover bytes as well.
i.e. chunk 1 at 1300, chunk 2 at 1300, etc etc, then final chuck at (e.g.) 754 bytes and gets confirmation of each chunk.

In my case my provider gives 1300 as 3rd argument. (I do not live in USA but am in Thailand).

blong99
 
Posts: 3
Joined: Thu Oct 18, 2018 9:02 pm

Re: FONA FTP from SD card

by blong99 on Thu Jan 17, 2019 12:41 am

Got the SIM card but having no joy ...

Sure the FTPPUT=1 responds with OK but no second reply. i.,e. the 1,1,1360 entry

Also the fona.getReply is protected ??? how to use this ??

blong99
 
Posts: 3
Joined: Thu Oct 18, 2018 9:02 pm

Please be positive and constructive with your questions and comments.