diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-08-11 15:42:03 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@digia.com> | 2014-08-13 13:47:53 +0200 |
commit | d5422ad7c9806e6a105ae9918fae650e38aad601 (patch) | |
tree | 4c4a4ea77846a33e312a0369416febc785ee27bf /tests | |
parent | 02a9784b2b502ade67710632c2872bda097770e3 (diff) |
Improve consistency of device discovery.
Device discovery of BTLE devices fails once the second device discovery
is performed in the current process. The first discovery always succeeds.
BTLE devices are advertised right after the start of the device discovery
session. However the discovery session never seems to stop once it is
done for the first time. This can be seen by the fact that the
Discovering property of the adapter constantly toggles between true
and false. As a consequence the second device discovery won't find
a BTLE device in 99% of all cases. The odds that the API user initiates
the second discovery right between two continues adapter searches
is rather slim.
The fix is to extend the device discovery process beyond
a toggle of a single device discovery cycle. We ignore the
end signal of the first cycle and continue to the end of the second
cycle. At the same time we rely on the perceived bug which restarts
the second cycle automatically. Just for the case that the second cycle
doesn't start automatically we utilize a timer to manually force
an end of the device discovery.
The problem is likely to be a bug in Bluez4. A negative side effect
of this workaround is a longer device discovery process.
Change-Id: I986c8d6498b2cc9ed51f4457267c53813132cf8e
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions