Qt 5.10 Windows & Bluetooth Assert-Error



  • 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.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.


  • Qt Champions 2016

    @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 :)



  • @mrjj thank you!

    Very hitten "feature" -_-

    Sometimes its very difficult to comprehend corporate decisions.


  • Qt Champions 2016

    @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 :)


Log in to reply
 

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