当前位置: 移动技术网 > IT编程>移动开发>Android > CtsVerifier-Bluetooth-LE-SEcure-ClientServer-Test测试pass但是无法选择PassButton

CtsVerifier-Bluetooth-LE-SEcure-ClientServer-Test测试pass但是无法选择PassButton

2020年05月03日  | 移动技术网IT编程  | 我要评论

由爱可奈番号,怀孕33周,取英文名字网站

【问题描述】

ctsverifier-bluetooth-le-secure-clientserver-test测试pass但是无法选择pass-button
工具版本:9.0-r11
其他信息:
上个版本正常,verifier版本相同
分析过程中结合代码咨询测试,印证只有client无法选中,server正常

【问题结论】

蓝牙驱动修改引入,已定位回退,需要bsp进一步修改

verifier的该项测试流程:
client测试pass后做出先关闭madapter.disable()后打开madapter.enable()的动作,
经梳理蓝牙框流程发现,蓝牙关闭后再次打开超时失败,由此导致verifier的该项测试activity无法收到广播将按钮设置为可选enable

authblog:秋城

【分析详细】

bluetooth-le-secure-clientserver-test

流程概述
1.启动blesecureclientstartactivity
该测试页面只是一个activity-ui。主要的方法实现和流程动作都在父类activity中,重点关注父类。
2.调用父类bleclienttestbaseactivity的oncreate()完成:
页面显示
设置底部pass-fail-button按键的监听
设置pass-button为disable不可选
初始化页面的测试项listview
回到子类继续oncreate():
显示info提示信息的dialog
启动bleclientservice准备测试

3.调用父类bleclienttestbaseactivity的onresume():
注册测试服务bleclientservice的广播监听broadcastreceiver mbroadcast

4.开始测试
这个测试是俩设备server-client配对测试,自动触发,细节略,和server端之间的蓝牙通信有关
listview每一条测试结束都会有广播发出,接收广播后将mpassed做或运算,如果一切顺利mpassed的运算结果是pass_flag_all
这代表测试项全部通过

private static final int pass_flag_all = 0x3ffff;

然后client端将蓝牙关闭madapter.disable()再打开madapter.enable(),打开成功情况下activity才会将pass-button设置为可选择
由于驱动代码出问题,遂enable()失败,无法设置按钮可选

测试代码
1.测试activity,提供ui无业务代码
cts/apps/ctsverifier/src/com/android/cts/verifier/bluetooth/blesecureclientstartactivity.java
2.上面(1)的父类,测试结果处理
cts/apps/ctsverifier/src/com/android/cts/verifier/bluetooth/bleclienttestbaseactivity.java
3.测试service,真正的测试项执行
cts/apps/ctsverifier/src/com/android/cts/verifier/bluetooth/bleclientservice.java

关键日志

测试all-pass

04-21 16:52:05.901 d/bluetoothgatt( 6338): onclientconnectionstate() - status=0 clientif=6 device=7b:d0:42:ac:47:b6
04-21 16:52:05.901 d/bleclientservice( 6338): onconnectionstatechange: status= 0, newstate= 0
04-21 16:52:05.901 d/bluetoothgatt( 6338): close()
04-21 16:52:05.901 d/bluetoothgatt( 6338): unregisterapp() - mclientif=6
04-21 16:52:05.915 d/bleclienttestbase( 6338): processing com.android.cts.verifier.bluetooth.ble_bluetooth_disconnected
04-21 16:52:05.921 d/bleclienttestbase( 6338): passed flags has changed from 0x0003fdff to 0x0003ffff. delta=0x00000200
04-21 16:52:05.921 d/bleclienttestbase( 6338): all tests passed.

蓝牙正常关闭

