JesperWe last edited by JesperWe
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.DeviceDiscoveryalso 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 qt.winrtrunner.app: WARNING: QApplication was not created in the main() thread. qt.winrtrunner.app: Could not enable JIT, fallback to interpreter mode. Consider setting the code-generation capability qt.winrtrunner.app: JIT is disabled for QML. Property bindings and animations will be very slow. Visit https://wiki.qt.io/V4 to learn about possible solutions for your platform. qt.winrtrunner.app: New device: F5:2C:B5:A2:13:17 qt.winrtrunner.app: New device: D6:8D:8C:9C:67:6A qt.winrtrunner.app: Discovery mode: 1 qt.winrtrunner.app: qrc:/scanner.qml:111: TypeError: Cannot read property 'deviceAddress' of undefined qt.winrtrunner.app: qrc:/scanner.qml:111: TypeError: Cannot read property 'deviceAddress' of undefined qt.winrtrunner.app: QCoreApplication::postEvent: Unexpected null receiver
As can be seen two devices are discovered in Device mode, but then something goes wrong in FullService.
TypeErrors are from the line
var str = "Address: " + s.deviceAddress;
in the example code. So it looks like there is no
I was kind of thinking that the example should work, so maybe this is some bug?