Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to detect Bluetooth Connection Type?
ahsan737 last edited by
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?
@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