04-21 16:52:06.927 d/bluetoothmanagerservice( 3297): disable(): mbluetooth = android.bluetooth.ibluetooth$stub$proxy@3e1ba1b mbinding = false
04-21 16:52:06.927 d/bluetoothmanagerservice( 3297): persisting bluetooth setting: 0
04-21 16:52:06.928 d/bluetoothmanagerservice( 3297): message_disable: mbluetooth = android.bluetooth.ibluetooth$stub$proxy@3e1ba1b
04-21 16:52:06.929 v/settingsprovider( 3297): notifying for 0: content://settings/global/bluetooth_on
04-21 16:52:06.930 d/bluetoothmanagerservice( 3297): sending off request.
04-21 16:52:06.931 d/bluetoothadapterservice( 3406): disable() called with mrunningprofiles.size() = 7
04-21 16:52:06.931 i/adapterstate( 3406): turning_off : entered 
04-21 16:52:06.931 d/adapterproperties( 3406): setting state to turning_off
04-21 16:52:06.932 d/bluetoothadapterservice( 3406): updateadapterstate() - broadcasting state turning_off to 1 receivers.
04-21 16:52:06.936 d/bluetoothmanagerservice( 3297): message_bluetooth_state_change: on > turning_off
04-21 16:52:06.936 d/bluetoothmanagerservice( 3297): sending ble state change: on > turning_off
04-21 16:52:06.939 d/bluetoothmapservice( 3406): onreceive
04-21 16:52:06.939 d/bluetoothactivedevicemanager( 3406): handlemessage(message_adapter_action_state_changed): newstate=13
04-21 16:52:06.939 d/bluetoothmapservice( 3406): onreceive: android.bluetooth.adapter.action.state_changed
04-21 16:52:06.939 d/bluetoothmapservice( 3406): state_turning_off
......
04-21 16:52:07.038 i/adapterstate( 3406): ble_turning_off : entered 
04-21 16:52:07.039 d/bluetoothmanagerservice( 3297): message_bluetooth_state_change: ble_on > ble_turning_off
04-21 16:52:07.039 d/bluetoothmanagerservice( 3297): sending ble state change: ble_on > ble_turning_off
04-21 16:52:07.044 d/bluetoothactivedevicemanager( 3406): handlemessage(message_adapter_action_state_changed): newstate=10
04-21 16:52:07.054 i/bt_btif_core( 3406): btif_disable_bluetooth entered
04-21 16:52:07.054 i/adapterstate( 3406): off : entered 
04-21 16:52:07.054 d/adapterproperties( 3406): setting state to off
04-21 16:52:07.054 d/bluetoothadapterservice( 3406): updateadapterstate() - broadcasting state off to 1 receivers.
04-21 16:52:07.055 e/bt_stack( 3406): [error:bta_jv_act.cc(607)] bta_jv_disable
04-21 16:52:07.056 d/bluetoothmanagerservice( 3297): message_bluetooth_state_change: ble_turning_off > off
04-21 16:52:07.056 d/bluetoothmanagerservice( 3297): bluetooth is complete send service down
04-21 16:52:07.056 w/bt_osi_thread( 3406): run_thread: thread id 3907, thread name btif_sock exited
04-21 16:52:07.056 d/bluetoothmanagerservice( 3297): broadcasting onbluetoothservicedown() to 9 receivers.
04-21 16:52:07.057 w/bt_btif ( 3406): bta_dm_disable bta_disable_delay set to 200 ms
04-21 16:52:07.057 i/bt_btif_core( 3406): btif_disable_bluetooth finished

蓝牙开启超时

04-21 16:52:17.051 d/bluetoothmanagerservice( 3297): enable(com.android.cts.verifier):  mbluetooth =null mbinding = false mstate = off
04-21 16:52:17.052 d/bluetoothmanagerservice( 3297): message_enable(0): mbluetooth = null
04-21 16:52:17.057 d/bluetoothmanagerservice( 3297): enable returning
04-21 16:52:17.253 d/bluetoothadapterservice( 7058): oncreate()
04-21 16:52:17.287 i/adapterstate( 7058): ble_turning_on : entered 
04-21 16:52:17.287 d/adapterproperties( 7058): setting state to ble_turning_on
04-21 16:52:17.287 d/bluetoothadapterservice( 7058): updateadapterstate() - broadcasting state ble_turning_on to 1 receivers.
04-21 16:52:17.288 d/bluetoothadapterservice( 7058): bleonprocessstart()
04-21 16:52:17.290 d/bluetoothmanagerservice( 3297): message_bluetooth_state_change: off > ble_turning_on
04-21 16:52:17.290 d/bluetoothmanagerservice( 3297): sending ble state change: off > ble_turning_on
04-21 16:52:17.291 i/adapterproperties( 7058): init(), maxconnectedaudiodevices, default=5, propertyoverlayed=5, finalvalue=5
04-21 16:52:17.294 d/bluetoothadapterservice( 7058): bleonprocessstart() - make bond state machine
04-21 16:52:17.294 d/bluetoothbondstatemachine( 7058): make
04-21 16:52:17.300 i/bluetoothbondstatemachine( 7058): stablestate(): entering off state
04-21 16:52:17.301 i/btgatt.jni( 7058): classinitnative(l875): classinitnative: success!
04-21 16:52:17.303 d/btgatt.debugutils( 7058): handledebugaction() action=null
......
04-21 16:52:21.292 e/adapterstate( 7058): ble_turning_on : ble_start_timeout
04-21 16:52:21.293 i/adapterstate( 7058): ble_turning_off : entered 
04-21 16:52:24.712 e/bluetoothmanagerservice( 3297): message_timeout_bind

