Ctsverifier Bluetooth Le secure clientserver test test pass but PassButton cannot be selected

[problem description]

Ctsverifier Bluetooth Le secure clientserver test test pass but pass button cannot be selected
Tool version: 9.0-r11
Other information:
The previous version is normal, and the verifier version is the same
During the analysis, the code consultation and test prove that only the Client cannot be selected and the Server is normal

[Conclusion]

Bluetooth driver modification has been introduced, and it has been positioned for fallback. It needs to be further modified by bsp

This test process of verifier:
After testing pass, the Client makes the action of first closing mAdapter.disable() and then opening mAdapter.enable(),
After combing the Bluetooth box process, it is found that the timeout of opening Bluetooth again after Bluetooth is closed fails, which results in that the test Activity of verifier cannot receive the broadcast and sets the button as optional enable

AuthBlog: Autumn City https://www.cnblogs.com/houser0323

[analysis details]

Bluetooth-LE-SEcure-ClientServer-Test

Process Overview
1. Start BleSecureClientStartActivity
The test page is just an Activity UI. The main method implementation and process actions are in the parent class Activity, focusing on the parent class.
2. Call onCreate() of parent class BleClientTestBaseActivity to complete:
Page display
Set the monitoring of the bottom pass fail button key
Setting pass button to disable is not optional
Initialize the test item ListView of the page
Go back to subclass and continue onCreate():
dialog displaying info prompt information
Start BleClientService to prepare for testing

3. Call onResume() of parent class BleClientTestBaseActivity:
Register broadcast listener of test service BleClientService broadcastreceiver mbrroadcast

4. Start the test
This test is the Server client pairing test of the two devices. It is triggered automatically and abridged. It is related to the Bluetooth communication between the Server end
At the end of every test of listview, a broadcast will be sent out. After receiving the broadcast, mPassed will be done or calculated. If all goes well, mPassed's operation result is pass ﹐ flag ﹐ all
This means that all test items have passed

private static final int PASS_FLAG_ALL = 0x3FFFF;

Then the Client side will turn off the Bluetooth, and then turn on the mdadapter. Disable(), and then turn on the mdadapter. Enable(), and then the Activity will set the pass button to be optional only when it is turned on successfully
Because of a problem with the driver code, enable() failed, unable to set the button optional

Test code
1. Test Activity and provide ui without business code
cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/BleSecureClientStartActivity.java
2. Parent class of (1) above, test result processing
cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/BleClientTestBaseActivity.java
3. Test Service, real test item execution
cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/BleClientService.java

Key log

Test 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.

Bluetooth off normally

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

Bluetooth on timeout

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

Bluetooth Crash information

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

Keywords: Android Java

Added by dumbass on Mon, 04 May 2020 12:02:09 +0300