btscanner example does not work, cannot find BLE host device

  • Hi,

    I am a newbie working on BLE examples; however none of the BLE examples work on both of my desktop with CyPress BLE dongle and my laptop.

    Could anyone help me and tell what is happening?

    I did a little modification on the btscanner example, and here is my own codes:

    QString localDeviceName;
    QBluetoothAddress dongleAddress;
    QBluetoothHostInfo dongleHostInfo;

    // Check if Bluetooth is available on this device
    QList<QBluetoothHostInfo> dongleHostInfoList = QBluetoothLocalDevice::allDevices();
    if (dongleHostInfoList.count() > 1){
        QStringList dongleNameStringList;
        for (int n=0; n<dongleHostInfoList.count(); n++){
            dongleNameStringList <<;
        QString dongleNameString = QInputDialog::getItem(0, QString("Sen Dongle Select"), QString("Please select your BLE Dongle."), dongleNameStringList, 0, false);
        dongleAddress =;
    } else if(dongleHostInfoList.count() == 1){
        dongleAddress =;
    }else   {
        qDebug() << QString ("No Device Detected");
    localDevice = new QBluetoothLocalDevice(dongleAddress);

    Unfortunately, I never find my BLE host device.

    Please help me.

    Thank you!

  • Hi Sen,
    What is the OS you are running your code? Does the BT device work (in Linux commands like $hcitool dev; $hcitool scan).

  • Me too. I use the linux command line tools to scan and than Qt to manage the ble.

  • @yeckel said:

    oes the BT device work

    I just figured it out that Qt does not support windows.
    I am going to install Linux as a second OS.

    Do you have any suggestion?

    Thank you!

  • Yep It's not supported on Windows. Easiest is to use Ubuntu. You should be able to install it in for example VirtualBox and share the USB device there.

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.