Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt 5.10 Windows & Bluetooth Assert-Error

Qt 5.10 Windows & Bluetooth Assert-Error

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 1.2k Views 2 Watching
  • 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.
  • J.HilkJ Offline
    J.HilkJ Offline
    J.Hilk
    Moderators
    wrote on last edited by
    #1

    Hello everyone,

    I experimenting with Qt 5.10 and QtBluetooth lowenergy under Windows(10), now that it's finally supported. (MSVC2015 compiler and Qt-libs)

    Using the LowEnergyScann-Example from Qt-Creator I run into an Assert failure in "qlowenergycontroller_winrt.cpp"

    This happens in the "Scanning for Services" part of the example

    This only happens with Windows, tried with IOS and MacOs and there I can scann the services fine.
    Using a 3rd-Party BtLe-Scanner I can successfully scan my device for services(under windows) so it's not an hardware issue.

    I restarted my PC, in case any other program would access my Bt-Chip in my PC but the error is tenaciously remaining.

    0_1516342505993_btleAssert.PNG

    //The SourceCode responsible
    490	void QLowEnergyControllerPrivateWinRT::obtainIncludedServices(QSharedPointer<QLowEnergyServicePrivate> servicePointer,
    491	    ComPtr<IGattDeviceService> service)
    492	{
    493	    Q_Q(QLowEnergyController);
    494	    ComPtr<IGattDeviceService2> service2;
    495	    HRESULT hr = service.As(&service2);
    496	    Q_ASSERT_SUCCEEDED(hr);
    497	    ComPtr<IVectorView<GattDeviceService *>> includedServices;
    498	    hr = service2->GetAllIncludedServices(&includedServices);
    499	    Q_ASSERT_SUCCEEDED(hr);
    500	
    501	    uint count;
    502	    hr = includedServices->get_Size(&count);
    503	    Q_ASSERT_SUCCEEDED(hr);
    504	    for (uint i = 0; i < count; ++i) {
    505	        ComPtr<IGattDeviceService> includedService;
    506	        hr = includedServices->GetAt(i, &includedService);
    507	        Q_ASSERT_SUCCEEDED(hr);
    508	        GUID guuid;
    509	        hr = includedService->get_Uuid(&guuid);
    510	        Q_ASSERT_SUCCEEDED(hr);
    511	        const QBluetoothUuid includedUuid(guuid);
    512	        QSharedPointer<QLowEnergyServicePrivate> includedPointer;
    513	        if (serviceList.contains(includedUuid)) {
    514	            includedPointer = serviceList.value(includedUuid);
    515	        } else {
    516	            QLowEnergyServicePrivate *priv = new QLowEnergyServicePrivate();
    517	            priv->uuid = includedUuid;
    518	            priv->setController(this);
    519	
    520	            includedPointer = QSharedPointer<QLowEnergyServicePrivate>(priv);
    521	            serviceList.insert(includedUuid, includedPointer);
    522	        }
    523	        includedPointer->type |= QLowEnergyService::IncludedService;
    524	        servicePointer->includedServices.append(includedUuid);
    525	
    526	        obtainIncludedServices(includedPointer, includedService);
    527	
    528	        emit q->serviceDiscovered(includedUuid);
    529	    }
    530	}
    

    Has anyone an idea what I could do to fix this or can confirm this error?

    Meanwhile I guess I'll open an other bugreport x), they should know me by now.


    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


    Q: What's that?
    A: It's blue light.
    Q: What does it do?
    A: It turns blue.

    J.HilkJ 1 Reply Last reply
    0
    • J.HilkJ J.Hilk

      Hello everyone,

      I experimenting with Qt 5.10 and QtBluetooth lowenergy under Windows(10), now that it's finally supported. (MSVC2015 compiler and Qt-libs)

      Using the LowEnergyScann-Example from Qt-Creator I run into an Assert failure in "qlowenergycontroller_winrt.cpp"

      This happens in the "Scanning for Services" part of the example

      This only happens with Windows, tried with IOS and MacOs and there I can scann the services fine.
      Using a 3rd-Party BtLe-Scanner I can successfully scan my device for services(under windows) so it's not an hardware issue.

      I restarted my PC, in case any other program would access my Bt-Chip in my PC but the error is tenaciously remaining.

      0_1516342505993_btleAssert.PNG

      //The SourceCode responsible
      490	void QLowEnergyControllerPrivateWinRT::obtainIncludedServices(QSharedPointer<QLowEnergyServicePrivate> servicePointer,
      491	    ComPtr<IGattDeviceService> service)
      492	{
      493	    Q_Q(QLowEnergyController);
      494	    ComPtr<IGattDeviceService2> service2;
      495	    HRESULT hr = service.As(&service2);
      496	    Q_ASSERT_SUCCEEDED(hr);
      497	    ComPtr<IVectorView<GattDeviceService *>> includedServices;
      498	    hr = service2->GetAllIncludedServices(&includedServices);
      499	    Q_ASSERT_SUCCEEDED(hr);
      500	
      501	    uint count;
      502	    hr = includedServices->get_Size(&count);
      503	    Q_ASSERT_SUCCEEDED(hr);
      504	    for (uint i = 0; i < count; ++i) {
      505	        ComPtr<IGattDeviceService> includedService;
      506	        hr = includedServices->GetAt(i, &includedService);
      507	        Q_ASSERT_SUCCEEDED(hr);
      508	        GUID guuid;
      509	        hr = includedService->get_Uuid(&guuid);
      510	        Q_ASSERT_SUCCEEDED(hr);
      511	        const QBluetoothUuid includedUuid(guuid);
      512	        QSharedPointer<QLowEnergyServicePrivate> includedPointer;
      513	        if (serviceList.contains(includedUuid)) {
      514	            includedPointer = serviceList.value(includedUuid);
      515	        } else {
      516	            QLowEnergyServicePrivate *priv = new QLowEnergyServicePrivate();
      517	            priv->uuid = includedUuid;
      518	            priv->setController(this);
      519	
      520	            includedPointer = QSharedPointer<QLowEnergyServicePrivate>(priv);
      521	            serviceList.insert(includedUuid, includedPointer);
      522	        }
      523	        includedPointer->type |= QLowEnergyService::IncludedService;
      524	        servicePointer->includedServices.append(includedUuid);
      525	
      526	        obtainIncludedServices(includedPointer, includedService);
      527	
      528	        emit q->serviceDiscovered(includedUuid);
      529	    }
      530	}
      

      Has anyone an idea what I could do to fix this or can confirm this error?

      Meanwhile I guess I'll open an other bugreport x), they should know me by now.

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @J.Hilk

      actually turnes out, rebooting is no longer the rebooting it once was. After forcefully shutting down my Laptop(holding the power button untill you can hear the HDD-arm jumping into the off-State) the problem solved itself.

      Windows is aggravating more and more with each day & update.


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      mrjjM 1 Reply Last reply
      3
      • J.HilkJ J.Hilk

        @J.Hilk

        actually turnes out, rebooting is no longer the rebooting it once was. After forcefully shutting down my Laptop(holding the power button untill you can hear the HDD-arm jumping into the off-State) the problem solved itself.

        Windows is aggravating more and more with each day & update.

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @J.Hilk

        Hi
        its controlled with
        Power Options program. ( typing “power” in start)
        Shutdown settings:
        Turn on fast startup

        for a one timer,
        shutdown /s /t 0
        also seems to totally power off.

        My main complain with win 10 is that is so ugly. the so called modern
        look reminds me of windows for workaround. before we had true color or
        design skills :)

        J.HilkJ 1 Reply Last reply
        4
        • mrjjM mrjj

          @J.Hilk

          Hi
          its controlled with
          Power Options program. ( typing “power” in start)
          Shutdown settings:
          Turn on fast startup

          for a one timer,
          shutdown /s /t 0
          also seems to totally power off.

          My main complain with win 10 is that is so ugly. the so called modern
          look reminds me of windows for workaround. before we had true color or
          design skills :)

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @mrjj thank you!

          Very hitten "feature" -_-

          Sometimes its very difficult to comprehend corporate decisions.


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          mrjjM 1 Reply Last reply
          0
          • J.HilkJ J.Hilk

            @mrjj thank you!

            Very hitten "feature" -_-

            Sometimes its very difficult to comprehend corporate decisions.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @J.Hilk

            well they rewrote all of windows to make it compile on arm. they then used
            1 billion dollars to marked a hopeless winrt table. It failed since ipads are just better at being a tablet. :)

            Since tables can wake up very fast, they added that to windows and its on pr default.
            While sometimes annoying with development. its super nice when you use it as media center.
            It can be off completely and be ready in a split second. and it plays anything.

            So the tablet story is not all for nothing. but close :)

            1 Reply Last reply
            0

            • Login

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