蓝牙crash信息

04-21 16:52:31.900 i/crash_dump32( 7118): performing dump of process 7058 (target tid = 7077)
04-21 16:52:31.922 f/debug   ( 7118): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-21 16:52:31.922 f/debug   ( 7118): build fingerprint: 'x:user/release-keys'
04-21 16:52:31.923 f/debug   ( 7118): revision: '0'
04-21 16:52:31.923 f/debug   ( 7118): abi: 'arm'
04-21 16:52:31.923 f/debug   ( 7118): pid: 7058, tid: 7077, name: alarm_default_c  >>> com.android.bluetooth <<<
04-21 16:52:31.923 f/debug   ( 7118): signal 6 (sigabrt), code -6 (si_tkill), fault addr --------
04-21 16:52:31.923 f/debug   ( 7118):     r0  00000000  r1  00001ba5  r2  00000006  r3  a65df918
04-21 16:52:31.923 f/debug   ( 7118):     r4  00001b92  r5  00001ba5  r6  8fd0621c  r7  0000010c
04-21 16:52:31.923 f/debug   ( 7118):     r8  9024b4fd  r9  00000000  r10 9c7f4838  r11 00000000
04-21 16:52:31.923 f/debug   ( 7118):     ip  00000041  sp  8fd06208  lr  a656e0e5  pc  a6565e72
04-21 16:52:31.973 f/debug   ( 7118): 
04-21 16:52:31.973 f/debug   ( 7118): backtrace:
04-21 16:52:31.973 f/debug   ( 7118):     #00 pc 0001ce72  /system/lib/libc.so (abort+62)
04-21 16:52:31.973 f/debug   ( 7118):     #01 pc 0010e549  /system/lib/libbluetooth.so (hci_timeout_abort(void*)+76)
04-21 16:52:31.973 f/debug   ( 7118):     #02 pc 001abe0d  /system/lib/libbluetooth.so (alarm_ready_generic(alarm_t*, std::__1::unique_lock<std::__1::mutex>&)+164)
04-21 16:52:31.973 f/debug   ( 7118):     #03 pc 001abd2b  /system/lib/libbluetooth.so (alarm_queue_ready(fixed_queue_t*, void*)+66)
04-21 16:52:31.973 f/debug   ( 7118):     #04 pc 001ae881  /system/lib/libbluetooth.so (internal_dequeue_ready(void*)+48)
04-21 16:52:31.973 f/debug   ( 7118):     #05 pc 001b09bf  /system/lib/libbluetooth.so (run_reactor(reactor_t*, int)+218)
04-21 16:52:31.973 f/debug   ( 7118):     #06 pc 001b08b9  /system/lib/libbluetooth.so (reactor_start(reactor_t*)+44)
04-21 16:52:31.973 f/debug   ( 7118):     #07 pc 001b1a53  /system/lib/libbluetooth.so (run_thread(void*)+142)
04-21 16:52:31.973 f/debug   ( 7118):     #08 pc 00063c15  /system/lib/libc.so (__pthread_start(void*)+22)
04-21 16:52:31.973 f/debug   ( 7118):     #09 pc 0001e065  /system/lib/libc.so (__start_thread+22)
04-21 16:52:32.702 e//system/bin/tombstoned( 3160): tombstone written to: /data/tombstones/tombstone_07

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网