I've modified the sample BluetoothPointToPoint application that comes with the 7650 developer kit to use L2CAP sockets instead of RFCOMM. It seems to work fine, but one of the changes I had to make was to change the original server to read from the socket using Read() instead of RecvOneOrMore(). If I used RecvOneOrMore() (or even plain Recv()) I got a system error -5, which I believe is KErrNotSupported. Now, this has me a bit stumped because the only caveat mentioned by the API for RSocket is that RecvOneOrMore() (or Recv()) must be used on a connected socket, which my L2CAP socket certainly is. The only difference I can see about L2CAP sockets is that they are of type "Sequenced Packet", but I do not understand how this precludes the use of Recv(). Can someone please explain?
Incidentally, could someone also explain how come Read() will return after reading only 30 bytes into the provided descriptor, even though the descriptor is declared as TBuf8<32>? This seems to contradict the API documentation for Read() which says "The function only complete when the full amount of requested data has been received (or the connection breaks). This means when the descriptor has been filled to its maximum length (not its current length)."