Fail to create ftp client(connect to ftp server)


#1

Hi,
I’m using ftp put sample to upload the data to server at regular interval
for this i have used a timer after that timer expires i’m calling the function appli_entry_point()…
it uploads the data first time and next time it gives the following error
Opening FTP connection…
[WIP] new TCPCLIENT 0x180c6488
Error 0 on cx channel
[WIP] closing TCPCLIENT 0x180c6488
[WIP] closing FTP_CONTROL 0x180c45f4

i have checked the FTP channel socket ie… wip_close() its closed after the first file has written and no problem with GPRS connection
pls suggest the idea to do the same or pls send me the code if you had tried the same example for this application…
thanks and regards

chethanchethankp

I have exactly the same problem.
the gprs is ok, I created the ftp client after receiving IP connected event.

there is about 1 minute between trace “[WIP] new TCPCLIENT 0x180c6488”
and “Error 0 on cx channel” I guess it’s a timeout.
the mode is Passive mode.

the code is
case WIP_CEV_ERROR:
wip_debug( “Error %i on cx channel\n”, ev->content.error.errnum);

so a WIP_CEV_ERROR event is received and the ev->content.error.errnum is 0.
but 0 doesn’t make any sense. the ftp server is ok because we have some other modem talk to server, there is no problem.

80% of time, it works, this error happens randomly, is there anyone that encounter this problem before?
Hardware Supreme Fastrack, firmware 7.4, wip 5.1. Because the mode is battery powered, the modem is turned off once finishing the triansmitting.
all the deregister are done for different layers(ftp channel, bear, gprs dereg).

Yong


#2

I found that the problem only happens when we use AT&T SIM card(roaming, test for american custmer).
there is no problem with Telstra Sim card(Home,Australia).

wip_FTPCreateOpts return a valid wip_channel_t, no WIP_CEV_OPEN is received as expected.
there is no trace like:
[FTP=>] “220 Microsoft FTP Service”
[FTP=>] USER XXXXXXX

just a WIP_CEV_ERROR event is received. and the error code is 0.

Can someone shed some light on this issue?

Thanks

Yong


#3

Presumably, there is some restriction in the Roaming agreement?


#4

Avail, Thanks for your reply.
The Sim card our customer sent to us is “Data with text & GPRS (web) with 100mb international roaming plan” from AT&T.
So it’s a data only Sim and can’t make voice call.

I tested 10 times again, 3 times it sucessfully conneted to ftp and uploaded data. It’s very strange.


#5

the problem disappear when the unit is sent to USA for testing.
so in my case, most probably it’s caused by roaming or network related issues.

Yong