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

BLE scan example's results are different from MSVC and MinGW



  • Hello, I tried to execute bluetooth example : "low energy scanner"

    My environment is windows 10. using Qt 5.15.0
    I used both MSVC2019 and MinGW build configurations for same project.
    However, the results are different from MSVC version and MinGW.
    Number of scanned list had very different result. MSVC result has over 10 items in list, but MinGW found nothing.

    Do I need additional setting for MinGW?
    Because this is very first time to use MinGW..

    Or there is something difference between MSVC and MinGW?

    Thanks in advanced..


  • Moderators

    @ANNI take a good look at the console output, in there Qt will tell you that for minGW on windows, BLE is a dummy module and will not access the Bluetooth hardware.

    AFAIK that is due to UWP specific calls that are only possible from MSVC🤷‍♂️



  • @J-Hilk , Thanks for your answer. Then do I need specific environment for using MinGW or install some library? Is there any way to use MinGW execute in Win10?


  • Moderators

    @ANNI you can use minGW on win10, no problem, you just can't (correctly) use the BLE module of Qt with it.

    You would have to use a 3rd Party lib in that case.

    Maybe this changes in Qt6 🤔 Not sure what the QtC plans are for that



  • @ANNI, you can try to compile the qtconnectivity from the wip/win branch... There are implemented the classic bluetooth for all Windows and the BLE support for the Win8/10 using MinGW or MSVC with the win32 API instead of UWP.

    But in that case you need to start BLE scanning from the Windows in-box appliction at first, because the Windows does not provided the Win32 API to do the BLE scanning.


Log in to reply