×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Regular Contributor
    Join Date
    May 2004
    Location
    NRW/ Germany
    Posts
    188

    Creating a FTP session?

    Hi,

    I'm trying to implement a FTP connection in my application which uploads a log file to a server.
    I've searched the forum for useful tips about the CFTPSession class, but without luck.
    Can somebody give a short code sample how to use this class?

    Thank you

    Arne

  2. #2
    Regular Contributor
    Join Date
    Jan 2004
    Posts
    128
    Hi,

    You should know that those binaries files (FTPsession.dll and ftpprotoc.dll) are not shipped in any phone.

    BR

  3. #3
    Regular Contributor
    Join Date
    May 2004
    Location
    NRW/ Germany
    Posts
    188
    Hi ferranhalden,

    thanks for your answer. I've seen that the DLL's are not present in the devices yesterday.
    Got some Dll's from someone in SE's developer forum, but I don't tried them till now.

  4. #4
    Regular Contributor
    Join Date
    Jan 2004
    Posts
    128
    Hi Anne,

    I have done some small tests using thoses dlls in a Nokia 7610. And I have been succesfull to connect to an FTP server. To achieve that I passed as parameter the DNS of the server when I called CFTPSession::ConnectL(..) . However I have still some problems to connect using the IP address (TSockAdd) as parameter. I defined the socket address as

    TInetAddr serverName; // IP family address
    serverName.Input(_L("aa.bb.cc.dd"));
    serverName.SetPort(KDefaultServerPiPort); //Port 21

    If you find out how to do that. Just please let me know.

    BR,

    Fernando

  5. #5
    Regular Contributor
    Join Date
    May 2004
    Location
    NRW/ Germany
    Posts
    188
    Hi ferranhalden,

    can you tell me, where I have to put the exe and the both dlls in the phone? Don't know the right directory.

    Thank you

    Arne

  6. #6
    Regular Contributor
    Join Date
    Jan 2004
    Posts
    128
    I just put both dlls in !:\system\libs. I don't really know which is the rol of the exe file.

  7. #7
    Regular Contributor
    Join Date
    May 2004
    Location
    NRW/ Germany
    Posts
    188
    Ok, I've copied the files there too, but my application doesn't start on the 6600. It runs in the emulator. Is there another trick I have to deal with?

  8. #8
    Regular Contributor
    Join Date
    Jan 2004
    Posts
    128
    I am sory, but I can't help on that. There are not more tricks. Did you copy both dlls or just one?
    Well..the only problem could be that you haven't configured the ineternet settings of your phone. Go to http://www.nokia.com/nokia/0,6771,53589,00.html to get the internet settings of your phone.

    By the way, can you use the parameter TSockAddr for connecting to FTP server. If yes, could you please show me the definition.

    Best wishes

    Fernando

  9. #9
    Regular Contributor
    Join Date
    Jan 2004
    Posts
    128
    I found my problem. I was running a local FTP server, which I could access from the emulator but not from my phone. The reason was that I forgot to redirect from the router to local ip address of my computer. Stupid mistake!!!!!!

  10. #10
    Regular Contributor
    Join Date
    Jan 2004
    Posts
    128
    Hi Arne,

    I have been testing the binaries that I got, and it seems that they are working properly in a 7610. However, they don't work properly in a 6600.
    Were you able to run your client in a 6600?

    Best regards

  11. #11
    Regular Contributor
    Join Date
    May 2004
    Location
    NRW/ Germany
    Posts
    188
    Hi ferranhalden,

    I didn't got the client working on 6600.
    The application doesn't start on the mobile.

  12. #12
    Registered User
    Join Date
    Apr 2006
    Posts
    44

    Re: Creating a FTP session?

    Hi Fernando

    can you help me, my code is
    char * aPassword ="monpassa";
    TText8* pw = (TText8*)aPassword;
    TPtrC8 ptrPw(pw);
    TBuf<20> pass;
    pass.Copy(ptrPw);
    TDesC& password= pass;

    char * aUserName ="moimeme";
    TText8* uName = (TText8*)aUserName;
    TPtrC8 ptrUser(uName);
    TBuf<20> name;
    name.Copy(ptrUser);
    TDesC& userName= name;

    TUint port = 21;
    CFTPSession::TConnectionMode cMode=CFTPSession::EActive;


    TInetAddr serverName; // IP family address
    serverName.Input(_L("aa.bb.cc.dd"));
    serverName.SetPort(port); //Port 21

    iFtpSession->Connect(serverName,userName,password,cMode);
    and i want to send a file to my server ftp but it code can't work

  13. #13
    Regular Contributor
    Join Date
    Jan 2004
    Posts
    128

    Re: Creating a FTP session?

    Check the CheckSeries_60_Platform_FTP_Example_v1_0.zip example that you can download from the forum nokia

  14. #14
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Bangalore,India
    Posts
    306

    Re: Creating a FTP session?

    Hi ferranhalden,

    May I know wht kind of setting u made in order to run FTP app on emulator?

    I am able to run application on mobile but not on emulator?

    Error msg I am gettin is "Connection Error 4"

    Please help me

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×