Hello guys,
I need help.
I have implemented a slave on Pc Bluetooth in Java. While on device (nokia n95) I implemented a master bluetooth in symbian c++.
Then the device performs the operations:
-device discovery;
-discovery service;
-connection devices.
I can not make the two devices communicate.
The device find the PC with the BT connection. But device doesn't find the service of PC.
On PC (java):
Code:... public static final String UUID_STRING = "0x10ff"; public static final String SERVICE_NAME = "0x10ff"; private StreamConnectionNotifier server; ... String url = "btspp://localhost:" + UUID_STRING + ";name="+ SERVICE_NAME; discoveryAgent = local.getDiscoveryAgent(); server = (StreamConnectionNotifier) Connector.open(url); StreamConnection conn = server.acceptAndOpen(); ...
while on the device (Symbian C++):
IDEAS?????Code:... #define KBT_serviceID 0x10ff TUUID serviceUUID(KBT_serviceID); iSpat->AddL(serviceUUID); iAgent->SetRecordFilterL(*iSpat); // initiate search // this will result in call to NextRecordRequestComplete() iAgent->NextRecordRequestL(); ... ... void CServiceDiscoverer::NextRecordRequestComplete( TInt aError, TSdpServRecordHandle aHandle, TInt aTotalRecordsCount) { iRunning = EFalse; if ( aError==KErrNone && aTotalRecordsCount>0 ) { // we got records, retrieve attributes for record // request protocol descriptor from remote device records, // we need this to retrieve remote port to connect to later on.. TRAPD(err,iAgent->AttributeRequestL(aHandle, KSdpAttrIdProtocolDescriptorList) ); if( err ) TRAP(err,iObserver.ReportServiceDiscoveryErrorL(err)); } else { // done with this device, store data if changed if ( iDevDataChanged ) { iDevData->iDeviceServicePort=iPort; (*iDevDataList)[iDeviceIdx]=iDevData; } // discover services on next device, if any left iDeviceIdx++; if ( iDeviceIdx<iDevDataList->Count() ) { // more devices to probe, proceed TRAPD(err,DiscoverServicesOnDeviceL((*iDevDataList)[iDeviceIdx])); if( err ) TRAP(err,iObserver.ReportServiceDiscoveryErrorL(err)) } else { FinishDiscovery(); // all devices done, notify TRAPD(err,iObserver.HandleServiceDiscoveryCompleteL()); } } } ...
Thanks



