×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Oct 2007
    Location
    Malta
    Posts
    80

    RFCOMM port RecvOneOrMore()

    Hi, I'm receiving some bytes from Linux, (video file, I also tried a string, via RFCOMM).
    On receiving the bytes I would like to save the data onto a file. So I start sending data from the Linux program, and on reception (receiving socket already opened), the RunL() function executes.

    However I try to write data to my file, and the file size is still 0 bytes. If in the loop I manually write some other data, that data is written so its not a file issue thing.

    Code:
    void CBTStreamPassive::RunL()
    {
    	if (iStatus.Int() == KErrNone)
    	{
    		iBTSocketListen.RecvOneOrMore(iFirst_buffer,0,iStatus, iLen);
    		ReceiveFramesL();
    		SetActive();
    		//socket has connected successfully, start listening
    	}
    Code:
    void CBTStreamPassive::ReceiveFramesL()
    {
    	//User::LeaveIfError(iFile.Write(KBTest));
    	User::LeaveIfError(iFile.Write(iFirst_buffer));
    }
    Please note that,
    TBuf8<KMessageLength> iFirst_buffer;

    Now I'm questioning myself whether I can actually store bytes on a TBuf8 descriptor, cause it seems that this data is not being modified. If not, on what data type can I write my receiving data on?

    thanks

  2. #2
    Regular Contributor
    Join Date
    Oct 2007
    Location
    Malta
    Posts
    80

    Re: RFCOMM port RecvOneOrMore()

    fixed, was doing the usual stupid mistake
    listening on a wrong port

Similar Threads

  1. RFCOMM, Serial Port Profile connection to PC with JAVA
    By SonixGer in forum Bluetooth Technology
    Replies: 6
    Last Post: 2005-09-05, 20:52
  2. How to determine RFCOMM port number correctly?
    By Marat Khalili in forum Bluetooth Technology
    Replies: 0
    Last Post: 2005-07-19, 06:58
  3. RFCOMM port settings
    By ja_calulot in forum Symbian
    Replies: 1
    Last Post: 2004-08-16, 12:09
  4. Serial port over RFCOMM demo
    By sigmundf in forum Bluetooth Technology
    Replies: 2
    Last Post: 2004-07-28, 13:39
  5. rfcomm, serial port profile
    By strumik in forum Bluetooth Technology
    Replies: 1
    Last Post: 2003-03-26, 23:04

Posting Permissions

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