Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QBluetoothDeviceDiscoveryAgent on Low Energy devices
operamint last edited by
I have already posted a question on this one. It seem to me that QBluetoothDeviceDiscoveryAgent has a number of serious issues. Yet, all the following posts within the last couple of months are unresolved/unanswered:
- QBluetoothDeviceDiscoveryAgent does not allow specifying scan for Low Energy devices only, therefore it must use the android API call startDiscovery() which by the documentation is only meant/(supported?) for BT classic, although it normally also discovers LE devices. This is a two-pass fixed 12 second scan (which may be too short), where the second pass connects to each device found to get device name etc. The scan drains battery and is heavy on the BT adapter.
- Because of this, it cannot use android API calls startLeScan() or the newer startScan(), which are faster and more lightweight. They also allow to specify various filters which may speed up the search, like MAC addresses or device names. In addition the scan time can be set. startLeScan() has been around since Android 4.3 and startScan() since 5.0.