Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Does Qt support BLE 5.0 or above?



  • Hi! Everyone. These days I am trying to develop BLE 5 applications using Qt, does anybody know whether Qt supports BLE 5? During my testing, all are failed, I even can not access the local BLE adapter. The following are the details of my encountered problem.

    Related development tools: Qt 5.15.2, android SDK 30, Visual Studio 2019 MSCV
    Testing platform: two platforms, Google Pixel 4a (BLE5), and Windows 10 with USB Bluetooth Adapter 5.0 (Brand: ZAPOOS, bought from amazon)

    Testing progress:
    First of all, using QBluetoothLocalDevice::allDevices() to obtain all the QBluetoothHostInfo, of course, I got one,

    1142dd68-c68b-492e-9ba4-f5672bf6d764-image.png

    but the MAC address is different from the device specified MAC address. Then accessing the host adapter with the obtained QBluetoothHostInfo, the debug information shows

    f6743e39-b083-4629-9b8d-f61c9dab10d4-image.png

    Even forcibly assigning the right MAC address to QBluetoothLocalDevice and QBluetoothDeviceDiscoveryAgent, the results show the adapter is invalid, and can not start scanning.

    I am sure that the application has obtained permission to access the network devices, and as well, my code is tested pass with BLE 4 platforms. Does anybody encounter a similar problem? So confused! Could anyone please do me a favor? Thank you very much!


  • Moderators

    @Logos said in Does Qt support BLE 5.0 or above?:

    I am sure that the application has obtained permission to access the network devices

    are you sure ?

    Bluetooth on adnroid requieres android.permission.BLUETOOTH and android.permission.ACCESS_FINE_LOCATION

    and newer devices/android versions requiere those permissions set in the manifest file and require also a runtime check!



  • Hi! @J-Hilk

    Thanks for your reply.

    I am really sure. As you can see from the AndroidManifest.xml, is it right?

    522acc9f-8ff2-4c52-b3fa-d6761771a5f8-image.png

    Also, the permission is approved manually when the first running.


  • Moderators

    @Logos alright

    have you tried the Lowenergy Scanner example that comes with QtCreator?
    https://doc.qt.io/qt-5/qtbluetooth-lowenergyscanner-example.html

    that should work out of the box



  • @J-Hilk Yes. The same problem happened.

    By the way, on windows 10, it has succeeded. The problem is that the default BLE driver of windows 10 only supports BLE4, installing a newer driver would solve this problem. To this end, BLE5 is confirmed on Windows 10 with Qt. But for android, still on my way.


Log in to reply