簡體   English   中英

BLE android重新連接未發生

[英]BLE android reconnection is not happening

在這里,我有一些關於BLE android的問題,在這里,我正在編寫一些案例:

案例1: 案例成功1 :啟用BLE gatt服務器時。 我的手機正在掃描設備,找到設備,連接到該設備,與該設備配對並成功接收到通知。

案例2: 案例成功2 :我斷開了gatt服務器的連接,收到了與gatt服務器斷開的回調。 電話再次尋找該設備找到了gatt服務器並收到通知。

情況3: 情況失敗 :第二次第二次與gatt服務器斷開連接時,設備再次尋找gatt服務器。 當我插入GATT服務器時,它僅卡在連接上。 並且不會收到通知。

我不明白為什么它在第三次嘗試時都沒有收到通知。 以下是一些日志:


I/BluetoothLeService(  856): Connected to GATT server.
D/BluetoothGatt(  856): discoverServices() - device: F8:DA:DD:68:3E:79
D/BtGatt.GattService(  677): discoverServices() - address=F8:DA:DD:68:3E:79, connId=5
D/BtGatt.btif(  677): btif_gattc_search_service
I/BluetoothLeService(  856): Attempting to start service discovery:true
D/BtGatt.btif(  677): btgattc_handle_event: Event 1006
D/BtGatt.btif(  677): btif_gattc_upstreams_evt: Event 7
D/BtGatt.GattService(  677): onSearchResult() - address=F8:DA:DD:68:3E:79, uuid=00001800-0000-1000-8000-00805f9b34fb
D/BluetoothGatt(  856): onGetService() - Device=F8:DA:DD:68:3E:79 UUID=00001800-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_upstreams_evt: Event 7
D/BtGatt.GattService(  677): onSearchResult() - address=F8:DA:DD:68:3E:79, uuid=00001801-0000-1000-8000-00805f9b34fb
D/BluetoothGatt(  856): onGetService() - Device=F8:DA:DD:68:3E:79 UUID=00001801-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_upstreams_evt: Event 7
D/BtGatt.GattService(  677): onSearchResult() - address=F8:DA:DD:68:3E:79, uuid=0000180a-0000-1000-8000-00805f9b34fb
D/BluetoothGatt(  856): onGetService() - Device=F8:DA:DD:68:3E:79 UUID=0000180a-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_upstreams_evt: Event 7
D/BtGatt.GattService(  677): onSearchResult() - address=F8:DA:DD:68:3E:79, uuid=0000180f-0000-1000-8000-00805f9b34fb
D/BluetoothGatt(  856): onGetService() - Device=F8:DA:DD:68:3E:79 UUID=0000180f-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_upstreams_evt: Event 7
D/BtGatt.GattService(  677): onSearchResult() - address=F8:DA:DD:68:3E:79, uuid=00001812-0000-1000-8000-00805f9b34fb
D/BluetoothGatt(  856): onGetService() - Device=F8:DA:DD:68:3E:79 UUID=00001812-0000-1000-8000-00805f9b34fb
I/Choreographer(  856): Skipped 308 frames!  The application may be doing too much work on its main thread.
D/BtGatt.btif(  677): btif_gattc_upstreams_evt: Event 6
D/BtGatt.GattService(  677): onSearchCompleted() - connId=5, status=0
D/BtGatt.btif(  677): btif_gattc_get_characteristic
D/BtGatt.btif(  677): btgattc_handle_event: Event 1007
D/BtGatt.GattService(  677): onGetCharacteristic() - address=F8:DA:DD:68:3E:79, status=0, charUuid=00002a00-0000-1000-8000-00805f9b34fb, prop=10
D/BluetoothGatt(  856): onGetCharacteristic() - Device=F8:DA:DD:68:3E:79 UUID=00002a00-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_characteristic
D/BtGatt.btif(  677): btgattc_handle_event: Event 1008
D/BtGatt.GattService(  677): onGetCharacteristic() - address=F8:DA:DD:68:3E:79, status=0, charUuid=00002a01-0000-1000-8000-00805f9b34fb, prop=2
D/BluetoothGatt(  856): onGetCharacteristic() - Device=F8:DA:DD:68:3E:79 UUID=00002a01-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_characteristic
D/BtGatt.btif(  677): btgattc_handle_event: Event 1008
D/BtGatt.GattService(  677): onGetCharacteristic() - address=F8:DA:DD:68:3E:79, status=0, charUuid=00002a04-0000-1000-8000-00805f9b34fb, prop=2
D/BluetoothGatt(  856): onGetCharacteristic() - Device=F8:DA:DD:68:3E:79 UUID=00002a04-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_characteristic
D/BtGatt.btif(  677): btgattc_handle_event: Event 1008
D/BtGatt.GattService(  677): onGetCharacteristic() - address=F8:DA:DD:68:3E:79, status=133, charUuid=00002a04-0000-1000-8000-00805f9b34fb, prop=2
D/BtGatt.btif(  677): btif_gattc_get_included_service
D/BtGatt.btif(  677): btgattc_handle_event: Event 1011
D/BtGatt.GattService(  677): onGetIncludedService() - address=F8:DA:DD:68:3E:79, status=133, uuid=00001800-0000-1000-8000-00805f9b34fb, inclUuid=00002a04-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_characteristic
D/BtGatt.btif(  677): btgattc_handle_event: Event 1007
D/BtGatt.GattService(  677): onGetCharacteristic() - address=F8:DA:DD:68:3E:79, status=133, charUuid=00002a04-0000-1000-8000-00805f9b34fb, prop=2
D/BtGatt.btif(  677): btif_gattc_get_included_service
D/BtGatt.btif(  677): btgattc_handle_event: Event 1011
D/BtGatt.GattService(  677): onGetIncludedService() - address=F8:DA:DD:68:3E:79, status=133, uuid=00001801-0000-1000-8000-00805f9b34fb, inclUuid=00002a04-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_characteristic
D/BtGatt.btif(  677): btgattc_handle_event: Event 1007
D/BtGatt.GattService(  677): onGetCharacteristic() - address=F8:DA:DD:68:3E:79, status=0, charUuid=00002a29-0000-1000-8000-00805f9b34fb, prop=2
D/BluetoothGatt(  856): onGetCharacteristic() - Device=F8:DA:DD:68:3E:79 UUID=00002a29-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_characteristic
D/BtGatt.btif(  677): btgattc_handle_event: Event 1008
D/BtGatt.GattService(  677): onGetCharacteristic() - address=F8:DA:DD:68:3E:79, status=0, charUuid=00002a50-0000-1000-8000-00805f9b34fb, prop=2
D/BluetoothGatt(  856): onGetCharacteristic() - Device=F8:DA:DD:68:3E:79 UUID=00002a50-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_characteristic
D/BtGatt.btif(  677): btgattc_handle_event: Event 1008
D/BtGatt.GattService(  677): onGetCharacteristic() - address=F8:DA:DD:68:3E:79, status=133, charUuid=00002a50-0000-1000-8000-00805f9b34fb, prop=2
D/BtGatt.btif(  677): btif_gattc_get_included_service
D/BtGatt.btif(  677): btgattc_handle_event: Event 1011
D/BtGatt.GattService(  677): onGetIncludedService() - address=F8:DA:DD:68:3E:79, status=133, uuid=0000180a-0000-1000-8000-00805f9b34fb, inclUuid=00002a50-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_characteristic
D/BtGatt.btif(  677): btgattc_handle_event: Event 1007
D/BtGatt.GattService(  677): onGetCharacteristic() - address=F8:DA:DD:68:3E:79, status=0, charUuid=00002a19-0000-1000-8000-00805f9b34fb, prop=18
D/BluetoothGatt(  856): onGetCharacteristic() - Device=F8:DA:DD:68:3E:79 UUID=00002a19-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_characteristic
D/BtGatt.btif(  677): btgattc_handle_event: Event 1008
D/BtGatt.GattService(  677): onGetCharacteristic() - address=F8:DA:DD:68:3E:79, status=133, charUuid=00002a19-0000-1000-8000-00805f9b34fb, prop=18
D/BtGatt.btif(  677): btif_gattc_get_included_service
D/BtGatt.btif(  677): btgattc_handle_event: Event 1011
D/BtGatt.GattService(  677): onGetIncludedService() - address=F8:DA:DD:68:3E:79, status=133, uuid=0000180f-0000-1000-8000-00805f9b34fb, inclUuid=00002902-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_characteristic
D/BtGatt.btif(  677): btgattc_handle_event: Event 1007
D/BtGatt.GattService(  677): onGetCharacteristic() - address=F8:DA:DD:68:3E:79, status=0, charUuid=00002a4d-0000-1000-8000-00805f9b34fb, prop=26
D/BluetoothGatt(  856): onGetCharacteristic() - Device=F8:DA:DD:68:3E:79 UUID=00002a4d-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_characteristic
D/BtGatt.btif(  677): btgattc_handle_event: Event 1008
D/BtGatt.GattService(  677): onGetCharacteristic() - address=F8:DA:DD:68:3E:79, status=0, charUuid=00002a4b-0000-1000-8000-00805f9b34fb, prop=2
D/BluetoothGatt(  856): onGetCharacteristic() - Device=F8:DA:DD:68:3E:79 UUID=00002a4b-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_characteristic
D/BtGatt.btif(  677): btgattc_handle_event: Event 1008
D/BtGatt.GattService(  677): onGetCharacteristic() - address=F8:DA:DD:68:3E:79, status=0, charUuid=00002a4a-0000-1000-8000-00805f9b34fb, prop=2
D/BluetoothGatt(  856): onGetCharacteristic() - Device=F8:DA:DD:68:3E:79 UUID=00002a4a-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_characteristic
D/BtGatt.btif(  677): btgattc_handle_event: Event 1008
D/BtGatt.GattService(  677): onGetCharacteristic() - address=F8:DA:DD:68:3E:79, status=0, charUuid=00002a4c-0000-1000-8000-00805f9b34fb, prop=4
D/BluetoothGatt(  856): onGetCharacteristic() - Device=F8:DA:DD:68:3E:79 UUID=00002a4c-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_characteristic
D/BtGatt.btif(  677): btgattc_handle_event: Event 1008
D/dalvikvm(  677): GC_FOR_ALLOC freed 509K, 18% free 2889K/3492K, paused 27ms, total 29ms
D/BtGatt.GattService(  677): onGetCharacteristic() - address=F8:DA:DD:68:3E:79, status=133, charUuid=00002a4c-0000-1000-8000-00805f9b34fb, prop=4
D/BtGatt.btif(  677): btif_gattc_get_included_service
D/BtGatt.btif(  677): btgattc_handle_event: Event 1011
D/BtGatt.GattService(  677): onGetIncludedService() - address=F8:DA:DD:68:3E:79, status=133, uuid=00001812-0000-1000-8000-00805f9b34fb, inclUuid=00002a4c-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_descriptor
D/BtGatt.btif(  677): btgattc_handle_event: Event 1009
D/BtGatt.GattService(  677): onGetDescriptor() - address=F8:DA:DD:68:3E:79, status=133, descUuid=00002a4c-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_descriptor
D/BtGatt.btif(  677): btgattc_handle_event: Event 1009
D/BtGatt.GattService(  677): onGetDescriptor() - address=F8:DA:DD:68:3E:79, status=133, descUuid=00002a4c-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_descriptor
D/BtGatt.btif(  677): btgattc_handle_event: Event 1009
D/BtGatt.GattService(  677): onGetDescriptor() - address=F8:DA:DD:68:3E:79, status=133, descUuid=00002a4c-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_descriptor
D/BtGatt.btif(  677): btgattc_handle_event: Event 1009
D/BtGatt.GattService(  677): onGetDescriptor() - address=F8:DA:DD:68:3E:79, status=133, descUuid=00002a4c-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_descriptor
D/BtGatt.btif(  677): btgattc_handle_event: Event 1009
D/BtGatt.GattService(  677): onGetDescriptor() - address=F8:DA:DD:68:3E:79, status=133, descUuid=00002a4c-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_descriptor
D/BtGatt.btif(  677): btgattc_handle_event: Event 1009
D/BtGatt.GattService(  677): onGetDescriptor() - address=F8:DA:DD:68:3E:79, status=0, descUuid=00002902-0000-1000-8000-00805f9b34fb
D/BluetoothGatt(  856): onGetDescriptor() - Device=F8:DA:DD:68:3E:79 UUID=00002902-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_descriptor
D/BtGatt.btif(  677): btgattc_handle_event: Event 1010
D/BtGatt.GattService(  677): onGetDescriptor() - address=F8:DA:DD:68:3E:79, status=133, descUuid=00002902-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_descriptor
D/BtGatt.btif(  677): btgattc_handle_event: Event 1009
D/BtGatt.GattService(  677): onGetDescriptor() - address=F8:DA:DD:68:3E:79, status=0, descUuid=00002902-0000-1000-8000-00805f9b34fb
D/BluetoothGatt(  856): onGetDescriptor() - Device=F8:DA:DD:68:3E:79 UUID=00002902-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_descriptor
D/BtGatt.btif(  677): btgattc_handle_event: Event 1010
D/BtGatt.GattService(  677): onGetDescriptor() - address=F8:DA:DD:68:3E:79, status=0, descUuid=00002908-0000-1000-8000-00805f9b34fb
D/BluetoothGatt(  856): onGetDescriptor() - Device=F8:DA:DD:68:3E:79 UUID=00002908-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_descriptor
D/BtGatt.btif(  677): btgattc_handle_event: Event 1010
D/BtGatt.GattService(  677): onGetDescriptor() - address=F8:DA:DD:68:3E:79, status=133, descUuid=00002908-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_descriptor
D/BtGatt.btif(  677): btgattc_handle_event: Event 1009
D/BtGatt.GattService(  677): onGetDescriptor() - address=F8:DA:DD:68:3E:79, status=133, descUuid=00002908-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_descriptor
D/BtGatt.btif(  677): btgattc_handle_event: Event 1009
D/BtGatt.GattService(  677): onGetDescriptor() - address=F8:DA:DD:68:3E:79, status=133, descUuid=00002908-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btif_gattc_get_descriptor
D/BtGatt.btif(  677): btgattc_handle_event: Event 1009
D/BtGatt.GattService(  677): onGetDescriptor() - address=F8:DA:DD:68:3E:79, status=133, descUuid=00002908-0000-1000-8000-00805f9b34fb
D/BluetoothGatt(  856): onSearchComplete() = Device=F8:DA:DD:68:3E:79 Status=0
D/BluetoothLeService(  856): onServicesDiscovered Called
I/bt-hci  (  677): BLE HCI(id=62) event = 0x04)
D/BtGatt.GattService(  677): registerForNotification() - address=F8:DA:DD:68:3E:79 enable: false
D/BtGatt.btif(  677): btif_gattc_dereg_for_notification
D/BtGatt.btif(  677): btgattc_handle_event: Event 1019
E/bt-btif (  677): registration not found
D/BluetoothGatt(  856): writeDescriptor() - uuid: 00002902-0000-1000-8000-00805f9b34fb
D/BluetoothGatt(  856): setCharacteristicNotification() - uuid: 00002a4d-0000-1000-8000-00805f9b34fb enable: false
D/BtGatt.GattService(  677): onRegisterForNotifications() - address=null, status=133, registered=0, charUuid=00002a4d-0000-1000-8000-00805f9b34fb
D/BtGatt.GattService(  677): writeDescriptor() - address=F8:DA:DD:68:3E:79
D/BtGatt.btif(  677): btif_gattc_write_char_descr
D/BtGatt.btif(  677): btgattc_handle_event: Event 1016
I/        (  677): vendor op - 7
D/BluetoothLeService(  856): setCharacteristicNotification status = true
D/BluetoothGatt(  856): readCharacteristic() - uuid: 00002a4d-0000-1000-8000-00805f9b34fb
D/BtGatt.GattService(  677): readCharacteristic() - address=F8:DA:DD:68:3E:79
D/BtGatt.btif(  677): btif_gattc_read_char
D/BtGatt.btif(  677): btgattc_handle_event: Event 1013
E/bt-btif (  677): already has a pending command!!
D/BluetoothGatt(  856): setCharacteristicNotification() - uuid: 00002a4d-0000-1000-8000-00805f9b34fb enable: true
D/BtGatt.GattService(  677): registerForNotification() - address=F8:DA:DD:68:3E:79 enable: true
D/BtGatt.btif(  677): btif_gattc_reg_for_notification
D/BtGatt.btif(  677): btgattc_handle_event: Event 1018
D/BluetoothGatt(  856): writeDescriptor() - uuid: 00002902-0000-1000-8000-00805f9b34fb
D/BtGatt.GattService(  677): onRegisterForNotifications() - address=null, status=0, registered=1, charUuid=00002a4d-0000-1000-8000-00805f9b34fb
D/BtGatt.GattService(  677): writeDescriptor() - address=F8:DA:DD:68:3E:79
D/BtGatt.btif(  677): btif_gattc_write_char_descr
D/BtGatt.btif(  677): btgattc_handle_event: Event 1016
D/BluetoothLeService(  856): setCharacteristicNotification status = true
E/bt-btif (  677): already has a pending command!!
D/BluetoothGatt(  856): setCharacteristicNotification() - uuid: 00002a4d-0000-1000-8000-00805f9b34fb enable: false
D/BtGatt.GattService(  677): registerForNotification() - address=F8:DA:DD:68:3E:79 enable: false
D/BtGatt.btif(  677): btif_gattc_dereg_for_notification
D/BtGatt.btif(  677): btgattc_handle_event: Event 1019
D/BtGatt.GattService(  677): onRegisterForNotifications() - address=null, status=0, registered=0, charUuid=00002a4d-0000-1000-8000-00805f9b34fb
D/BluetoothGatt(  856): writeDescriptor() - uuid: 00002902-0000-1000-8000-00805f9b34fb
D/BtGatt.GattService(  677): writeDescriptor() - address=F8:DA:DD:68:3E:79
D/BtGatt.btif(  677): btif_gattc_write_char_descr
D/BtGatt.btif(  677): btgattc_handle_event: Event 1016
E/bt-btif (  677): already has a pending command!!
D/BluetoothLeService(  856): setCharacteristicNotification status = true
D/BluetoothGatt(  856): readCharacteristic() - uuid: 00002a4d-0000-1000-8000-00805f9b34fb
D/BtGatt.GattService(  677): readCharacteristic() - address=F8:DA:DD:68:3E:79
D/BtGatt.btif(  677): btif_gattc_read_char
D/BtGatt.btif(  677): btgattc_handle_event: Event 1013
E/bt-btif (  677): already has a pending command!!
D/BluetoothGatt(  856): setCharacteristicNotification() - uuid: 00002a4d-0000-1000-8000-00805f9b34fb enable: true
D/BtGatt.GattService(  677): registerForNotification() - address=F8:DA:DD:68:3E:79 enable: true
D/BtGatt.btif(  677): btif_gattc_reg_for_notification
D/BtGatt.btif(  677): btgattc_handle_event: Event 1018
D/BtGatt.GattService(  677): onRegisterForNotifications() - address=null, status=0, registered=1, charUuid=00002a4d-0000-1000-8000-00805f9b34fb
D/BluetoothGatt(  856): writeDescriptor() - uuid: 00002902-0000-1000-8000-00805f9b34fb
D/BtGatt.GattService(  677): writeDescriptor() - address=F8:DA:DD:68:3E:79
D/BtGatt.btif(  677): btif_gattc_write_char_descr
D/BtGatt.btif(  677): btgattc_handle_event: Event 1016
E/bt-btif (  677): already has a pending command!!
D/BluetoothLeService(  856): setCharacteristicNotification status = true
D/BluetoothGatt(  856): setCharacteristicNotification() - uuid: 00002a4d-0000-1000-8000-00805f9b34fb enable: false
D/BtGatt.GattService(  677): registerForNotification() - address=F8:DA:DD:68:3E:79 enable: false
D/BtGatt.btif(  677): btif_gattc_dereg_for_notification
D/BluetoothGatt(  856): writeDescriptor() - uuid: 00002902-0000-1000-8000-00805f9b34fb
D/BtGatt.btif(  677): btgattc_handle_event: Event 1019
D/BtGatt.GattService(  677): onRegisterForNotifications() - address=null, status=0, registered=0, charUuid=00002a4d-0000-1000-8000-00805f9b34fb
D/BtGatt.GattService(  677): writeDescriptor() - address=F8:DA:DD:68:3E:79
D/BtGatt.btif(  677): btif_gattc_write_char_descr
D/BtGatt.btif(  677): btgattc_handle_event: Event 1016
D/BluetoothLeService(  856): setCharacteristicNotification status = true
D/BluetoothGatt(  856): readCharacteristic() - uuid: 00002a4d-0000-1000-8000-00805f9b34fb
E/bt-btif (  677): already has a pending command!!
D/BtGatt.GattService(  677): readCharacteristic() - address=F8:DA:DD:68:3E:79
D/BtGatt.btif(  677): btif_gattc_read_char
D/BluetoothGatt(  856): setCharacteristicNotification() - uuid: 00002a4d-0000-1000-8000-00805f9b34fb enable: true
D/BtGatt.btif(  677): btgattc_handle_event: Event 1013
E/bt-btif (  677): already has a pending command!!
D/BtGatt.GattService(  677): registerForNotification() - address=F8:DA:DD:68:3E:79 enable: true
D/BtGatt.btif(  677): btif_gattc_reg_for_notification
D/BtGatt.btif(  677): btgattc_handle_event: Event 1018
D/BtGatt.GattService(  677): onRegisterForNotifications() - address=null, status=0, registered=1, charUuid=00002a4d-0000-1000-8000-00805f9b34fb
D/BluetoothGatt(  856): writeDescriptor() - uuid: 00002902-0000-1000-8000-00805f9b34fb
D/BtGatt.GattService(  677): writeDescriptor() - address=F8:DA:DD:68:3E:79
D/BtGatt.btif(  677): btif_gattc_write_char_descr
D/BtGatt.btif(  677): btgattc_handle_event: Event 1016
E/bt-btif (  677): already has a pending command!!
D/BluetoothLeService(  856): setCharacteristicNotification status = true
D/BluetoothGatt(  856): readCharacteristic() - uuid: 00002a4d-0000-1000-8000-00805f9b34fb
D/BtGatt.GattService(  677): readCharacteristic() - address=F8:DA:DD:68:3E:79
D/BtGatt.btif(  677): btif_gattc_read_char
D/BtGatt.btif(  677): btgattc_handle_event: Event 1013
E/bt-btif (  677): already has a pending command!!
D/BluetoothGatt(  856): setCharacteristicNotification() - uuid: 00002a4d-0000-1000-8000-00805f9b34fb enable: true
D/BtGatt.GattService(  677): registerForNotification() - address=F8:DA:DD:68:3E:79 enable: true
D/BtGatt.btif(  677): btif_gattc_reg_for_notification
D/BtGatt.btif(  677): btgattc_handle_event: Event 1018
W/bt-btif (  677): notification already registered
D/BtGatt.GattService(  677): onRegisterForNotifications() - address=null, status=0, registered=1, charUuid=00002a4d-0000-1000-8000-00805f9b34fb
D/BluetoothGatt(  856): writeDescriptor() - uuid: 00002902-0000-1000-8000-00805f9b34fb
D/BtGatt.GattService(  677): writeDescriptor() - address=F8:DA:DD:68:3E:79
D/BtGatt.btif(  677): btif_gattc_write_char_descr
D/BtGatt.btif(  677): btgattc_handle_event: Event 1016
E/bt-btif (  677): already has a pending command!!
D/BluetoothLeService(  856): setCharacteristicNotification status = true
D/BluetoothGatt(  856): readCharacteristic() - uuid: 00002a4d-0000-1000-8000-00805f9b34fb
D/BtGatt.GattService(  677): readCharacteristic() - address=F8:DA:DD:68:3E:79
D/BtGatt.btif(  677): btif_gattc_read_char
D/BtGatt.btif(  677): btgattc_handle_event: Event 1013
E/bt-btif (  677): already has a pending command!!
D/BluetoothGatt(  856): setCharacteristicNotification() - uuid: 00002a4d-0000-1000-8000-00805f9b34fb enable: true
D/BtGatt.GattService(  677): registerForNotification() - address=F8:DA:DD:68:3E:79 enable: true
D/BtGatt.btif(  677): btif_gattc_reg_for_notification
D/BtGatt.btif(  677): btgattc_handle_event: Event 1018
W/bt-btif (  677): notification already registered
D/BtGatt.GattService(  677): onRegisterForNotifications() - address=null, status=0, registered=1, charUuid=00002a4d-0000-1000-8000-00805f9b34fb
D/BluetoothGatt(  856): writeDescriptor() - uuid: 00002902-0000-1000-8000-00805f9b34fb
D/BtGatt.GattService(  677): writeDescriptor() - address=F8:DA:DD:68:3E:79
D/BtGatt.btif(  677): btif_gattc_write_char_descr
D/BtGatt.btif(  677): btgattc_handle_event: Event 1016
E/bt-btif (  677): already has a pending command!!
D/BluetoothLeService(  856): setCharacteristicNotification status = true
D/BtGatt.btif(  677): btif_gattc_upstreams_evt: Event 9
D/BtGatt.GattService(  677): onWriteDescriptor() - address=F8:DA:DD:68:3E:79, status=5
D/BluetoothGatt(  856): onDescriptorWrite() - Device=F8:DA:DD:68:3E:79 UUID=00002a4d-0000-1000-8000-00805f9b34fb
D/BtGatt.GattService(  677): writeDescriptor() - address=F8:DA:DD:68:3E:79
D/BtGatt.btif(  677): btif_gattc_write_char_descr
D/BtGatt.btif(  677): btgattc_handle_event: Event 1016
W/bt-smp  (  677): io_cap = 4
W/bt-smp  (  677): new io_cap = 4 p_cb->loc_enc_size = 16
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
W/bt-smp  (  677): local rand(LSB ~ MSB) = f0 42 e5 ec 53 f4 47 1b 6e ad f0 a2 46 28 41 a8 
W/bt-smp  (  677): P1(LSB ~ MSB) = 00 01 01 04 00 05 10 07 07 02 03 00 01 10 06 03 
W/bt-smp  (  677): P1' = r XOR p1(LSB ~ MSB) = f0 43 e4 e8 53 f1 57 1c 69 af f3 a2 47 38 47 ab 
W/bt-smp  (  677): Key(LSB ~ MSB) = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
W/bt-smp  (  677): Plain text(LSB ~ MSB) = f0 43 e4 e8 53 f1 57 1c 69 af f3 a2 47 38 47 ab 
W/bt-smp  (  677): Encrypted text(LSB ~ MSB) = f9 6b 49 34 f1 72 b1 a3 0b 06 47 b7 2d d0 42 b6 
W/bt-smp  (  677): C1(LSB ~ MSB) = f9 6b 49 34 f1 72 b1 a3 0b 06 47 b7 2d d0 42 b6 
W/bt-smp  (  677): p2(LSB ~ MSB) = 79 3e 68 dd da f8 78 e8 9b 20 dd 84 00 00 00 00 
W/bt-smp  (  677): p2' = C1 xor p2(LSB ~ MSB) = 80 55 21 e9 2b 8a c9 4b 90 26 9a 33 2d d0 42 b6 
W/bt-smp  (  677): Key(LSB ~ MSB) = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
W/bt-smp  (  677): Plain text(LSB ~ MSB) = 80 55 21 e9 2b 8a c9 4b 90 26 9a 33 2d d0 42 b6 
W/bt-smp  (  677): Encrypted text(LSB ~ MSB) = c1 34 35 1d d3 04 8a 74 9b 88 7a d1 8e 1d 90 00 
W/bt-smp  (  677): Confirm(LSB ~ MSB) = c1 34 35 1d d3 04 8a 74 9b 88 7a d1 8e 1d 90 00 
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
W/bt-smp  (  677): peer rand(LSB ~ MSB) = 10 4c 63 b3 32 80 c2 63 29 76 41 2c 8e af 0b bf 
W/bt-smp  (  677): P1(LSB ~ MSB) = 00 01 01 04 00 05 10 07 07 02 03 00 01 10 06 03 
W/bt-smp  (  677): P1' = r XOR p1(LSB ~ MSB) = 10 4d 62 b7 32 85 d2 64 2e 74 42 2c 8f bf 0d bc 
W/bt-smp  (  677): Key(LSB ~ MSB) = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
W/bt-smp  (  677): Plain text(LSB ~ MSB) = 10 4d 62 b7 32 85 d2 64 2e 74 42 2c 8f bf 0d bc 
W/bt-smp  (  677): Encrypted text(LSB ~ MSB) = 3b 8b 29 cc 32 ba d5 ab 79 7a 5a 3f a4 4f 67 12 
W/bt-smp  (  677): C1(LSB ~ MSB) = 3b 8b 29 cc 32 ba d5 ab 79 7a 5a 3f a4 4f 67 12 
W/bt-smp  (  677): p2(LSB ~ MSB) = 79 3e 68 dd da f8 78 e8 9b 20 dd 84 00 00 00 00 
W/bt-smp  (  677): p2' = C1 xor p2(LSB ~ MSB) = 42 b5 41 11 e8 42 ad 43 e2 5a 87 bb a4 4f 67 12 
W/bt-smp  (  677): Key(LSB ~ MSB) = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
W/bt-smp  (  677): Plain text(LSB ~ MSB) = 42 b5 41 11 e8 42 ad 43 e2 5a 87 bb a4 4f 67 12 
W/bt-smp  (  677): Encrypted text(LSB ~ MSB) = 0c 00 9c 19 ac 5e c3 c8 af 8b e2 b6 7a f8 3c 19 
W/bt-smp  (  677): Compare(LSB ~ MSB) = 0c 00 9c 19 ac 5e c3 c8 af 8b e2 b6 7a f8 3c 19 
W/bt-smp  (  677): Key(LSB ~ MSB) = 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
W/bt-smp  (  677): Plain text(LSB ~ MSB) = f0 42 e5 ec 53 f4 47 1b 10 4c 63 b3 32 80 c2 63 
W/bt-smp  (  677): Encrypted text(LSB ~ MSB) = bf 05 1c bb f7 99 5a c4 c0 be 2f 4f 95 d1 3c 41 
E/bt-smp  (  677): STK Generated
I/        (  677): vendor op - 7
I/BluetoothBondStateMachine(  677): bondStateChangeCallback: Status: 0 Address: F8:DA:DD:68:3E:79 newState: 1
I/BluetoothBondStateMachine(  677): Bond State Change Intent:F8:DA:DD:68:3E:79 OldState: 10 NewState: 11
I/BluetoothBondStateMachine(  677): Entering PendingCommandState State
D/BluetoothAdapterService(1108578176)(  677): Get Bonded Devices being called
W/bt-smp  (  677): smp_send_id_info
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
W/bt-smp  (  677): Key(LSB ~ MSB) = d8 78 f5 05 0e 0c fa 4b 55 d8 4b 68 05 74 60 7c 
W/bt-smp  (  677): Plain text(LSB ~ MSB) = 19 40 01 00 00 00 00 00 00 00 00 00 00 00 00 00 
W/bt-smp  (  677): Encrypted text(LSB ~ MSB) = e6 8f bf 15 3e 90 0f 39 2d d1 84 64 ed e3 0e 9f 
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/BluetoothBondStateMachine(  677): bondStateChangeCallback: Status: 0 Address: F8:DA:DD:68:3E:79 newState: 2
D/BluetoothAdapterProperties(  677): Adding bonded device:F8:DA:DD:68:3E:79
D/BtGatt.btif(  677): btif_gattc_upstreams_evt: Event 9
D/BtGatt.GattService(  677): onWriteDescriptor() - address=F8:DA:DD:68:3E:79, status=137
I/BluetoothBondStateMachine(  677): Bond State Change Intent:F8:DA:DD:68:3E:79 OldState: 11 NewState: 12
D/BluetoothGatt(  856): onDescriptorWrite() - Device=F8:DA:DD:68:3E:79 UUID=00000000-0000-0000-0000-000000000000
D/BluetoothAdapterService(1108578176)(  677): Get Bonded Devices being called
D/BluetoothAdapterProperties(  677): getBondedDevices: length=1
W/BackupManagerService(  451): dataChanged but no participant pkg='com.android.providers.settings' uid=1002
W/BackupManagerService(  451): dataChanged but no participant pkg='com.android.providers.settings' uid=1002
I/        (  677): vendor op - 7
I/BluetoothBondStateMachine(  677): StableState(): Entering Off State
W/BackupManagerService(  451): dataChanged but no participant pkg='com.android.providers.settings' uid=1002
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
I/        (  677): vendor op - 7
E/bt-btif (  677): No More Service found
E/bt-btif (  677): bta_dm_gatt_disc_result serivce_id len=2 
E/bt-btif (  677): bta_dm_gatt_disc_result serivce_id len=2 
E/bt-btif (  677): bta_dm_gatt_disc_result serivce_id len=2 
E/bt-btif (  677): bta_dm_gatt_disc_result serivce_id len=2 
E/bt-btif (  677): bta_dm_gatt_disc_result serivce_id len=2 
E/bt-btif (  677):  uuid:00001812-0000-1000-8000-00805f9b34fb
D/BluetoothMap(  638): getConnectedDevices()
D/BluetoothMap(  638): getConnectionState(F8:DA:DD:68:3E:79)
D/MapProfile(  638): getConnectionStatus: status is: 0

我已通過以下方式解決了該問題:

后來我發現讀取特征的身份驗證未正確完成,這就是在某些情況下身份驗證失敗的原因。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM