Bluetooth LE performance in different platforms
-
Hello.
I'm testing a simple Bluetooth LE application that only scans and shows a list of the recognized devices. There are two particular devices that I want to recognize, one of them is a simulated iBeacon, although they could be other devices around. I'm getting different results depending on the platform that I test the application on.
-
Windows, Qt 5.13.1-0-201909031231 (MSVC 2017 64-bit), tested on Windows 10 Pro 1903:
I can detect one of the devices, but not the simulated iBeacon. -
Android for arm64-v8a (Clang Qt 5.13.1 for Android ARM64-v8a), tested on Samsung Galaxy S7 with Android 8: no devices are detected
-
Linux, Qt 5.13.1-0-201909031251, tested on Linux MX-19 guest in VirtualBox, same Bluetooth hardware used in Windows above: I can detect the two devices, and the device list is larger than the one in Windows.
In all cases the lowEnergyDiscoveryTimeout is set to 0.
The Bluetooth LE scan example shows similar performance issues so, because of that, I thought that it was not related to my code.
By using other applications (not Qt related), like for example Bluetooth Beacon Interactor in Windows 10 or Beacon Scanner in Android, I can detect the missing devices on those platforms.
Does it make sense the difference in the Qt Bluetooth library performance between platforms or may I be doing something wrong when using it?
Thank you.
-
-
@RickS said in Bluetooth LE performance in different platforms:
[...]
- Windows, Qt 5.13.1-0-201909031231 (MSVC 2017 64-bit), tested on Windows 10 Pro 1903:
I can detect one of the devices, but not the simulated iBeacon.
Is the simulated beacon paired in Windows Bluetooth settings? Without it, Qt will not detect it! (this will be fixed in Qt 5.14 I think).,
Also, make sure you're using the newest Windows version with all updates. Unfortunately, Bluetooth support on Windows is quite bad, has memory leaks etc. In early Windows 10 builds it was barely working at all.
- Android for arm64-v8a (Clang Qt 5.13.1 for Android ARM64-v8a), tested on Samsung Galaxy S7 with Android 8: no devices are detected
Check your AndroidManifest file - are you requesting all the necessary permissions (including location permission which is mandatory for Bluetooth LE)?
- Linux, Qt 5.13.1-0-201909031251, tested on Linux MX-19 guest in VirtualBox, same Bluetooth hardware used in Windows above: I can detect the two devices, and the device list is larger than the one in Windows.
Yeah, BLE support is generally working best on Linux.
[...]
Does it make sense the difference in the Qt Bluetooth library performance between platforms or may I be doing something wrong when using it?
It's horrible and bad but yes, you should expect Qt Bluetooth to work different on different operating systems, and even on different hardware under the same system (esp. Android is problematic - one some devices BLE works superb, on some it is very bad).
- Windows, Qt 5.13.1-0-201909031231 (MSVC 2017 64-bit), tested on Windows 10 Pro 1903:
-
Thank you very much for your reply.
@sierdzio said in Bluetooth LE performance in different platforms:
Is the simulated beacon paired in Windows Bluetooth settings? Without it, Qt will not detect it! (this will be fixed in Qt 5.14 I think).,
Unfortunately, Windows does not allow me to pair the simulated iBeacon since it does not appear in the available Bluetooth devices list from the control panel.
@sierdzio said in Bluetooth LE performance in different platforms:
Also, make sure you're using the newest Windows version with all updates. Unfortunately, Bluetooth support on Windows is quite bad, has memory leaks etc. In early Windows 10 builds it was barely working at all.
Sure, it is the latest Windows version with all updates.
I was also trying to compile the Qt 5.15 source available in the repo to enable the win32 Bluetooth API to see if it makes any difference but I wasn't able to compile it... But this was just a curiosity. For me it's OK to consider Windows as the least compatible platform for the moment.
About Android, I was able to tune the application and now it can properly detect the simulated iBeacon. I was using the Bluetooth LE scanner example but I hadn't checked the manifest file so that was probably the issue.