Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.6.0
-
None
Description
When running a BLE device search using QBluetoothDeviceDiscoveryAgent, 10 seconds after we call start(), search is stopped automatically and finish() is emited.
This is due to a timeout setup by src\bluetooth\qbluetoothdevicediscoveryagent_android.cpp, line 273.
The thing is that the device we are trying to find may not be found within 10sec, so only the end user/developer should decide when to stop the discovery agent search. Timeout feature is nice, but should be optional (why not an optional parameter to the start() slot). I struggled hours to understand what was going on and why my device was not found....it was just because Qt was not searching it anymore...
See this related topic:
http://stackoverflow.com/questions/36858110/what-makes-qbluetoothdevicediscoveryagentfinished-be-called
Attachments
For Gerrit Dashboard: QTBUG-53012 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
159107,2 | Increase the BTLE scan timeout to 25s | 5.6 | qt/qtconnectivity | Status: MERGED | +2 | 0 |
161994,5 | Add BTLE device discovery timeout API | dev | qt/qtconnectivity | Status: MERGED | -2 | 0 |
162085,5 | Allow adjustment of device search timeout on BlueZ | dev | qt/qtconnectivity | Status: MERGED | +2 | 0 |
162127,2 | Android: Allow to set BTLE device search timeout | dev | qt/qtconnectivity | Status: MERGED | +2 | 0 |
162983,2 | Add a warning when QBDDAgent::setLowEnergyDiscoveryTimeout is no-op | dev | qt/qtconnectivity | Status: MERGED | +2 | 0 |
162984,4 | Add unit test for QBDDAgent::setLowEnergyDiscoveryTimeout() | dev | qt/qtconnectivity | Status: MERGED | +2 | 0 |