×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Jul 2003
    Posts
    100

    Sending .jpg file from phone to PC

    Hello everyone!

    I am trying to modify the BTPointToPointExample to send a file to PC.

    I declared a byte descriptor where i read the file i would like to send and then send this byte descriptor to PC which will be written to another file. The type of file i am trying to send is a .jpg file. I have checked the content of the .jpg file which was received but it only contains a small portion of the orginal content of the .jpg file on the phone. I have tried doing the reading of file until the byte descriptor's length is zero (which means, it has reached EOF) but my application could not send any byte to PC anymore.

    Here is my code which sends byte descriptor from phone to PC via bluetooth sockets:

    TFileName KFile(_L("C:\\system\\apps\\MMSExample\\mmsexample.jpg"));
    //a file session has been opened to read the file
    TInt err = iFile.Open(CEikonEnv::Static()->FsSession(), KFile, EFileRead | EFileShareAny);
    if( err != KErrNone)
    {
    //display an error message
    iSendingSocket.Write(*iMessage, iStatus);
    SetActive();
    }
    else
    {
    //read the file and store in a descriptor(BytesRead)
    TBuf8<64> BytesRead;
    TInt buff_length = BytesRead.Length();
    while ( buff_length != 0)
    {
    TInt ReadResult = iFile.Read(BytesRead);
    iSendingSocket.Write(BytesRead, iStatus);
    SetActive();
    }
    }

  2. #2
    Registered User
    Join Date
    Oct 2003
    Posts
    38
    Hi,

    im doing a project that requires me to do a FTP frm my phone to PC using bluetooth too.... so do u have any luck yet?

    maybe we can discuss abt it

    sam

  3. #3
    Regular Contributor
    Join Date
    Jul 2003
    Posts
    100
    Hi! My program transfers files from phone to PC but not over FTP. I am using the Serial Port Service instead. But my program has some flaws as it can only send just a portion of a file over bluetooth. I have not yet work on it much coz i got another program to do now.

    I think i have in my file some sample programs that i have found before that might be of help to you. I'll check them out later and post the result here.

    --julie ann

  4. #4
    Registered User
    Join Date
    Oct 2003
    Posts
    38
    thanx man...

    sam

  5. #5
    Regular Contributor
    Join Date
    Jul 2003
    Posts
    100
    Check out the sample program of Ashley Montanaro that uses the CSendAppUi to send files through Blutetooth, IR, or e-mail. I hope it could help you in any way.. You can download it at
    http://www.allaboutsymbian.com/softw...oft.php?id=212

    Good luck

  6. #6
    Registered User
    Join Date
    Oct 2003
    Posts
    38
    thanx for the help my fren,

    really appreciate it...

    once again.. thanx

    sam

  7. #7
    Registered User
    Join Date
    Oct 2005
    Posts
    34

    Re: Sending .jpg file from phone to PC

    hello,
    can anyone found the solution of tranferring file from phone to pc using serial port,plz help me out.I got stuck in my project.

    thanx

  8. #8
    Registered User
    Join Date
    Oct 2005
    Posts
    34

    Re: Sending .jpg file from phone to PC

    hello ja_caulot,

    i didn't find any sample program at the link given by you,plz help me.

    Regards

Posting Permissions

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