Hello!
I am trying to develop a simple Bluetooth service discovery. I've taken code from Bluetooth Point to Multipoint example. I've changed the UUID in order to search for RFCOMM services.
The result is always the same, no found services. I've tried to search other UUIDs (L2CAP, SerialPortUUID,...), but the result is always the same. The most surprising thing is that listener methods are not executed.
My first thought was that the MAC addresses obtained in the device discovery process were wrong or missmatched, but I've checked them, and they aren't wrong.
Could anybody help me?
-------------------------------------------------------------------------------------------------
Thanx.Code:void CServiceDiscoverer::DiscoverServicesOnDevice(TDeviceData* aDevData) { FinishDiscovery(); iDevDataChanged = EFalse; iDevData = aDevData; TBuf<20> address; iObserver.printMessage(iDevData->iDeviceName); iDevData->iDeviceAddr.GetReadable(address); iObserver.printMessage(address); // init new service discovery agent iAgent = CSdpAgent::NewL(*this, iDevData->iDeviceAddr); // set search properties for agent iSpat = CSdpSearchPattern::NewL(); // use our service id to filter the services discovered // -> will return only the services with matching service id(s) TUUID service(KRFCOMM); //service = KL2CAP; iSpat->AddL(service); //service = KSerialPortUUID; //iSpat->AddL(service); iAgent->SetRecordFilterL(*iSpat); // initiate search // this will result in call to NextRecordRequestComplete() iAgent->NextRecordRequestL(); iRunning = ETrue; }



