# Fail to create ftp client(connect to ftp server)

**URL:** <https://forum.sierrawireless.com/t/fail-to-create-ftp-client-connect-to-ftp-server/3514>\
**Category:** Open AT\
**Created:** [August 1, 2009, 7:05am UTC](https://forum.sierrawireless.com/t/fail-to-create-ftp-client-connect-to-ftp-server/3514 "2009-08-01T07:05:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yong](https://avatars.discourse-cdn.com/v4/letter/y/b487fb/32.png) [@yong](https://forum.sierrawireless.com/u/yong)\
**Post date:** [August 1, 2009, 7:05am UTC](https://forum.sierrawireless.com/t/fail-to-create-ftp-client-connect-to-ftp-server/3514/1 "2009-08-01T07:05:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yong](https://avatars.discourse-cdn.com/v4/letter/y/b487fb/32.png) [@yong](https://forum.sierrawireless.com/u/yong)\
**Post date:** [August 4, 2009, 4:26am UTC](https://forum.sierrawireless.com/t/fail-to-create-ftp-client-connect-to-ftp-server/3514/2 "2009-08-04T04:26:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [August 4, 2009, 4:57am UTC](https://forum.sierrawireless.com/t/fail-to-create-ftp-client-connect-to-ftp-server/3514/3 "2009-08-04T04:57:40Z")

</div>

> [@yong](#):
>
> I found that the problem only happens when we use AT&T SIM card(roaming).  
> there is no problem with Telstra Sim card(Home,Australia).

Presumably, there is some restriction in the Roaming agreement?

---

<div class="post-metadata">

**Author:** ![yong](https://avatars.discourse-cdn.com/v4/letter/y/b487fb/32.png) [@yong](https://forum.sierrawireless.com/u/yong)\
**Post date:** [August 4, 2009, 5:38am UTC](https://forum.sierrawireless.com/t/fail-to-create-ftp-client-connect-to-ftp-server/3514/4 "2009-08-04T05:38:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![yong](https://avatars.discourse-cdn.com/v4/letter/y/b487fb/32.png) [@yong](https://forum.sierrawireless.com/u/yong)\
**Post date:** [August 12, 2009, 7:52am UTC](https://forum.sierrawireless.com/t/fail-to-create-ftp-client-connect-to-ftp-server/3514/5 "2009-08-12T07:52:48Z")

</div>

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
