Problems with an OBEX connection
| Thu, 2003-11-06 16:05 | |
|
Is there someOne who can tell me what's wrong with this code about an Obex connection under p800:
This is the code: RSocketServ socketServ; User::LeaveIfError(socketServ.Connect()); //si connette al socket server //Variabili per BlueTooth TBTDevAddr remoteDevAddr(0); TBTDeviceName remoteDevName; TBTDeviceClass remoteDevClass; TInt serviceFilter = -1; // -1 lista i device per tutti i tipi di servizi //Crea un btSocket CQBTUISelectDialog* dialog = new (ELeave) CQBTUISelectDialog(remoteDevAddr, remoteDevName, remoteDevClass, CQBTUISelectDialog::EQBTDeviceFilterAll, //device filter serviceFilter); if (dialog->LaunchSingleSelectDialogLD()) { TProtocolDesc pInfo; TProtocolName pName(_L("BTLinkManager")); User::LeaveIfError(socketServ.FindProtocol(pName,pInfo)); _LIT8(KServerTransportName,"RFCOMM"); TObexBluetoothProtocolInfo protocolInfo; protocolInfo.iTransport.Copy(KServerTransportName); protocolInfo.iAddr.SetBTAddr(remoteDevAddr); protocolInfo.iAddr.SetPort(2); CObexClient* iClient; iClient =CObexClient::NewL(protocolInfo); iState=iConnect; iClient->Connect(status); //Here it does'n connect SetActive(); Regards, Claudia |
|






Forum posts: 26
How do you know you can connect with Port #2?
This may be a problem. Check the btobjectexchange example in Series60 examples. They determine the port in a different way.
Niimidan