FTP fput does not complete when run a second time on PLS62-W | Telit Cinterion IoT Developer Community
January 17, 2020 - 3:11am, 2058 views
We're seeing a problem when trying to upload files from the FFS over FTP. The send normally completes OK on the first attempt for any profile slot, but a second send using the same slot usually fails to complete. We are closing the profile connection between attempts, but perhaps we need to do something else as well.
We were initially having problems with our own FTP server, so we switched to ftp.dlptest.com to confirm, and the issue persists. The test file is zero bytes to reduce our data usage, but we've tried with longer files too.
Here's a sample log:
^SYSLOADING
^SYSSTART
AT+CGDCONT=1,"IP","***"
ATI1
Cinterion
PLS62-W
REVISION 02.000
A-REVISION 01.000.04
+PBREADY
AT^SICA=1,1
AT^SISC=0
AT^SISS=0,"conId","1"
AT^SISS=0,"address","ftp://ftp.dlptest.com"
AT^SISS=0,"cmd","fput"
AT^SISS=0,"files","Test.txt"
AT^SISS=0,"user","dlpuser@dlptest.com"
AT^SISS=0,"passwd","SzMf7rTE4pCrf9dV286GuNe4N"
AT^SISO=0
^SIS: 0,0,2100,"Ftp open(ftp.dlptest.com:21)"
^SIS: 0,0,2100,"220-######################################################### Please upload your web files to the public_html directory. Note that letters are case sensitive. ######################################################### This is a private system - No anonymous login"
^SIS: 0,0,2100,"FTP Login OK"
^SIS: 0,0,2100,"fput Test.txt"
^SIS: 0,0,2100,"FPUT : Test.txt 0 bytes"
^SISW: 0,2
^SIS: 0,0,2100,"221-Goodbye. You uploaded 0 and downloaded 0 kbytes."
AT^SICA=1,1
AT^SISC=0
AT^SISS=0,"srvType","Ftp"
AT^SISS=0,"conId","1"
AT^SISS=0,"address","ftp://ftp.dlptest.com"
AT^SISS=0,"files","Test.txt"
AT^SISS=0,"user","dlpuser@dlptest.com"
AT^SISS=0,"passwd","SzMf7rTE4pCrf9dV286GuNe4N"
AT^SISO=0
^SIS: 0,0,2100,"Ftp open(ftp.dlptest.com:21)"
^SIS: 0,0,2100,"220-######################################################### Please upload your web files to the public_html directory. Note that letters are case sensitive. ######################################################### This is a private system - No anonymous login"
^SIS: 0,0,2100,"FTP Login OK"
^SIS: 0,0,2100,"fput Test.txt"
The modem continues to respond OK, but we don't get a ^SISW or goodbye response on this profile. Using a different profile will work the first time only.
Any ideas as to what we're doing wrong?
Adding a AT^SISS=0,"srvType","none" before restarting a session seems to help.
Hello,
I have tested this scenario with the same module and server but did not meet the problems that you have described. I wonder why you may be having these issues but I don't have na idea as for now. Do you have another PLS62W module for reference? Closing the connection with SISC command should be enough.
Best regards,
Bartłomiej
We have tried a few units. At first we thought it was a firmware/app version issue, but as you see we've updated to the latest available firmware.
Using the srcType=none command has addressed the problem anyway, so hopefully that will help anyone else having this issue.
This is really strange. I've been using the same firmware and ftp server and it worked as expected. This would suggest that the problem is outside of the module. But the solution that helps could suggest something opposite.
One thing is not clear for me - not all URCs are coming but did you confirm that the file is also not uploaded?
Regards,
Bartłomiej
I'm not 100% sure whether the files are uploaded in the case where the connection stalls. Even if they were, there's still the problem that we can't re-use that profile by closing and reopening (unless we set srcType=none first).
Hello,
Anyway it's good that you have some workaroun. I've got no idea why this happens to you as I have tried and it did work. Do you test it manualy on PC (or with some script) or from an application which performs also other actions on the module at the same time?
Please see my log for reference (maybe you'll find some differences):
+PBREADY
ATI1
Cinterion
PLS62-W
REVISION 02.000
A-REVISION 01.000.04
OK
AT^SISS=0,srvType,"none"
OK
AT+CGATT=1
OK
AT+CGDCONT=2,"IP","internet"
OK
AT^SICA=1,2
OK
AT+CGPADDR=2
+CGPADDR: 2,"100.85.20.166"
OK
AT^SISS=0,srvType,"Ftp"
OK
AT^SISS=0,conId,"2"
OK
AT^SISS=0,address,"ftp://ftp.dlptest.com"
OK
AT^SISS=0,cmd,"fput"
OK
AT^SISS=0,user,"dlpuser@dlptest.com"
OK
AT^SISS=0,passwd,"SzMf7rTE4pCrf9dV286GuNe4N"
OK
AT^SISS=0,files,"upload.txt"
OK
AT^SISO=0
OK
^SIS: 0,0,2100,"Ftp open(ftp.dlptest.com:21)"
^SIS: 0,0,2100,"220-######################################################### Please upload your web files to the public_html directory. Note that letters are case sensitive. ######################################################### This is a private system - No anonymous login"
^SIS: 0,0,2100,"FTP Login OK"
^SIS: 0,0,2100,"fput upload.txt"
^SIS: 0,0,2100,"FPUT : upload.txt 23 bytes"
^SISW: 0,2
^SIS: 0,0,2100,"226 2.130 seconds (measured here), 10.80 bytes per second"
AT^SISC=0
OK
AT^SISO=0
OK
^SIS: 0,0,2100,"Ftp open(ftp.dlptest.com:21)"
^SIS: 0,0,2100,"220-######################################################### Please upload your web files to the public_html directory. Note that letters are case sensitive. ######################################################### This is a private system - No anonymous login"
^SIS: 0,0,2100,"FTP Login OK"
^SIS: 0,0,2100,"fput upload.txt"
^SIS: 0,0,2100,"FPUT : upload.txt 23 bytes"
^SISW: 0,2
^SIS: 0,0,2100,"226 0.569 seconds (measured here), 40.40 bytes per second"
AT^SISC=0
OK
Regards,
Bartłomiej