Thales' cellular IoT products business is now part of Telit Cinterion, find out more.

You are here

FTP connection problems | Telit Cinterion IoT Developer Community

July 25, 2018 - 5:18pm, 2804 views

Hello,

I use EHS6 / ELS61 modules to send FTP via AT command. My application is battery powered, so I have to shut down module completely after transmission and cut power. Next transmission normally after one day.

So I switch on the module and wait for registration:

^SYSLOADING
^SYSSTART
AT
OK
ATE1
OK
AT^SPOW=1,0,0
OK
AT\Q3
OK
AT^SCFG="Radio/Band","511"
^SCFG: "Radio/Band","511"
OK
AT^SXRAT=1,2
OK
AT+CPIN?
+CPIN: READY
OK
AT+CREG?
+CREG: 0,5
OK
AT+CSQ
+CSQ: 17,99
OK

After this I set up SICS and SISS parameters:

AT^SICS=0,conType,GPRS0
OK
AT^SICS=0,apn,"*****"
OK
AT^SISS=0,"srvType","FTP"
OK
AT^SISS=0,"conId",0
OK
AT^SISS=0,"cmd","put"
OK
AT+CSCS="UCS2"
OK
AT^SISS= 0,"address","006600740070003A002F002F00760065007200690062006F0078003A004E006F00640065004A00530031003000300040003100390032002E003100360038002E00380031002E0031002F"
OK
AT^SISS= 0,"files","00560045005200490042004F0058002D00390039003900390039002D00320033003000370032003000310038002D003100380034003200310038002E006300730076"
OK
AT+CSCS="GSM"
OK

Then I open the connection:

AT^SISO=0
OK
^SIS: 0,0,2100,"Ftp open(192.168.81.1:21)"
^SIS: 0,0,2100,"220 Microsoft FTP Service"
^SIS: 0,0,2100,"FTP Login OK"
^SIS: 0,0,2100,"put VERIBOX-99999-23072018-184218.csv"
^SISW: 0,1
AT^SISW=0,69
^SISW: 0,69,0
<.....data....>
OK
^SISW: 0,1
AT^SISW=0,0,1
^SISW: 0,0,0
OK
^SIS: 0,0,2100,"226 Transfer complete."
^SISW: 0,2
AT^SISI=0
^SISI: 0,6,0,69,0,0
OK
AT^SISE=0
^SISE: 0,0
OK
AT^SISC=0

This works fine with the most FTP servers and internet providers.

But in few cases with some FTP servers nearly every time (95%) after first SISO command the module answers with:
^SIS: 0,0,2100,"Ftp open(192.168.81.1:21)"
and then comes nothing more. I abort after one minute.

But when I close connection after approx. 15 seconds and open immediately  again (SISI and SISE show nothing strange):


AT^SISI=0
^SISI: 0,3,0,0,0,0
OK
AT^SISE=0
^SISE: 0,0
OK
AT^SISC=0
OK
AT^SISO=0
OK


Then everything works fine again (in most cases, only sometimes I have to repeat a third time):


^SIS: 0,0,2100,"Ftp open(192.168.81.1:21)"
^SIS: 0,0,2100,"220 Microsoft FTP Service"
^SIS: 0,0,2100,"FTP Login OK"
^SIS: 0,0,2100,"put VERIBOX-99999-23072018-171618.csv"

My questions:

can it be that the module is not ready for internet connection shortly after startup (I tried to insert a simple wait before SISO, but did not help)?

Is this a connection problem to the APN or to the FTP server (in my experience it is only depending on the FTP server, not on the provider)?

What does the URC: ^SIS: 0,0,2100,"Ftp open(192.168.81.1:21)" exactly mean: trying to establish internet connection or already have communication with the server?

Does anyone has experience what to do to avoid open and close and open again to get it running (as the module is battery powered, I don't want to waste battery if not necessary)?

Is there any command, that indicates, that internet connection is available (I tried also CGREG, but does not help)

Thanks and best regards

Klaus