[Fire Original Android Development] black.kahder:
Yesterday I had two experiences where bluetooth crashed while using a keyboard. Today I reproduced the problem and captured some logcat info.

The keyboard is a Motorola that was sold for the Xoom tablet, so it's old but has been reliable for me. The tablet is a brand new austin/Gen7.

On another attempt today I was able to use my keyboard for about two hours without any problem. The issue may be intermittent or random. I also tested a headset and listened to some music for about an hour and it was fine.

05-13 05:30:23.508 E/bt-hci ( 1617): Ctlr H/w error event - code:0x23
05-13 05:30:23.512 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.512 W/bt-btif ( 1617): Received H/W Error.
05-13 05:30:23.512 E/bt-btif ( 1617): Received H/W Error.
05-13 05:30:23.512 W/bt-btif ( 1617): bta_hh_co_close: Found an existing device with the same handle dev_status = 0, dev_handle =0
05-13 05:30:23.524 W/bt-l2cap( 1617): L2CA_SetDesireRole() new:x0, disallow_switch:0
05-13 05:30:23.524 W/bt-l2cap( 1617): L2CA_SetDesireRole() new:x0, disallow_switch:0
05-13 05:30:23.524 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.526 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.527 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.528 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.529 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.530 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.531 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.532 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.534 W/bt-btm ( 1617): btm_read_local_ext_features_complete status = 0x30
05-13 05:30:23.534 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.535 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.536 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.537 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.539 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.540 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.541 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.542 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.543 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.543 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.544 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.545 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.546 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.547 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.548 D/AMZ-[BT]( 1617): mtk_bt_op: BT_VND_OP_LPM_WAKE_SET_STATE
05-13 05:30:23.671 W/BluetoothManagerService( 526): Profile service for profile: ComponentInfo{com.android.bluetooth/com.android.bluetooth.hfp.HeadsetService} died.
05-13 05:30:23.671 D/AMZ-hwcomposer( 166): [DPY] UEventThread::threadLoop recv remove@/devices/virtual/misc/uhid/input5/mouse1
05-13 05:30:23.671 I/EventHub( 526): Removing device '/dev/input/mouse1' due to inotify event
05-13 05:30:23.673 D/BluetoothInputDevice( 644): Proxy object disconnected
05-13 05:30:23.673 D/BluetoothPan( 644): BluetoothPAN Proxy object disconnected
05-13 05:30:23.673 D/BluetoothA2dp( 644): Proxy object disconnected
05-13 05:30:23.673 D/BluetoothMap( 644): Proxy object disconnected
05-13 05:30:23.673 D/BluetoothHeadset( 644): Proxy object disconnected
05-13 05:30:23.674 W/BluetoothHeadset( 644): Proxy not attached to service
05-13 05:30:23.674 D/BluetoothInputDevice( 4882): Proxy object disconnected
05-13 05:30:23.674 D/HidProfile( 4882): Bluetooth service disconnected
05-13 05:30:23.674 W/BluetoothA2dp( 644): Proxy not attached to service
05-13 05:30:23.674 W/BluetoothPan( 644): Proxy not attached to service
05-13 05:30:23.674 D/BluetoothPan( 4882): BluetoothPAN Proxy object disconnected
05-13 05:30:23.674 D/BluetoothMap( 644): getConnectionState(00:18:6B:28:A7:3A)
05-13 05:30:23.674 D/BluetoothPan( 4882): BluetoothPAN Proxy object disconnected
05-13 05:30:23.674 W/BluetoothMap( 644): Proxy not attached to service
05-13 05:30:23.674 D/PanProfile( 4882): Bluetooth service disconnected
05-13 05:30:23.674 W/BluetoothHeadset( 644): Proxy not attached to service
05-13 05:30:23.674 D/BluetoothA2dp( 4882): Proxy object disconnected
05-13 05:30:23.674 W/BluetoothA2dp( 644): Proxy not attached to service
05-13 05:30:23.674 D/A2dpProfile( 4882): Bluetooth service disconnected
05-13 05:30:23.674 W/BluetoothPan( 644): Proxy not attached to service
05-13 05:30:23.674 D/BluetoothMap( 644): getConnectionState(00:0F:F6:1B:94:A8)
05-13 05:30:23.674 D/BluetoothMap( 4882): Proxy object disconnected
05-13 05:30:23.674 W/BluetoothMap( 644): Proxy not attached to service
05-13 05:30:23.674 D/MapProfile( 4882): Bluetooth service disconnected
05-13 05:30:23.674 W/BluetoothHeadset( 644): Proxy not attached to service
05-13 05:30:23.674 D/BluetoothPbap( 4882): Proxy object disconnected
05-13 05:30:23.674 W/BluetoothA2dp( 644): Proxy not attached to service
05-13 05:30:23.674 D/PbapServerProfile( 4882): Bluetooth service disconnected
05-13 05:30:23.674 D/BluetoothMap( 644): getConnectionState(00:18:6B:28:A7:3A)
05-13 05:30:23.675 W/BluetoothMap( 644): Proxy not attached to service
05-13 05:30:23.675 W/BluetoothHeadset( 644): Proxy not attached to service
05-13 05:30:23.675 W/BluetoothA2dp( 644): Proxy not attached to service
05-13 05:30:23.675 D/BluetoothMap( 644): getConnectionState(00:0F:F6:1B:94:A8)
05-13 05:30:23.675 W/BluetoothMap( 644): Proxy not attached to service
05-13 05:30:23.675 W/BluetoothHeadset( 644): Proxy not attached to service
05-13 05:30:23.675 D/BluetoothMap( 644): getConnectionState(00:18:6B:28:A7:3A)
05-13 05:30:23.675 W/BluetoothMap( 644): Proxy not attached to service
05-13 05:30:23.675 W/BluetoothHeadset( 644): Proxy not attached to service
05-13 05:30:23.675 D/BluetoothMap( 644): getConnectionState(00:0F:F6:1B:94:A8)
05-13 05:30:23.675 W/BluetoothMap( 644): Proxy not attached to service
05-13 05:30:23.675 W/BluetoothHeadset( 644): Proxy not attached to service
05-13 05:30:23.675 W/BluetoothHeadset( 644): Proxy not attached to service
05-13 05:30:23.675 D/BluetoothManagerService( 526): BluetoothServiceConnection, disconnected: com.android.bluetooth.btservice.AdapterService
05-13 05:30:23.675 E/BluetoothManagerService( 526): onServiceDisconnected: service is already NULL
05-13 05:30:23.675 D/BluetoothA2dp( 526): Proxy object disconnected
05-13 05:30:23.675 D/AudioService( 526): onServiceDisconnected: Bluetooth profile: 2
05-13 05:30:23.675 D/BluetoothManagerService( 526): BluetoothServiceConnection, disconnected: com.android.bluetooth.gatt.GattService
05-13 05:30:23.675 D/BluetoothManagerService( 526): BluetoothServiceConnection, disconnected: com.android.bluetooth.btservice.QAdapterService
05-13 05:30:23.675 D/BluetoothManagerService( 526): Message: 41
05-13 05:30:23.675 E/BluetoothManagerService( 526): MESSAGE_BLUETOOTH_SERVICE_DISCONNECTED: 1
05-13 05:30:23.677 D/BluetoothHeadset( 1027): Proxy object disconnected
05-13 05:30:23.677 D/BluetoothHeadset( 4882): Proxy object disconnected
05-13 05:30:23.678 D/BluetoothHeadset( 526): Proxy object disconnected
05-13 05:30:23.678 D/BluetoothHeadset( 526): Proxy object disconnected
05-13 05:30:23.678 D/AudioService( 526): onServiceDisconnected: Bluetooth profile: 1
05-13 05:30:23.679 D/BluetoothHeadset( 526): Proxy object disconnected
05-13 05:30:23.679 D/HeadsetProfile( 4882): Bluetooth service disconnected
05-13 05:30:23.680 D/BluetoothManagerService( 526): Calling onBluetoothServiceDown callbacks
05-13 05:30:23.680 D/BluetoothManagerService( 526): Broadcasting onBluetoothServiceDown() to 7 receivers.
05-13 05:30:23.682 D/BluetoothManagerService( 526): Calling onQBluetoothServiceDown callbacks
05-13 05:30:23.682 D/BluetoothManagerService( 526): Broadcasting onQBluetoothServiceDown() to 0 receivers.
05-13 05:30:23.682 D/BluetoothManagerService( 526): Bluetooth State Change Intent: 12 -> 13
05-13 05:30:23.708 I/EventHub( 526): Removing device Motorola Bluetooth Wireless Keyboard due to epoll hang-up event.
05-13 05:30:23.708 I/EventHub( 526): Removed device: path=/dev/input/event4 name=Motorola Bluetooth Wireless Keyboard id=6 fd=210 classes=0x8000000b
05-13 05:30:23.708 D/AMZ-hwcomposer( 166): [DPY] UEventThread::threadLoop recv remove@/devices/virtual/misc/uhid/input5/event4
05-13 05:30:23.738 I/InputReader( 526): Device removed: id=6, name='Motorola Bluetooth Wireless Keyboard', sources=0x00002103
05-13 05:30:23.739 I/EventHub( 526): Removing device '/dev/input/event4' due to inotify event
05-13 05:30:23.779 D/AMZ-hwcomposer( 166): [DPY] UEventThread::threadLoop recv remove@/devices/virtual/misc/uhid/input5
05-13 05:30:23.779 D/AMZ-hwcomposer( 166): [DPY] UEventThread::threadLoop recv remove@/devices/virtual/misc/uhid/0005:22B8:093D.0001
05-13 05:30:23.880 I/ActivityManager( 526): Process com.android.bluetooth (pid 1617) has died
05-13 05:30:23.880 D/ActivityManager( 526): cleanUpApplicationRecord -- 1617
05-13 05:30:23.884 W/ActivityManager( 526): Scheduling restart of crashed service com.android.bluetooth/.pan.PanService in 1000ms
05-13 05:30:23.886 W/ActivityManager( 526): Scheduling restart of crashed service com.android.bluetooth/.a2dp.A2dpService in 1000ms
05-13 05:30:23.888 W/ActivityManager( 526): Scheduling restart of crashed service com.android.bluetooth/.hfp.HeadsetService in 1000ms
05-13 05:30:23.889 W/ActivityManager( 526): Scheduling restart of crashed service com.android.bluetooth/.pbap.BluetoothPbapService in 1000ms
05-13 05:30:23.889 W/ActivityManager( 526): Scheduling restart of crashed service com.android.bluetooth/.hid.HidService in 1000ms
05-13 05:30:23.891 W/ActivityManager( 526): Scheduling restart of crashed service com.android.bluetooth/.map.BluetoothMapService in 1000ms
05-13 05:30:23.892 W/ActivityManager( 526): Scheduling restart of crashed service com.android.bluetooth/.hdp.HealthService in 1000ms
05-13 05:30:23.893 W/ActivityManager( 526): Scheduling restart of crashed service com.android.bluetooth/.btservice.QAdapterService in 1000ms
05-13 05:30:23.893 W/ActivityManager( 526): Scheduling restart of crashed service com.android.bluetooth/.gatt.GattService in 11000ms
05-13 05:30:23.893 W/ActivityManager( 526): Scheduling restart of crashed service com.android.bluetooth/.opp.BluetoothOppService in 21000ms
05-13 05:30:23.893 W/ActivityManager( 526): Scheduling restart of crashed service com.android.bluetooth/.btservice.AdapterService in 21000ms
05-13 05:30:23.909 W/art ( 526): Long monitor contention event with owner method=void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied() from ActivityManagerService.java:1231 waiters=1 for 169ms
05-13 05:30:23.910 I/ActivityManager( 526): Config changes=30 {1.0 ?mcc?mnc en_US ?layoutDir sw600dp w600dp h951dp 160dpi lrg port finger -keyb/v/h -nav/h s.11 themeResource=null}
05-13 05:30:23.911 D/BluetoothManagerService( 526): Broadcasting onBluetoothStateChange(false) to 20 receivers.
05-13 05:30:23.912 D/BluetoothHeadset( 526): onBluetoothStateChange: up=false
05-13 05:30:23.917 D/BluetoothHeadset( 1027): onBluetoothStateChange: up=false
05-13 05:30:23.920 D/BluetoothPbap( 4882): onBluetoothStateChange: up=false
05-13 05:30:23.928 I/PCKeyboard( 962): onConfigurationChanged()
05-13 05:30:23.935 W/art ( 526): Long monitor contention event with owner method=void com.android.server.am.ActivityManagerService$AppDeathRecipient.binderDied() from ActivityManagerService.java:1231 waiters=2 for 194ms
05-13 05:30:23.947 I/Finsky ( 1492): [1] mnu.onTrimMemory(1): Memory trim requested to level 60
05-13 05:30:23.992 D/BluetoothInputDevice( 4882): onBluetoothStateChange: up=false
05-13 05:30:23.994 D/BluetoothPan( 644): onBluetoothStateChange on: false
05-13 05:30:24.000 D/BluetoothHeadset( 526): onBluetoothStateChange: up=false
05-13 05:30:24.000 D/BluetoothA2dp( 644): onBluetoothStateChange: up=false
05-13 05:30:24.001 D/BluetoothA2dp( 526): onBluetoothStateChange: up=false
05-13 05:30:24.001 D/BluetoothMap( 644): onBluetoothStateChange: up=false
05-13 05:30:24.003 D/BluetoothHeadset( 4882): onBluetoothStateChange: up=false
05-13 05:30:24.004 D/BluetoothPan( 4882): onBluetoothStateChange on: false
05-13 05:30:24.005 D/BluetoothA2dpSink( 644): onBluetoothStateChange: up=false
05-13 05:30:24.005 E/BluetoothA2dpSink( 644):
05-13 05:30:24.005 E/BluetoothA2dpSink( 644): java.lang.IllegalArgumentException: Service not registered: android.bluetooth.BluetoothA2dpSink$2@32d9a55a
05-13 05:30:24.005 E/BluetoothA2dpSink( 644): at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1030)
05-13 05:30:24.005 E/BluetoothA2dpSink( 644): at android.app.ContextImpl.unbindService(ContextImpl.java:1839)
05-13 05:30:24.005 E/BluetoothA2dpSink( 644): at android.content.ContextWrapper.unbindService(ContextWrapper.java:557)
05-13 05:30:24.005 E/BluetoothA2dpSink( 644): at android.bluetooth.BluetoothA2dpSink$1.onBluetoothStateChange(BluetoothA2dpSink.java:139)
05-13 05:30:24.005 E/BluetoothA2dpSink( 644): at android.bluetooth.IBluetoothStateChangeCallback$Stub.onTransact(IBluetoothStateChangeCallback.java:55)
05-13 05:30:24.005 E/BluetoothA2dpSink( 644): at android.os.Binder.execTransact(Binder.java:446)
05-13 05:30:24.007 E/BluetoothDevice( 4882): BT not enabled. Cannot get bond state
05-13 05:30:24.007 E/BluetoothDevice( 4882): BT not enabled. Cannot get bond state
05-13 05:30:24.007 E/BluetoothDevice( 4882): BT not enabled. Cannot get bond state
05-13 05:30:24.007 E/BluetoothDevice( 4882): BT not enabled. Cannot get bond state
05-13 05:30:24.015 W/ContextImpl( 4882): Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1723 android.content.ContextWrapper.startService:522 android.content.ContextWrapper.startService:522 com.android.settings.bluetooth.DockEventReceiver.beginStartingService:134 com.android.settings.bluetooth.DockEventReceiver.onReceive:115
05-13 05:30:24.031 E/BluetoothDevice( 4882): BT not enabled. Cannot get bond state
05-13 05:30:24.040 E/BluetoothDevice( 4882): BT not enabled. Cannot get bond state
05-13 05:30:24.055 D/BluetoothAvrcpController( 644): onBluetoothStateChange: up=false