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:
//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
//read the file and store in a descriptor(BytesRead)
TInt buff_length = BytesRead.Length();
while ( buff_length != 0)
TInt ReadResult = iFile.Read(BytesRead);
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.