Discuss (FTP), (FTP on .NET CF) and (FTPS, SFTP and SCP).
no avatar
User

indrix

Posts

2

Joined

Wed Oct 15, 2008 10:48 pm

WindowsMobile: PASV failes via GPRS (works via ActiveSync)

by indrix » Wed Oct 15, 2008 11:00 pm

Hi,

after establishing a connection to a FTP-Server behind a NAT-Router (with the help of "AutoPassiveIPSubstitution") the "PASV" command (ConnectMode=FTPConnectMode.PASV) failes with the message: "Unable to read data from the transport connection".

This happens on my windows mobile 5 device over a gprs-connection. However when I run the same application with an activeSync-connection it works. Furthermore when I run the application via GPRS an connect to a server which is NOT behind a NAT-Router it works as well.

Any idea what is going wrong here ?

thanx,
Lucas Henschke
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: WindowsMobile: PASV failes via GPRS (works via ActiveSyn

by support2 » Thu Oct 16, 2008 5:07 pm

Does the same IP address get sent in the PASV response sent by the server re GPRS and active sync?

If it is the same (and the correct) IP address and port that the data socket is trying to connect to in each case, then somehow the NAT router is preventing your client from connecting when on GPRS.

If you have another FTP client on your device, see if it has the same problem. Enable logging and see if that gives any further clues.
no avatar
User

indrix

Posts

2

Joined

Wed Oct 15, 2008 10:48 pm

by indrix » Thu Oct 16, 2008 10:33 pm

> Does the same IP address get sent in the PASV response sent by the server re GPRS and active sync?

I cannot say that because when I use GPRS I do not get that far. Here is my log (I skiped the boring parts and manually changed the ip):


DEBUG [ExFTPClient] 9 Jan 1980 21:38:36.000 : Connecting to 111.111.111.111:21
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:38.000 : Setting socket timeout=120000
DEBUG [ExFTPControlSocket] 9 Jan 1980 21:38:38.000 : Created control-socket: SocksContext=, ProxySettings=NoProxy, RemoteHost=111.111.111.1, controlPort=21, timeout=120000
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:38.000 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:39.000 : 220 "Welcome to 111 FTP service."
DEBUG [FTPConnection] 9 Jan 1980 21:38:39.000 : Connected to 111.111.111.111
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:39.000 : ---> USER user
DEBUG [EnterpriseDT.Net.Ftp.ExFTPConnection] 9 Jan 1980 21:38:39.000 : Starting KeepAlive thread with period 30s
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:40.000 : 331 Please specify the password.
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:40.000 : ---> PASS ********
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:41.000 : 230 Login successful. Have fun.
DEBUG [FTPConnection] 9 Jan 1980 21:38:41.000 : Successfully logged in
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:41.000 : ---> TYPE I
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:42.000 : 200 Switching to Binary mode.
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:42.000 : ---> PWD
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:42.000 : 257 "/"
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:42.000 : ---> SYST
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:43.000 : 215 UNIX Type: L8
DEBUG [FTPFileFactory] 9 Jan 1980 21:38:43.000 : Selected UNIX parser
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:43.000 : ---> PWD
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:44.000 : 257 "/"
DEBUG [FTPControlSocket] 9 Jan 1980 21:38:44.000 : ---> PASV
ERROR [FTPControlSocket] 9 Jan 1980 21:38:49.000 : Exception in SendCommand : System.IO.IOException: Unable to read data from the transport connection.
System.IO.IOException: Unable to read data from the transport connection.
CAUSED BY:
System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
ERROR [EnterpriseDT.Net.Ftp.ExFTPConnection] 9 Jan 1980 21:38:49.000 : Command error : System.IO.IOException: Unable to read data from the transport connection.


As you can see I do not even get the answer from the server. When I use ActiveSync though I get the expected response to my PASV command and everything works as intended.

> If you have another FTP client on your device, see if it has the same problem.

I used the IPWorks library as well which can connect to the same server via GPRS. But it has it?s own flaws so I am evaluating your library. It works great on other servers via GPRS except in the described case.
no avatar
User

brynnax

Posts

1

Joined

Tue Jun 23, 2009 3:59 pm

by brynnax » Wed Jun 24, 2009 8:32 pm

How can I get more speed from my gprs wireless card? I used gprs wireless card for internet browsing, but its speed so slow. To get more speed I contacted with the local phone co. They told me that they don't control the speed & it is vary for my own network setting. How can I setting the network to get more browsing speed? Please help me!!
_____________
~ ~ ~ ~
Last edited by brynnax on Fri Jun 26, 2009 9:28 pm, edited 1 time in total.
no avatar
User

EDT Support

Posts

905

Joined

Mon Apr 26, 2004 3:03 pm

by EDT Support » Wed Jun 24, 2009 9:41 pm

Sorry Brynnax, I don't know how you can do that. We specialize in FTP and similar protocols, which operate at a higher level than GPRS, so we're not really experts on the ins and outs of GPRS.

- Hans (EnterpriseDT)

Who is online

Users browsing this forum: No registered users and 13 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign