Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
设备断开连接后接收到已连接的android.bluetooth.device.action.ACL__Android_Bluetooth_Bluetooth Lowenergy_Android Bluetooth_Bluetooth Lowenergy 4.2 - Fatal编程技术网

设备断开连接后接收到已连接的android.bluetooth.device.action.ACL_

设备断开连接后接收到已连接的android.bluetooth.device.action.ACL_,android,bluetooth,bluetooth-lowenergy,android-bluetooth,bluetooth-lowenergy-4.2,Android,Bluetooth,Bluetooth Lowenergy,Android Bluetooth,Bluetooth Lowenergy 4.2,我正在研究蓝牙低能量设备(体重秤) 我观察到的事情很少。当我尝试断开与BLE设备的连接时,它会断开连接。我还通过调用下面的行来删除绑定 method = mBluetoothGatt.getDevice().getClass().getMethod("removeBond", (Class[]) null); method.invoke(mBluetoothGatt.getDevice(), (Object[]) null); 但几秒钟后,当它与我的移动设备连接时,它突然显示出来。当我关闭移动

我正在研究蓝牙低能量设备(体重秤)

我观察到的事情很少。当我尝试断开与BLE设备的连接时,它会断开连接。我还通过调用下面的行来删除绑定

method = mBluetoothGatt.getDevice().getClass().getMethod("removeBond", (Class[]) null);
method.invoke(mBluetoothGatt.getDevice(), (Object[]) null);
但几秒钟后,当它与我的移动设备连接时,它突然显示出来。当我关闭移动设备的蓝牙时,它(刻度)仍然显示已连接的符号。只有当我将移动设备更改为飞行模式时,它才会断开连接

我在Android监视器中看到了以下日志

