Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-102248

QBluetooth low energy discovering details on Windows cannot connect signals

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Duplicate
    • Affects Version/s: 5.15.8
    • Fix Version/s: None
    • Labels:
      None
    • Platform/s:
      Windows

      Description

      Hello,
      When running QLowEnergyServices::discoverDetails, qt prints the following messages in the console:

      QObject::connect: Cannot queue arguments of type 'QHash<QLowEnergyHandle,QLowEnergyServicePrivate::CharData>'
      QObject::connect: Cannot queue arguments of type 'QVector<QBluetoothUuid>'
      QObject::connect: Cannot queue arguments of type 'QLowEnergyHandle'
      

      And the connection never completes.

      The solution I found is to add QT += bluetooth-private in the pro file, then

      #include "QtBluetooth/private/qlowenergyserviceprivate_p.h"
      .....
          qRegisterMetaType<QHash<QLowEnergyHandle,QLowEnergyServicePrivate::CharData> >("QHash<QLowEnergyHandle,QLowEnergyServicePrivate::CharData>");
          qRegisterMetaType<QVector<QBluetoothUuid>>("QVector<QBluetoothUuid>");
          qRegisterMetaType<QLowEnergyHandle>("QLowEnergyHandle");
      
      

      And the the connection succeeds.

      On Android I don't have any issue, I have not tested Mac and Linux.

      Thanks,

      Philippe Lelong

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              ablasche Alex Blasche
              Reporter:
              matirai Philippe
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes