这里我有一些BLE android的问题,这里我写一些案例:
案例 1:案例成功 1:当我启用 BLE gatt 服务器时。我的手机正在扫描设备,它找到了设备,连接到它与设备配对并成功收到通知。
Case 2 : Case Success 2 : 我断开了gatt服务器,我收到了回调Disconnected from gatt server。手机再次寻找找到 gatt 服务器的设备并收到通知。
Case 3 : Case Failure : 第二次断开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
最佳答案
我已经通过以下方式解决了这个问题:
后来发现是读特性鉴权没做好,所以有的时候会失败。
关于android - BLE android 重新连接没有发生,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28232739/
我好像记得Lua有类似Ruby的method_missing的东西。还是我记错了? 最佳答案 表的metatable的__index和__newindex可以用于与Ruby的method_missing相同的效果。 关于ruby-难道Lua没有和Ruby的method_missing相媲美的东西吗?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/7732154/
我有一个奇怪的问题:我在rvm上安装了rubyonrails。一切正常,我可以创建项目。但是在我输入“railsnew”时重新启动后,我有“程序'rails'当前未安装。”。SystemUbuntu12.04ruby-v"1.9.3p194"gemlistactionmailer(3.2.5)actionpack(3.2.5)activemodel(3.2.5)activerecord(3.2.5)activeresource(3.2.5)activesupport(3.2.5)arel(3.0.2)builder(3.0.0)bundler(1.1.4)coffee-rails(
鉴于我有以下迁移:Sequel.migrationdoupdoalter_table:usersdoadd_column:is_admin,:default=>falseend#SequelrunsaDESCRIBEtablestatement,whenthemodelisloaded.#Atthispoint,itdoesnotknowthatusershaveais_adminflag.#Soitfails.@user=User.find(:email=>"admin@fancy-startup.example")@user.is_admin=true@user.save!ende
我正在使用Sequel构建一个愿望list系统。我有一个wishlists和itemstable和一个items_wishlists连接表(该名称是续集选择的名称)。items_wishlists表还有一个用于facebookid的额外列(因此我可以存储opengraph操作),这是一个NOTNULL列。我还有Wishlist和Item具有续集many_to_many关联的模型已建立。Wishlist类也有:selectmany_to_many关联的选项设置为select:[:items.*,:items_wishlists__facebook_action_id].有没有一种方法可以
我正在使用active_admin,我在Rails3应用程序的应用程序中有一个目录管理,其中包含模型和页面的声明。时不时地我也有一个类,当那个类有一个常量时,就像这样:classFooBAR="bar"end然后,我在每个必须在我的Rails应用程序中重新加载一些代码的请求中收到此警告:/Users/pupeno/helloworld/app/admin/billing.rb:12:warning:alreadyinitializedconstantBAR知道发生了什么以及如何避免这些警告吗? 最佳答案 在纯Ruby中:classA
我想在一个没有Sass引擎的类中使用Sass颜色函数。我已经在项目中使用了sassgem,所以我认为搭载会像以下一样简单:classRectangleincludeSass::Script::FunctionsdefcolorSass::Script::Color.new([0x82,0x39,0x06])enddefrender#hamlengineexecutedwithcontextofself#sothatwithintemlateicouldcall#%stop{offset:'0%',stop:{color:lighten(color)}}endend更新:参见上面的#re
我使用的是Firefox版本36.0.1和Selenium-Webdrivergem版本2.45.0。我能够创建Firefox实例,但无法使用脚本继续进行进一步的操作无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055)错误。有人能帮帮我吗? 最佳答案 我遇到了同样的问题。降级到firefoxv33后一切正常。您可以找到旧版本here 关于ruby-无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055),我们在StackOverflow上找到一个类
我早就知道Ruby中的“常量”(即大写的变量名)不是真正常量。与其他编程语言一样,对对象的引用是唯一存储在变量/常量中的东西。(侧边栏:Ruby确实具有“卡住”引用对象不被修改的功能,据我所知,许多其他语言都没有提供这种功能。)所以这是我的问题:当您将一个值重新分配给常量时,您会收到如下警告:>>FOO='bar'=>"bar">>FOO='baz'(irb):2:warning:alreadyinitializedconstantFOO=>"baz"有没有办法强制Ruby抛出异常而不是打印警告?很难弄清楚为什么有时会发生重新分配。 最佳答案
大家好!我想知道Ruby中未使用语法ClassName.method_name调用的方法是如何工作的。我头脑中的一些是puts、print、gets、chomp。可以在不使用点运算符的情况下调用这些方法。为什么是这样?他们来自哪里?我怎样才能看到这些方法的完整列表? 最佳答案 Kernel中的所有方法都可用于Object类的所有对象或从Object派生的任何类。您可以使用Kernel.instance_methods列出它们。 关于没有类的Ruby方法?,我们在StackOverflow
我真的为这个而疯狂。我一直在搜索答案并尝试我找到的所有内容,包括相关问题和stackoverflow上的答案,但仍然无法正常工作。我正在使用嵌套资源,但无法使表单正常工作。我总是遇到错误,例如没有路线匹配[PUT]"/galleries/1/photos"表格在这里:/galleries/1/photos/1/edit路线.rbresources:galleriesdoresources:photosendresources:galleriesresources:photos照片Controller.rbdefnew@gallery=Gallery.find(params[:galle