Important: Please read the Qt Code of Conduct -

BluetoothDiscoveryModel.FullServiceDiscovery issue?

  • I'm trying to use BluetoothDiscoveryModel.FullServiceDiscovery, but failing.

    Turns out the QML Bluetooth Scanner Example doesn't work either.

    I am running Qt 5.10 under WinRT. The example that uses C++ Bluetooth classes (lowenergyscanner) works fine and can discover services, so it does not seem to be an environment issue.

    BluetoothDiscoveryModel.DeviceDiscovery also works fine.

    This is the console when running QML Bluetooth Scanner Example :

    winrtrunner --device 0 --start --stop --install --wait 0 --profile appx C:/Qt/Examples/Qt-5.10.1/bluetooth/build-scanner-Qt_5_10_1_for_UWP_64bit_MSVC_2017-Debug/debug/qml_scanner.exe
    qt.winrtrunner: Using the Appx profile.
    qt.winrtrunner: Package al
    ready installed.
    qt.winrtrunner: App started with process ID 6508 WARNING: QApplication was not created in the main() thread. Could not enable JIT, fallback to interpreter mode. Consider setting the code-generation capability JIT is disabled for QML. Property bindings and animations will be very slow. Visit to learn about possible solutions for your platform. New device: F5:2C:B5:A2:13:17 New device: D6:8D:8C:9C:67:6A Discovery mode: 1 qrc:/scanner.qml:111: TypeError: Cannot read property 'deviceAddress' of undefined qrc:/scanner.qml:111: TypeError: Cannot read property 'deviceAddress' of undefined QCoreApplication::postEvent: Unexpected null receiver

    As can be seen two devices are discovered in Device mode, but then something goes wrong in FullService.
    The two TypeErrors are from the line

    var str = "Address: " + s.deviceAddress;

    in the example code. So it looks like there is no service property on btModel?

    I was kind of thinking that the example should work, so maybe this is some bug?

Log in to reply