How to discover bluetooth services?

01-25-2018 05:39 PM
by Anonymous User
Not applicable

Can anyone help with understanding how to discover bluetooth services?

Following online docs, we create a 'BluetoothDiscoveryModel' and hook it up to a Listview to see what it finds.

If we set the 'discoveryMode' property to 'BluetoothDiscoveryModel.DeviceDiscovery' then we can see results appear for devices. But, in order to connect, we want to get the services.

So, we change the mode to either 'BluetoothDiscoveryModel.FullServiceDiscovery' or 'BluetoothDiscoveryModel.MinimalServiceDiscovery', but in both cases we get absolutely no results.

We are aware it won't (according to docs we've read!) that it won't work on Windows. Running from a Mac, we do notice this error popping up in the console log (regardless which mode we set the discovery to):

Exception NSInvalidArgumentException thrown while decoding IOBluetoothSDPServiceRecord

We're not sure if this indicates some problem or not?

Attached is the code we are using - is extremely basic and is essentially just following a sample from the Qt online docs.


Any help or suggestions welcome! Thanks.


Tags (1)
0 Kudos
0 Replies