BlueTooth: KerrCouldNotConnect

Login to reply to this topic.
Wed, 2003-10-29 12:28
Joined: 2003-10-13
Forum posts: 11
Hi all, I'm trying to open a bluetooth connection for a P800, but it returns me a KErrCouldNotConnect: this is the code:

CQBTUISelectDialog* dialog =
        new (ELeave) CQBTUISelectDialog(remoteDevAddr,
            remoteDevName,
            remoteDevClass,
            CQBTUISelectDialog::EQBTDeviceFilterAll, //device filter
            serviceFilter);
            
            
if (dialog->LaunchSingleSelectDialogLD())
      {

      RSocket btSocket;
      
      TBTSockAddr remoteSockAddr;
      
      remoteSockAddr.SetPort(tcpPort);
      remoteSockAddr.SetBTAddr(remoteDevAddr);
   
      TInt retValue=0;
      retValue=btSocket.Open(socketServ, KBTAddrFamily, KSockSeqPacket, KL2CAP);
      User::LeaveIfError(btSocket.Open(socketServ, KBTAddrFamily, KSockSeqPacket, KL2CAP));
   
      TRequestStatus requestStatus;
   
      btSocket.Connect(remoteSockAddr, requestStatus);
      
      User::WaitForRequest(requestStatus);

/****AND here launch the error********/

What does it means? How can I connect my socket??

Claudia

Wed, 2003-10-29 15:48
Joined: 2003-10-21
Forum posts: 40
BlueTooth: KerrCouldNotConnect
Hi Clarisi,
did you call for socketServ.Connect() before the code you attached?
What is the device you're trying to connect to? is it possible it's not listening ?

regards
Wed, 2003-10-29 17:45
Joined: 2003-10-13
Forum posts: 11
BlueTooth: KerrCouldNotConnect
Yes I've already opened a sockserv connection ad it's ok!
I'm trying to open a connection between p800 and a nokia 7650.

Cla
Wed, 2003-10-29 17:50
Joined: 2003-10-21
Forum posts: 40
BlueTooth: KerrCouldNotConnect
in that case, It might be that the listening device not listening or that it isn't registered in the security manager.you should make sure that the lisened port is the one that is registered in the security manager.
Thu, 2003-10-30 10:28
Anonymous (not verified)
Forum posts: 2043
BlueTooth: KerrCouldNotConnect
The port on security manager is correcly setted and the remoe device is listening. Suddenly,  I've noticed that the symbian exemple UIQBTexample TIcTacToe gives me the same error message...
SO WHAT'S THE MATTER?!?!!

Cla
Thu, 2003-10-30 10:50
Joined: 2003-10-21
Forum posts: 40
BlueTooth: KerrCouldNotConnect
Hi Clarisi,

I'm running out of ideas but here are two more possibilities:
some other application is catching the L2CAP port, or... the bluetooth is closed on the phone?...
Thu, 2003-10-30 12:48
Joined: 2003-10-13
Forum posts: 11
BlueTooth: KerrCouldNotConnect
I really don't know...bluetooth is enabled in both phones...and the port should be free.

Programmation should not have mistrerious ways!!!!

Shocked

Claudia
Tue, 2004-11-23 10:39
Joined: 2004-05-20
Forum posts: 308
BlueTooth: KerrCouldNotConnect
I want to check the Status of BT on my Device via my program i.e whether BT is ON or OFF.

How can i do it ?

Thanks

Amit

  • Login to reply to this topic.