Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Bluetooth LE device monitor
QtWS25 Last Chance

Bluetooth LE device monitor

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 3 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sen Li
    wrote on 12 Nov 2015, 18:21 last edited by
    #1

    Hi,

    I am a newbie on both of Qt and BLE, trying to get data in Qt via BLE dongle ( Cypress PSoC 4 BLE dongle), however cannot even find my BLE dongle in Qt.

    If possible, could anyone tell me where I can find an example like BLE device monitor? because the scan example in Qt doesn't work at all for me.

    Or which command should I use to look for a BLE device?

    Thank you!

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kuzulis
      Qt Champions 2020
      wrote on 12 Nov 2015, 18:46 last edited by
      #2

      In this forum there are no telepathists... They went to holidays.

      Or which command should I use to look for a BLE device?

      Google will help you..

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sen Li
        wrote on 15 Nov 2015, 02:15 last edited by
        #3

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

        Here is my 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 << dongleHostInfoList.at(n).name();
            }
            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);
        

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 15 Nov 2015, 21:44 last edited by
          #4

          Hi,

          Like @kuzulis wrote, we're not telepathists nor psychic. You should at least give more details like OS and Qt version used. Also, since you're using the bluetooth module, did you check that you are using a supported OS ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          3/4

          15 Nov 2015, 02:15

          • Login

          • Login or register to search.
          3 out of 4
          • First post
            3/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved