Hello,
I'm trying to connect to a bluetooth RFCOMM device (under emulator, using Nokia's emulator driver to access real BT (usb)hardware, S60 SDK 3rd ed FP1). The socket.Connect however always fails with KErrHCILinkDisconnection (-6305) error. I tried to look for further information but found nothing relevant. Any ideas what might be the problem here?
I also tried to connect to my phone with same code and it apparently worked properly (negotiated secure connection and - well, did not produce any error codes at least, and also it received some data I sent - no idea what the phone did with the data though, and I doubt it even matters)
The code:
------------
RSocket socket;
TRequestStatus status;
TBTSockAddr sockAddr;
sockAddr.SetBTAddr(addr);
sockAddr.SetPort(port);
User::LeaveIfError( socket.Open(iSocketServer, KBTAddrFamily, KSockStream, KRFCOMM) );
// tried also: _LIT(KStrRFCOMM, "RFCOMM"); User::LeaveIfError( socket.Open(iSocketServer, KStrRFCOMM) );
socket.Connect(sockAddr, status);
User::After(1000);
User::WaitForRequest(status);
if (status != KErrNone)
{
TBuf<32> buf;
_LIT(KError, "error code = %d");
buf.Format(KError(), status);
informationNote->ExecuteLD(buf);
}
--------
Update:
This only seems to happen when trying to connect to a single-purpose BT-RS232 adapter I need to use.
When connecting from my emulated phone to a BT adapter on another PC the RFCOMM link works.
When trying to connect to said RS232-adapter with normal PC-BT RFCOMM interface the link works.
But when trying to connect from my emulated phone it will give that error.



