From 6d610e2a2537048dd3908c53847d3bea4c8f2471 Mon Sep 17 00:00:00 2001 From: Lauri Laanmets Date: Mon, 29 Jan 2018 16:10:05 +0200 Subject: Don't require pairing when connecting to BLE on WinRT If we are running on a Windows version with Creators Update or newer (>=15063) we can use new bluetooth low energy API that allows us to do device discovery without the requirement of having paired the device. Instead of connecting to the device and fetching its services, we can use UUIDs from advertisement packages to get an initial service list. By using that approach we can get rid of the pairing process in 'connectToDevice' and replace it with 'GetGattServicesAsync' if no services are yet available. The old behavior was kept as a fallback for the case where the device has already been paired. If the backend is built with an older Windows Kit or the machine running the application does not support the new API we fall back to the old implementation which still requires pairing. Task-number: QTBUG-58660 Change-Id: Ice262d4d993a0119efb8b6c8fe9a21830717569f Reviewed-by: Alex Blasche --- config.tests/winrt_btle_no_pairing/winrt.pro | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 config.tests/winrt_btle_no_pairing/winrt.pro (limited to 'config.tests/winrt_btle_no_pairing/winrt.pro') diff --git a/config.tests/winrt_btle_no_pairing/winrt.pro b/config.tests/winrt_btle_no_pairing/winrt.pro new file mode 100644 index 00000000..d60fd242 --- /dev/null +++ b/config.tests/winrt_btle_no_pairing/winrt.pro @@ -0,0 +1,3 @@ +SOURCES += main.cpp + +!winrt: LIBS += runtimeobject.lib -- cgit v1.2.3