Use the FTP library from a Smartphone?

Last post 05-15-2009 13:56 by ctacke. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-13-2009 20:21

    Use the FTP library from a Smartphone?

    Hello,

    I recently purchased the standard version of the framework, and am trying to create an FTP application running on an HTC windows mobile 6.1 phone. Like many other users of the FTP library I am having connection issues when connecting - I get the error method only valid with an open connection... I have allowed for a delay after doing the m_ftp.BeginConnect(...) step.

    My question is essentially this - is it possible to get an FTP connection when using this wireless device? I am NOT using W-Fi, instead I'd like the data connection of the phone's GSM to give me the network connection. Is this possible?

  • 05-14-2009 2:52 In reply to

    • Neil
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-30-2007
    • North Wales
    • Posts 1,349

    Re: Use the FTP library from a Smartphone?

    Calling BeginConnect will not establish a network connection. BeginConnect opens a connection to the FTP server in an asynchronous manner. You need to establish the network connection prior to calling BeginConnect so that there is an appropriate transport available for the FTP protocol.

    Neil Cowburn
    OpenNETCF Consulting

      
  • 05-14-2009 20:16 In reply to

    Re: Use the FTP library from a Smartphone?

    The only code I had in the beginning, before BeginConnect, was:

    OnResponse("Connecting...");

    m_ftp = new FTP(server.text);

     

    Is this what establishes the connection?

    Also, does your library work for mobile GPRS devices?

  • 05-15-2009 13:56 In reply to

    • ctacke
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-27-2007
    • Indiana
    • Posts 2,149

    Re: Use the FTP library from a Smartphone?

    The FTP class will not make a connection for you - it simply uses whatever network connection the device currently has active.  If you want to use GPRS that's fine, and as long as the carrier allows port 21 (or whatever port you're on) through, it should work.

     You need to make the connection before trying to use the FTP classes with something like COnnectionManager.

Page 1 of 1 (4 items)