WipSoft FTP uploads sometimes corrupt file


#1

Hi,

I’m using a Q24+ module (OpenAt 6.57c) with wipsoft 2.02 to exchange files with a FTP server (Filezila), through a GPRS bearer.
Downloading files works fine, but uploading files fails in some seldom cases (about 3%): the received file is either empty, or truncated (beginning OR end missing). When this occurs, the Filezilla log shows a timeout during data transfer (after 2 minutes), but no error is reported in WipSoft. The file transfered is quite small: between 22 and 1024 bytes, with a UART speed of 9600 bps (data and commands).

There is no way to force the problem to occur, it seems to be quite random (it is apparently not linked with file size, time, server load, etc.). However, timing in the command flow has a great influence. In the pseudo-code provided hereunder, if I set the 4 pauses to 0 second (instead of 10), 100% of uploaded files are missing (the server doesn’t even get the STOR command and times out the connection after 2 minutes). Playing with timings has a statistical effect: the ratio between correctly transfered files, empty files and truncated files is modified.

Any hint would be greatly appreciated…

The pseudo-code used is the following:

at+wipcfg=1
OK

at+wipbr=1,6
OK

at+wipbr=2,6,11,“internet”
OK

at+wipbr=4,6,0
OK

at+wipcreate=4,1,“myFtpServer”,21,“myName”,“myPassword”
OK

at+wipopt=4,1,2,40,1
OK

at+wipfile=4,1,1,"./myDownloadFile1"
DATA+ETX
OK

at+wipfile=4,1,1,"./myDownloadFile2"
DATA+ETX
OK

at+wipfile=4,1,2,"./myUploadFile"
CONNECT
–pause1 10s–
DATA
–pause2 10s–
ETX
–pause3 10s–
OK

at+wipclose=4,1
OK
WIPPEERCLOSE
–pause4 10s–

at+wipbr=5,6
OK

at+wipbr=0,6
OK

at+wipcfg=0
OK