Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2005

    receive file via bluetooth by RecvOneOrMore

    Im using a RFCOMM socket, i can successfully sending and receive the command data by RecvOneOrMore function.

    however, now i want to receive a jpg file, but it look like doesnt receive my sent file correctly.

    does RecvOneOrMore has a size limited?

    TBuf8<700000> iBuffer; // i put 700000 bcos my jpeg file has 300KB, so i set more buffer in case nt enuf space.
    TSockXfrLength iLen;

    iSendingSocket.RecvOneOrMore(iBuffer, 0, iStatus, iLen);

    if(iBuffer.Length() != iLen()) // i use this to chk but it is correct in my code

    but after this function, i has another read() function behind and it will still keep receive some of the code. So, it show that my jpeg file is nt fully received by the previous RecvOneOrMore. if i send a smaller file, the read() function behind wont get data after that.

    so i guess maybe RecvOneOrMore function has limited size. Anyone can help to solve my problem?

    Or I shall use read() instead of RecvOneOrMore?

    p/s: series 60 symbian os 7s, n6600 and n6260

  2. #2
    Registered User
    Join Date
    Feb 2005

    Transfer .sis file using Bluetooth


    Can you please help to send a .sis file using bluetooth for a Nokia 6600, in Symbian C++.

    Thanking you,

  3. #3
    Registered User
    Join Date
    Feb 2004
    !! Read will not read until the end of the buffer. The documentation says so, but it is just not true !!

    I would do RecOneOrMore with temp buffer Tbuf8<512> and append that data to target buffer. I do not think it is possible to append using RecOneOrMore. I zero the buffer before reading, but this is most likely overkill.

    You can ALSO use HBuf* if you wish to have dynamic length. (there may be other ways too, but one working is enough for me).

    RecOnOrMore ==KErrEof means that the socket is closed.

    All information above is based on XP with TCP sockets, connected BT sockets may have diffe

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2003

    You can use the following to ask if the socket has any inbound data to be read:

    TInt bytes = 0;
    iSocket.GetOpt(KSOReadBytesPending, KSOLSocket, bytes);
    if(bytes > 0)
    // continue read from socket

    Ari / Forum Nokia

Posting Permissions

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