Device emulator and FTP, inside a C # mobile app project

For my C # mobile app developed with visual studio 2008, I am trying to use FTP. FTP works fine with a real device, but it doesn't work when I use a device emulator: the connection was successful, but it failed when you tried to fetch data. Both use Windows Mobile 5.

Have some of you had this problem? When I googlised it seems to be repetitive but not resolved yet.

Here is the log displayed by the ftp server.

(000001) 04/05/2009 09:50:59 - (not logged in) (127.0.0.1)> Connected by sending a welcome message ...

(000001) 04/05/2009 09:50:59 - (not logged in) (127.0.0.1)> Version 220-FileZilla Server 0.9.31 beta p>

(000001) 04/05/2009 09:50:59 - (not logged in) (127.0.0.1)> 220 FTP server

(000001) 04/05/2009 09:50:59 - (not logged in) (127.0.0.1)> USER aa

(000001) 04/05/2009 09:50:59 - (not logged in) (127.0.0.1)> 331 Password required for aa

(000001) 04/05/2009 09:51:00 - (not logged in) (127.0.0.1)> PASS **

(000001) 04/05/2009 09:51:00 - aa (127.0.0.1)> 230 Recorded

(000001) 04/05/2009 09:51:01 - aa (127.0.0.1)> SYST

(000001) 04/05/2009 09:51:01 - aa (127.0.0.1)> 215 UNIX emulated by FileZilla

(000001) 04/05/2009 09:51:01 - aa (127.0.0.1)> CWD /

(000001) 04/05/2009 09:51:04 - aa (127.0.0.1)> PASV

(000001) 04/05/2009 09:51:04 - aa (127.0.0.1)> 227 Enter passive mode (127,0,0,1,5,22)

(000001) 04/05/2009 09:51:41 - aa (127.0.0.1)> disabled.

+1


source to share


2 answers


It's a while ago since I was working with this mobile stuff, so I don't have a real solution, but maybe some explanation.

As you can see, the problem occurs immediately after entering passive mode. As you can see the ip address used is 127.0.0.1, which is even passed for passive mode (with used ports). I think there are some issues in the emulated networking stack to get this virtual connection to work (with localhost addresses). Therefore, you might want to try not using passive mode to get it to work.



Another way to get more of this problem is to record the WireShark connection and try to figure out what is wrong. But it will be any job if you have deeper knowledge of tcp ip and all that.

+1


source


Have you tried using "cradling" device emulator.

In Visual Studio, open Tools and open the Device Emulation Manager . From there, you can right-click the current device emulator and select Cradle to simulate a device dock using ActiveSync.



I find I get the best results on the net when the device emulator is properly connected to the development PC via a "simulated" ActiveSync connection. At this point, you have a point-to-point IP connection between your PC (169.254.2.2) and the device (169.254.2.1).

+2


source







All Articles