I am trying to connect to a service on a remote device without interaction with the user. This means I want to search for devices that offer a service like the service of the P2P example and then connect to one of the found devices.
I am using the RHostResolver::GetByAddress() to get the addresses of the devices in reach and now I need to filter the found devices to get that devices that support the service I am looking for. With my understanding I need to use CSdpAgent to do this!?!
If I understand right, the GetByAddress Method returns TSockAddr object(s) and the CSdpAgent::NewL() uses TBTDevAddr to search for a service.
Could someone please explain the difference between a SocketAddress and a DeviceAddress to me (especially within the Bluetooth environment)? And how can I convert or cast a TSocketAddr to a TBTDeviceAddr?
I tried the following, but I get a BTLIB 0 Error:
Thank for your help!