How to detect Bluetooth Connection Type?
-
wrote on 27 Mar 2021, 16:16 last edited by
Greetings,
I am writing a Qt app that has to deal with Bluetooth SPP and BLE connection. I can communicate with a particular connection type in the individual app.
But, I want to write a single app that should detect the connection type and connect accordingly and communicate.Can you please guide how to achieve this?
Best Regards,
Ahsan -
Greetings,
I am writing a Qt app that has to deal with Bluetooth SPP and BLE connection. I can communicate with a particular connection type in the individual app.
But, I want to write a single app that should detect the connection type and connect accordingly and communicate.Can you please guide how to achieve this?
Best Regards,
Ahsan@ahsan737 https://doc.qt.io/qt-5/qbluetoothdevicediscoveryagent.html allows you to set the Discovery Method https://doc.qt.io/qt-5/qbluetoothdevicediscoveryagent.html#DiscoveryMethod-enum
it's the easiest way to detect classic devices vs LE Devices
or if you discover all devices you can detect from QBluetoothDeviceInfo enum QBluetoothDeviceInfo::CoreConfiguration - check the flags to see if the device is a standard (classic) one, a BLE device or supports both
1/2