11-14 10:55:23.438 15152-15207/? W/bt_btif: bta_dm_bl_change_cback : reason=0
11-14 10:55:23.438 15152-15207/? W/bt_btm: btm_acl_update_busy_level :: evt.busy_level_flags : 0x0
11-14 10:55:23.438 15152-15207/? W/bt_btif: bta_dm_bl_change_cback : reason=0
11-14 10:55:23.439 15152-15207/? W/bt_smp: smp_br_connect_callback is called on unexpected transport 2
11-14 10:55:23.439 15152-15207/? W/bt_btif: bta_dm_acl_change info: 0x0
11-14 10:55:23.439 15152-15178/? W/bt_btif: btif_dm_upstreams_cback  ev: BTA_DM_LINK_UP_EVT
11-14 10:55:23.439 15152-15178/? W/bt_btif: BTA_DM_LINK_UP_EVT. Sending BT_ACL_STATE_CONNECTED
11-14 10:55:23.443 18042-18042/com.beurer.connect.healthmanager 11-14 10:55:23.449 15152-15178/? D/BluetoothUtils: getBtEnabledContainers(): btContainers = []
11-14 10:55:23.472 15152-15178/? E/BluetoothRemoteDevices: aclStateChangeCallback: State:Connected to Device:18:7A:93:4C:69:XX, linktype is 2
11-14 10:55:23.479 15152-15178/? D/BluetoothUtils: getBtEnabledContainers(): btContainers = []
11-14 10:55:23.481 15152-15178/? W/bt_btif: btif_dm_upstreams_cback  ev: BTA_DM_BUSY_LEVEL_EVT
11-14 10:55:23.482 15152-15178/? W/bt_btif: BTA_DM_BUSY_LEVEL_EVT :: p_data->busy_level.level_flags : 0x0
11-14 10:55:23.484 18107-18107/? D/oneconnect[1.6.05-45_2]: BluetoothHelper.mBtStateReceiver -  [action]android.bluetooth.device.action.ACL_CONNECTED [connState]0[address] - ($)
11-14 10:55:23.488 3763-3848/? D/CompatibilityInfo: mCompatibilityFlags - 0
11-14 10:55:23.488 3763-3848/? D/CompatibilityInfo: applicationDensity - 480
11-14 10:55:23.488 3763-3848/? D/CompatibilityInfo: applicationScale - 1.0
11-14 10:55:23.493 18107-18133/? D/BluetoothA2dp: getState(18:7A:93:4C:69:XX)
11-14 10:55:23.493 3763-3763/? D/KnoxKeyguardUpdateMonitor: BroadcastReceiver onReceive
11-14 10:55:23.493 3763-3763/? D/KnoxKeyguardUpdateMonitor: BroadcastReceiver onReceive action: android.bluetooth.device.action.ACL_CONNECTED
11-14 10:55:23.493 3763-3763/? D/KnoxKeyguardUpdateMonitor: BroadcastReceiver ACTION_ACL_CONNECTED
11-14 10:55:23.503 3763-4488/? D/CompatibilityInfo: mCompatibilityFlags - 0
11-14 10:55:23.503 3763-4488/? D/CompatibilityInfo: applicationDensity - 480
11-14 10:55:23.503 3763-4488/? D/CompatibilityInfo: applicationScale - 1.0
11-14 10:55:23.513 15152-15342/? D/A2dpStateMachine: getConnectionState: 0
11-14 10:55:23.514 3763-4436/? D/CompatibilityInfo: mCompatibilityFlags - 0
11-14 10:55:23.514 3763-4436/? D/CompatibilityInfo: applicationDensity - 480
11-14 10:55:23.515 3763-4436/? D/CompatibilityInfo: applicationScale - 1.0
11-14 10:55:23.519 18107-18133/? D/BluetoothHeadset: getConnectionState() in if statement
11-14 10:55:23.519 15152-15956/? W/HeadsetService: getConnectionState
11-14 10:55:23.523 15152-15956/? W/HeadsetService: get Service
11-14 10:55:23.523 15152-15956/? W/HeadsetService: service is not null
11-14 10:55:23.524 4983-4983/? W/SearchService: Abort, client detached.
11-14 10:55:23.524 15152-15956/? D/HeadsetService: enter getConnectionState
11-14 10:55:23.525 15152-15956/? D/HeadsetService: getConnectionState is 0
11-14 10:55:23.525 15152-15956/? W/HeadsetService: ret = 0
11-14 10:55:23.527 4983-4983/? I/BistoWorker: handleCommonBroadcastIntent: android.bluetooth.device.action.ACL_CONNECTED
11-14 10:55:23.532 15152-15354/? E/BluetoothRemoteDevices: getGearIsConnected false
11-14 10:55:23.532 18107-18133/? D/oneconnect[1.6.05-45_2]: BluetoothActionHelper.isConnected - ($)69:D4 NO profile connected
11-14 10:55:23.533 18107-18133/? D/oneconnect[1.6.05-45_2]: BluetoothActionHelper.isA2dpSinkConnected - ($)69:D4 mA2dpSlink not connected
11-14 10:55:23.542 4983-4983/? I/BistoWorker: Not a bisto device: 18:7A:93:4C:69:D4
理想情况下,当我请求连接时,它应该与设备连接。我不知道为什么android bluetooth在不请求连接的情况下与设备连接

有人知道这件事吗

==========更新==========

我发现的另一件事是,当我尝试连接设备(秤)时,它会给我

11-15 14:46:38.473 3770-3770/? D/KnoxKeyguardUpdateMonitor: BroadcastReceiver onReceive action: android.bluetooth.device.action.ACL_CONNECTED
但在我的服务中,它返回了以下值

11-15 14:46:38.493 23031-23101/? D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=8 device=18:7A:93:4B:E1:XX

在133关贸总协定失败的情况下,我通过尝试4次重新连接来处理它。但它仍然给出了133个错误。

可能您在连接请求中已将“自动连接”设置为true。请注意
mbluetothgatt=device.connectGatt(this,false,mGattCallback)作为第二个参数,即
自动连接
标志


请检查[connectGatt](,布尔值,android.bluetooth.BluetoothGattCallback))。

可能您在连接请求中已将自动连接设置为true。请注意
mbluetothgatt=device.connectGatt(this,false,mGattCallback)作为第二个参数,即
自动连接
标志


请检查[connectGatt](,布尔值,android.bluetooth.BluetoothGattCallback))。

我已设置为false。mBluetoothGatt=device.connectGatt(getApplicationContext(),false,mBluetoothGattCallback);我设错了。mBluetoothGatt=device.connectGatt(getApplicationContext(),false,mBluetoothGattCallback);