【CTS_All version】android.bluetooth.cts.BluetoothLeScanTest#testBasicBleScan fail

[DESCRIPTION]

android.bluetooth.cts.BluetoothLeScanTest

-- testBasicBleScan

--testBatchScan

-- testOpportunisticScan

-- testScanFilter

一、Fail信息如下:

fail junit.framework.AssertionFailedError: Scan results shouldn't be empty at junit.framework.Assert.fail(Assert.java:50)

二、Fail信息如下:
fail junit.framework.AssertionFailedError: Scan results shouldn't be empty at junit.framework.Assert.fail(Assert.java:50)
[SOLUTION]

首先,请确保合入patch:ALPS03646285 以及google patch:https://android-review.googlesource.com/c/platform/packages/apps/Bluetooth/+/410502

其次,此项测试至少要在测试机周围放置3个BLE设备(分别安装TxEddystone-UID-release-1.0.0.apk),而且对performance有很高的要求,不是扫出来BLE设备就行,查看源码需要在5s内扫出来才行;

如果贵司是用手环或者手表充当BLE设备,有可能发射功率太低导致难以被搜索到;

官方的user manual如下:

http://source.android.com/compatibility/cts/setup.html

Bluetooth LE beacons

If the DUT supports the Bluetooth LE feature, then at least three Bluetooth LE beacons should be placed within five meters of the DUT for Bluetooth LE scan testing. Those beacons can be any kind, do not need to be configured or emit anything specific, and can include iBeacon, Eddystone, or even devices simulating BLE beacons.

此外,测试BLE功能一定需要打开location开关。

关于BLE功能需要打开location的说明请参考:android development官网。http://developer.android.com/intl/zh-tw/reference/android/bluetooth/le/BluetoothLeScanner.html

若满足以上条件后仍然fail,请submit eservice给我司分析。

作者: RESSRC

个人资源站

发表评论

邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据