'Invisible BLE device when Qt scanning

I'm new on Bluetooth Low Energy (BLE) device development and I have to develop an HMI (on Windows 10) which is able to communicate with the BLE device.

For this purpose, I choose to develop my SW with Qt v5.14.2 which includes API for Bluetooth communication.

I'm in the first step, which is scanning devices around me. For this test, I have some standard Bluetooth devices around and also a BLE dev kit (Nordic nRF52) that advertise permanently.

My problem is that: when I run my code, I can find standard Bluetooth devices around but not the BLE device.. (With another app I can find it all..).

Here is my code: 1) My constructor which initialize the Bluetooth com and start it:

CemBluetooth::CemBluetooth(QObject *parent) : QObject(parent)
{
    discoveryAgent = new QBluetoothDeviceDiscoveryAgent();
    discoveryAgent -> setLowEnergyDiscoveryTimeout(10000); // in ms

    connect(discoveryAgent, SIGNAL(deviceDiscovered(const QBluetoothDeviceInfo&)), this, SLOT(addDevice(const QBluetoothDeviceInfo&)));
    connect(discoveryAgent, SIGNAL(finished()), this, SLOT(f_ctrl_bl_scanBlDevicesFinished()));

    discoveryAgent->start(QBluetoothDeviceDiscoveryAgent::LowEnergyMethod);
}

2) the slot addDevice() which extract devices found:

void CemBluetooth::addDevice(const QBluetoothDeviceInfo& device)
{
    std::cout << "Device discovered: ";
    //if (device.coreConfigurations() & QBluetoothDeviceInfo::LowEnergyCoreConfiguration) // i shunt this condition for the moment, in order to detect all device.
    //{
        QString name1 = device.name();
        std::cout << name1.toStdString() << std::endl;
    //}
}

Can you help me to find out the solution, please?



Solution 1:[1]

Some info for future visitors:

"Win32 backend has been removed. There will not be a working Bluetooth backend when Qt is built with mingw."

Link: https://doc-snapshots.qt.io/qt6-dev/qtbluetooth-changes-qt6.html

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Afalsa