Results 1 to 2 of 2

Thread: Bluetooth LE Monitor

  1. #1
    Join Date
    Apr 2015
    Posts
    5
    Qt products
    Qt5
    Platforms
    Windows

    Default Bluetooth LE Monitor

    Hi,

    I am a newbie, trying to get data via BLE dongle in Qt. However, cannot even find the dongle device.
    If possible, could anyone tell me where I can find a Qt example like BLE device monitor, or teach me which class should I use to open a BLE dongle on PC?

    Thank you!

  2. #2
    Join Date
    Apr 2015
    Posts
    5
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Bluetooth LE Monitor

    I could not even find my host BLE device.
    Could anyone help me?

    Here is my code:

    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 << dongleHostInfoList.at(n).name();
    // .description();//.deviceName();
    }
    QString dongleNameString = QInputDialog::getItem(0, QString("Sen Dongle Select"), QString("Please select your BLE Dongle."), dongleNameStringList, 0, false);
    dongleAddress = dongleHostInfoList.at(dongleNameStringList.indexOf (dongleNameString)).address();
    } else if(dongleHostInfoList.count() == 1){
    dongleAddress = dongleHostInfoList.at(0).address();
    }else {
    qDebug() << QString ("No Device Detected");
    }

    localDevice = new QBluetoothLocalDevice(dongleAddress);

Similar Threads

  1. Replies: 2
    Last Post: 29th April 2014, 10:14
  2. QT on LCD monitor
    By Ratheendrans in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 5th March 2011, 17:03
  3. Bluetooth! need help.
    By bilalsaeed in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 16th February 2011, 17:33
  4. X Monitor in a Qt form
    By prasenjit in forum Qt-based Software
    Replies: 1
    Last Post: 29th April 2010, 07:58
  5. Bluetooth app?
    By danoh in forum Newbie
    Replies: 2
    Last Post: 30th August 2009, 23:48

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.