Hi,
I have now got backports to run with bluez instead of bluedroid and the
btusb driver instead of rtk_btusb.
However the android bluetooth system does not want to run for me.
/proc/kmsg:
<6>[ 19.428823] Loading modules backported from Linux version
next-20140905-0-g92d88cb
<6>[ 19.437576] Backport generated by backports.git
backports-20140905-0-ged7bd06
<6>[ 19.813396] Bluetooth: Core ver 2.19
<6>[ 19.818542] NET: Registered protocol family 31
<6>[ 19.823621] Bluetooth: HCI device and connection manager initialized
<6>[ 19.831138] Bluetooth: HCI socket layer initialized
<6>[ 19.837130] Bluetooth: L2CAP socket layer initialized
<6>[ 19.842883] Bluetooth: SCO socket layer initialized
<6>[ 19.948096] usbcore: registered new interface driver btusb
<4>[ 19.955936] [rfkill]: rfkill set power 1
<4>[ 19.975853] [rtl8723au]: rtl8723au is powered down by bt
logcat:
D/BluetoothManagerService( 1613): Message: 201
D/BluetoothManagerService( 1613): MESSAGE_SAVE_NAME_AND_ADDRESS
D/BluetoothAdapterState( 2109): CURRENT_STATE=OFF, MESSAGE = USER_TURN_ON
D/BluetoothAdapterProperties( 2109): Setting state to 11
I/BluetoothAdapterState( 2109): Bluetooth adapter state changed: 10-> 11
D/BluetoothAdapterService( 2109): Broadcasting updateAdapterState() to 0
receivers.
D/BluetoothBondStateMachine( 2109): make
I/BluetoothAdapterState( 2109): Entering PendingCommandState State:
isTurningOn()=true, isTurningOff()=false
D/BluetoothAdapterState( 2109): CURRENT_STATE=PENDING, MESSAGE = STARTED,
isTurningOn=true, isTurningOff=false
E/BluetoothAdapterState( 2109): Error while turning Bluetooth On
D/BluetoothAdapterProperties( 2109): Setting state to 10
I/BluetoothAdapterState( 2109): Bluetooth adapter state changed: 11-> 10
D/BluetoothAdapterService( 2109): Broadcasting updateAdapterState() to 0
receivers.
I/BluetoothAdapterState( 2109): Entering OffState
I/BluetoothBondStateMachine( 2109): StableState(): Entering Off State
Start bluetooth with UI:
D/BluetoothManagerService( 1613): enable(): mBluetooth =null mBinding =
false
D/BluetoothManagerService( 1613): Message: 1
D/BluetoothManagerService( 1613): MESSAGE_ENABLE: mBluetooth = null
D/BluetoothAdapterService( 2109): REFCOUNT: CREATED. INSTANCE_COUNT2
D/BluetoothAdapterState( 2109): make
I/BluetoothAdapterState( 2109): Entering OffState
D/BluetoothManagerService( 1613): BluetoothServiceConnection:
com.android.bluetooth.btservice.AdapterService
D/BluetoothManagerService( 1613): Message: 40
D/BluetoothManagerService( 1613): MESSAGE_BLUETOOTH_SERVICE_CONNECTED: 1
E/BluetoothManagerService( 1613): IBluetooth.configHciSnoopLog return false
D/BluetoothManagerService( 1613): Calling onBluetoothServiceUp callbacks
D/BluetoothManagerService( 1613): Broadcasting onBluetoothServiceUp() to 4
receivers.
D/BluetoothAdapterState( 2109): CURRENT_STATE=OFF, MESSAGE = USER_TURN_ON
D/BluetoothAdapterProperties( 2109): Setting state to 11
I/BluetoothAdapterState( 2109): Bluetooth adapter state changed: 10-> 11
D/BluetoothAdapterService( 2109): Broadcasting updateAdapterState() to 1
receivers.
D/BluetoothManagerService( 1613): Message: 60
D/BluetoothManagerService( 1613): MESSAGE_BLUETOOTH_STATE_CHANGE:
prevState = 10, newState=11
D/BluetoothManagerService( 1613): Bluetooth State Change Intent: 10 -> 11
D/BluetoothBondStateMachine( 2109): make
D/BluetoothMapService( 2109): onReceive
D/HeadsetService( 2109): Received start request. Starting profile...
D/HeadsetStateMachine( 2109): make
I/BluetoothAdapterState( 2109): Entering PendingCommandState State:
isTurningOn()=true, isTurningOff()=false
I/BluetoothBondStateMachine( 2109): StableState(): Entering Off State
E/HeadsetStateMachine( 2109): Could not bind to Bluetooth Headset Phone
Service
E/BluetoothHeadsetServiceJni( 2109): Bluetooth module is not loaded
D/A2dpService( 2109): Received start request. Starting profile...
D/A2dpStateMachine( 2109): make
E/BluetoothA2dpServiceJni( 2109): Bluetooth module is not loaded
V/Avrcp ( 2109): make
E/BluetoothAvrcpServiceJni( 2109): Bluetooth module is not loaded
D/A2dpStateMachine( 2109): Enter Disconnected: -2
D/HidService( 2109): Received start request. Starting profile...
E/BluetoothHidServiceJni( 2109): Bluetooth module is not loaded
D/HealthService( 2109): Received start request. Starting profile...
E/BluetoothHealthServiceJni( 2109): Bluetooth module is not loaded
D/PanService( 2109): Received start request. Starting profile...
D/BluetoothPanServiceJni( 2109): initializeNative(L110): pan
E/BluetoothPanServiceJni( 2109): ## ERROR : initializeNative(L115):
Bluetooth module is not loaded##
D/BtGatt.DebugUtils( 2109): handleDebugAction() action=null
D/BtGatt.GattService( 2109): Received start request. Starting profile...
D/BtGatt.GattService( 2109): start()
E/BtGatt.JNI( 2109): ERROR: initializeNative(L695): Bluetooth module is
not loaded##
D/BluetoothMapService( 2109): Received start request. Starting profile...
D/BluetoothMapService( 2109): start()
D/BluetoothAdapterService( 2109): Profile still not
running:com.android.bluetooth.hdp.HealthService
D/HeadsetPhoneState( 2109): sendDeviceStateChanged. mService=0 mSignal=0
mRoam=0 mBatteryCharge=5
D/BluetoothAdapterService( 2109): Profile still not
running:com.android.bluetooth.hdp.HealthService
D/BluetoothAdapterService( 2109): Profile still not
running:com.android.bluetooth.hdp.HealthService
D/BluetoothAdapterService( 2109): Profile still not
running:com.android.bluetooth.map.BluetoothMapService
D/BluetoothAdapterService( 2109): Profile still not
running:com.android.bluetooth.map.BluetoothMapService
D/BluetoothAdapterService( 2109): Profile still not
running:com.android.bluetooth.map.BluetoothMapService
D/BluetoothAdapterState( 2109): CURRENT_STATE=PENDING, MESSAGE = STARTED,
isTurningOn=true, isTurningOff=false
E/BluetoothAdapterState( 2109): Error while turning Bluetooth On
D/BluetoothAdapterProperties( 2109): Setting state to 10
I/BluetoothAdapterState( 2109): Bluetooth adapter state changed: 11-> 10
D/BluetoothAdapterService( 2109): Broadcasting updateAdapterState() to 1
receivers.
D/BluetoothManagerService( 1613): Message: 60
D/BluetoothManagerService( 1613): MESSAGE_BLUETOOTH_STATE_CHANGE:
prevState = 11, newState=10
D/BluetoothManagerService( 1613): Broadcasting
onBluetoothStateChange(false) to 6 receivers.
I/BluetoothAdapterState( 2109): Entering OffState
D/BluetoothMap( 1837): onBluetoothStateChange: up=false
D/BluetoothInputDevice( 1837): onBluetoothStateChange: up=false
D/BluetoothHeadset( 1613): onBluetoothStateChange: up=false
D/BluetoothA2dp( 1613): onBluetoothStateChange: up=false
D/BluetoothPbap( 1837): onBluetoothStateChange: up=false
D/BluetoothManagerService( 1613): Bluetooth State Change Intent: 11 -> 10
D/BluetoothMapService( 2109): onReceive
E/BluetoothManagerService( 1613): recoverBluetoothServiceFromError
W/ContextImpl( 1837): Calling a method in the system process without a
qualified user: android.app.ContextImpl.startService:1479
android.content.ContextWrapper.startService:494
android.content.ContextWrapper.startService:494
com.android.settings.bluetooth.DockEventReceiver.beginStartingService:134
com.android.settings.bluetooth.DockEventReceiver.onReceive:115
D/DockEventReceiver( 1837): finishStartingService: stopping service
D/BluetoothManagerService( 1613): Sending off request.
D/BluetoothAdapterState( 2109): CURRENT_STATE=OFF, MESSAGE = USER_TURN_OFF
D/BluetoothManagerService( 1613): Calling onBluetoothServiceDown callbacks
D/BluetoothManagerService( 1613): Broadcasting onBluetoothServiceDown() to
4 receivers.
D/BluetoothAdapterService( 2109): Cleaning up adapter native....
D/BluetoothAdapterService( 2109): Done cleaning up adapter native....
D/BluetoothAdapterService(1102208296)( 2109): ****onDestroy()********
D/BluetoothManagerService( 1613): Message: 42
D/BluetoothManagerService( 1613): MESSAGE_RESTART_BLUETOOTH_SERVICE:
Restart IBluetooth service
D/BluetoothAdapterService( 2109): REFCOUNT: CREATED. INSTANCE_COUNT3
D/BluetoothAdapterState( 2109): make
D/BluetoothManagerService( 1613): BluetoothServiceConnection:
com.android.bluetooth.btservice.AdapterService
D/BluetoothManagerService( 1613): Message: 40
D/BluetoothManagerService( 1613): MESSAGE_BLUETOOTH_SERVICE_CONNECTED: 1
E/BluetoothManagerService( 1613): IBluetooth.configHciSnoopLog return false
D/BluetoothManagerService( 1613): Calling onBluetoothServiceUp callbacks
I/BluetoothAdapterState( 2109): Entering OffState
D/BluetoothManagerService( 1613): Broadcasting onBluetoothServiceUp() to 4
receivers.
D/BluetoothAdapterState( 2109): CURRENT_STATE=OFF, MESSAGE = USER_TURN_ON
D/BluetoothAdapterProperties( 2109): Setting state to 11
I/BluetoothAdapterState( 2109): Bluetooth adapter state changed: 10-> 11
D/BluetoothAdapterService( 2109): Broadcasting updateAdapterState() to 1
receivers.
D/BluetoothBondStateMachine( 2109): make
D/BluetoothManagerService( 1613): Message: 60
D/BluetoothManagerService( 1613): MESSAGE_BLUETOOTH_STATE_CHANGE:
prevState = 10, newState=11
D/BluetoothManagerService( 1613): Bluetooth State Change Intent: 10 -> 11
D/BluetoothMapService( 2109): onReceive
D/HeadsetService( 2109): Received start request. Starting profile...
D/HeadsetStateMachine( 2109): make
I/BluetoothBondStateMachine( 2109): StableState(): Entering Off State
I/BluetoothAdapterState( 2109): Entering PendingCommandState State:
isTurningOn()=true, isTurningOff()=false
E/HeadsetStateMachine( 2109): Could not bind to Bluetooth Headset Phone
Service
E/BluetoothHeadsetServiceJni( 2109): Bluetooth module is not loaded
D/A2dpService( 2109): Received start request. Starting profile...
D/A2dpStateMachine( 2109): make
E/BluetoothA2dpServiceJni( 2109): Bluetooth module is not loaded
V/Avrcp ( 2109): make
E/BluetoothAvrcpServiceJni( 2109): Bluetooth module is not loaded
D/A2dpStateMachine( 2109): Enter Disconnected: -2
D/HidService( 2109): Received start request. Starting profile...
E/BluetoothHidServiceJni( 2109): Bluetooth module is not loaded
D/HealthService( 2109): Received start request. Starting profile...
E/BluetoothHealthServiceJni( 2109): Bluetooth module is not loaded
D/PanService( 2109): Received start request. Starting profile...
D/BluetoothPanServiceJni( 2109): initializeNative(L110): pan
E/BluetoothPanServiceJni( 2109): ## ERROR : initializeNative(L115):
Bluetooth module is not loaded##
D/BtGatt.DebugUtils( 2109): handleDebugAction() action=null
D/BtGatt.GattService( 2109): Received start request. Starting profile...
D/BtGatt.GattService( 2109): start()
E/BtGatt.JNI( 2109): ERROR: initializeNative(L695): Bluetooth module is
not loaded##
D/BluetoothMapService( 2109): Received start request. Starting profile...
D/BluetoothMapService( 2109): start()
D/BluetoothAdapterService( 2109): Profile still not
running:com.android.bluetooth.hdp.HealthService
D/HeadsetPhoneState( 2109): sendDeviceStateChanged. mService=0 mSignal=0
mRoam=0 mBatteryCharge=5
D/BluetoothAdapterService( 2109): Profile still not
running:com.android.bluetooth.hdp.HealthService
D/BluetoothAdapterService( 2109): Profile still not
running:com.android.bluetooth.hdp.HealthService
D/BluetoothAdapterService( 2109): Profile still not
running:com.android.bluetooth.map.BluetoothMapService
D/BluetoothAdapterService( 2109): Profile still not
running:com.android.bluetooth.map.BluetoothMapService
D/BluetoothAdapterService( 2109): Profile still not
running:com.android.bluetooth.map.BluetoothMapService
D/BluetoothAdapterState( 2109): CURRENT_STATE=PENDING, MESSAGE = STARTED,
isTurningOn=true, isTurningOff=false
E/BluetoothAdapterState( 2109): Error while turning Bluetooth On
D/BluetoothAdapterProperties( 2109): Setting state to 10
I/BluetoothAdapterState( 2109): Bluetooth adapter state changed: 11-> 10
D/BluetoothAdapterService( 2109): Broadcasting updateAdapterState() to 1
receivers.
D/BluetoothManagerService( 1613): Message: 60
D/BluetoothManagerService( 1613): MESSAGE_BLUETOOTH_STATE_CHANGE:
prevState = 11, newState=10
D/BluetoothManagerService( 1613): Broadcasting
onBluetoothStateChange(false) to 6 receivers.
E/BluetoothPan( 1837):
E/BluetoothPan( 1837): java.lang.IllegalArgumentException: Service not
registered: android.bluetooth.BluetoothPan$2@41b0dd10
E/BluetoothPan( 1837): at
android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:931)
E/BluetoothPan( 1837): at
android.app.ContextImpl.unbindService(ContextImpl.java:1595)
E/BluetoothPan( 1837): at
android.content.ContextWrapper.unbindService(ContextWrapper.java:529)
E/BluetoothPan( 1837): at
android.bluetooth.BluetoothPan$1.onBluetoothStateChange(BluetoothPan.java:199)
E/BluetoothPan( 1837): at
android.bluetooth.IBluetoothStateChangeCallback$Stub.onTransact(IBluetoothStateChangeCallback.java:55)
E/BluetoothPan( 1837): at android.os.Binder.execTransact(Binder.java:404)
E/BluetoothPan( 1837): at dalvik.system.NativeStart.run(Native Method)
I/BluetoothAdapterState( 2109): Entering OffState
D/BluetoothMap( 1837): onBluetoothStateChange: up=false
E/BluetoothMap( 1837):
E/BluetoothMap( 1837): java.lang.IllegalArgumentException: Service not
registered: android.bluetooth.BluetoothMap$2@41b13478
E/BluetoothMap( 1837): at
android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:931)
E/BluetoothMap( 1837): at
android.app.ContextImpl.unbindService(ContextImpl.java:1595)
E/BluetoothMap( 1837): at
android.content.ContextWrapper.unbindService(ContextWrapper.java:529)
E/BluetoothMap( 1837): at
android.bluetooth.BluetoothMap$1.onBluetoothStateChange(BluetoothMap.java:66)
E/BluetoothMap( 1837): at
android.bluetooth.IBluetoothStateChangeCallback$Stub.onTransact(IBluetoothStateChangeCallback.java:55)
E/BluetoothMap( 1837): at android.os.Binder.execTransact(Binder.java:404)
E/BluetoothMap( 1837): at dalvik.system.NativeStart.run(Native Method)
D/BluetoothInputDevice( 1837): onBluetoothStateChange: up=false
E/BluetoothInputDevice( 1837):
E/BluetoothInputDevice( 1837): java.lang.IllegalArgumentException: Service
not registered: android.bluetooth.BluetoothInputDevice$2@41b08180
E/BluetoothInputDevice( 1837): at
android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:931)
E/BluetoothInputDevice( 1837): at
android.app.ContextImpl.unbindService(ContextImpl.java:1595)
E/BluetoothInputDevice( 1837): at
android.content.ContextWrapper.unbindService(ContextWrapper.java:529)
E/BluetoothInputDevice( 1837): at
android.bluetooth.BluetoothInputDevice$1.onBluetoothStateChange(BluetoothInputDevice.java:199)
E/BluetoothInputDevice( 1837): at
android.bluetooth.IBluetoothStateChangeCallback$Stub.onTransact(IBluetoothStateChangeCallback.java:55)
E/BluetoothInputDevice( 1837): at
android.os.Binder.execTransact(Binder.java:404)
E/BluetoothInputDevice( 1837): at dalvik.system.NativeStart.run(Native
Method)
D/BluetoothHeadset( 1613): onBluetoothStateChange: up=false
E/BluetoothHeadset( 1613):
E/BluetoothHeadset( 1613): java.lang.IllegalArgumentException: Service not
registered: android.bluetooth.BluetoothHeadset$2@41e17290
E/BluetoothHeadset( 1613): at
android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:931)
E/BluetoothHeadset( 1613): at
android.app.ContextImpl.unbindService(ContextImpl.java:1595)
E/BluetoothHeadset( 1613): at
android.bluetooth.BluetoothHeadset$1.onBluetoothStateChange(BluetoothHeadset.java:239)
E/BluetoothHeadset( 1613): at
com.android.server.BluetoothManagerService.sendBluetoothStateCallback(BluetoothManagerService.java:484)
E/BluetoothHeadset( 1613): at
com.android.server.BluetoothManagerService.bluetoothStateChangeHandler(BluetoothManagerService.java:1129)
E/BluetoothHeadset( 1613): at
com.android.server.BluetoothManagerService.access$2800(BluetoothManagerService.java:47)
E/BluetoothHeadset( 1613): at
com.android.server.BluetoothManagerService$BluetoothHandler.handleMessage(BluetoothManagerService.java:864)
E/BluetoothHeadset( 1613): at
android.os.Handler.dispatchMessage(Handler.java:102)
E/BluetoothHeadset( 1613): at android.os.Looper.loop(Looper.java:137)
E/BluetoothHeadset( 1613): at
android.os.HandlerThread.run(HandlerThread.java:61)
D/BluetoothA2dp( 1613): onBluetoothStateChange: up=false
E/BluetoothA2dp( 1613):
E/BluetoothA2dp( 1613): java.lang.IllegalArgumentException: Service not
registered: android.bluetooth.BluetoothA2dp$2@41e4c018
E/BluetoothA2dp( 1613): at
android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:931)
E/BluetoothA2dp( 1613): at
android.app.ContextImpl.unbindService(ContextImpl.java:1595)
E/BluetoothA2dp( 1613): at
android.bluetooth.BluetoothA2dp$1.onBluetoothStateChange(BluetoothA2dp.java:121)
E/BluetoothA2dp( 1613): at
com.android.server.BluetoothManagerService.sendBluetoothStateCallback(BluetoothManagerService.java:484)
E/BluetoothA2dp( 1613): at
com.android.server.BluetoothManagerService.bluetoothStateChangeHandler(BluetoothManagerService.java:1129)
E/BluetoothA2dp( 1613): at
com.android.server.BluetoothManagerService.access$2800(BluetoothManagerService.java:47)
E/BluetoothA2dp( 1613): at
com.android.server.BluetoothManagerService$BluetoothHandler.handleMessage(BluetoothManagerService.java:864)
E/BluetoothA2dp( 1613): at
android.os.Handler.dispatchMessage(Handler.java:102)
E/BluetoothA2dp( 1613): at android.os.Looper.loop(Looper.java:137)
E/BluetoothA2dp( 1613): at
android.os.HandlerThread.run(HandlerThread.java:61)
D/BluetoothPbap( 1837): onBluetoothStateChange: up=false
E/BluetoothPbap( 1837):
E/BluetoothPbap( 1837): java.lang.IllegalArgumentException: Service not
registered: android.bluetooth.BluetoothPbap$2@41b18c50
E/BluetoothPbap( 1837): at
android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:931)
E/BluetoothPbap( 1837): at
android.app.ContextImpl.unbindService(ContextImpl.java:1595)
E/BluetoothPbap( 1837): at
android.content.ContextWrapper.unbindService(ContextWrapper.java:529)
E/BluetoothPbap( 1837): at
android.bluetooth.BluetoothPbap$1.onBluetoothStateChange(BluetoothPbap.java:122)
E/BluetoothPbap( 1837): at
android.bluetooth.IBluetoothStateChangeCallback$Stub.onTransact(IBluetoothStateChangeCallback.java:55)
E/BluetoothPbap( 1837): at android.os.Binder.execTransact(Binder.java:404)
E/BluetoothPbap( 1837): at dalvik.system.NativeStart.run(Native Method)
D/BluetoothManagerService( 1613): Bluetooth State Change Intent: 11 -> 10
D/BluetoothMapService( 2109): onReceive
E/BluetoothManagerService( 1613): recoverBluetoothServiceFromError
W/ContextImpl( 1837): Calling a method in the system process without a
qualified user: android.app.ContextImpl.startService:1479
android.content.ContextWrapper.startService:494
android.content.ContextWrapper.startService:494
com.android.settings.bluetooth.DockEventReceiver.beginStartingService:134
com.android.settings.bluetooth.DockEventReceiver.onReceive:115
D/DockEventReceiver( 1837): finishStartingService: stopping service
D/BluetoothManagerService( 1613): Sending off request.
D/BluetoothAdapterState( 2109): CURRENT_STATE=OFF, MESSAGE = USER_TURN_OFF
D/BluetoothManagerService( 1613): Calling onBluetoothServiceDown callbacks
D/BluetoothManagerService( 1613): Broadcasting onBluetoothServiceDown() to
4 receivers.
D/BluetoothAdapterService( 2109): Cleaning up adapter native....
D/BluetoothAdapterService( 2109): Done cleaning up adapter native....
D/BluetoothAdapterService(1102260480)( 2109): ****onDestroy()********
D/BluetoothManagerService( 1613): Message: 42
D/BluetoothManagerService( 1613): MESSAGE_RESTART_BLUETOOTH_SERVICE:
Restart IBluetooth service
D/BluetoothAdapterService( 2109): REFCOUNT: CREATED. INSTANCE_COUNT4
Testing with bluez cli tools:
# haltest
audio_hw_device_open returned -98
hw_get_module_by_class returned -2
if_bluetooth->init: BT_STATUS_FAIL
get_profile_interface(handsfree) : 0x0
get_profile_interface(a2dp) : 0x0
get_profile_interface(avrcp) : 0x0
get_profile_interface(health) : 0x0
get_profile_interface(hidhost) : 0x0
get_profile_interface(pan) : 0x0
get_profile_interface(gatt) : 0x0
get_profile_interface(socket) : 0x0
if_bluetooth->init: BT_STATUS_FAIL
if_av is NULL
if_rc is NULL
if_gatt is NULL
if_hf is NULL
if_hh is NULL
if_pan is NULL
if_hl is NULL
>
logcat output from haltest
D/BlueZ ( 2567): external/bluetooth/bluez/android/hal-audio.c:audio_open()
D/BlueZ ( 2567):
external/bluetooth/bluez/android/hal-audio.c:audio_ipc_init()
E/BlueZ ( 2567): audio: Failed to bind socket: 98 (Address already in use)
D/BlueZ ( 2567):
external/bluetooth/bluez/android/hal-bluetooth.c:open_bluetooth()
D/BlueZ ( 2567):
external/bluetooth/bluez/android/hal-bluetooth.c:get_bluetooth_interface()
D/BlueZ ( 2567): external/bluetooth/bluez/android/hal-bluetooth.c:init()
I/bluetoothd( 2568): bluetoothd[2569]: Bluetooth daemon 5.23
I/bluetoothd( 2568): bluetoothd[2569]: Starting SDP server
I/bluetoothd( 2568): bluetoothd[2569]: Bluetooth management interface 1.7
initialized
I/bluetoothd( 2568): bluetoothd[2569]: Kernel connection control will be used
I/bluetoothd( 2568): bluetoothd[2569]: Stopping SDP server
I/bluetoothd( 2568): bluetoothd[2569]: Exit
E/BlueZ ( 2567): bluetoothd connect timeout
D/BlueZ ( 2567):
external/bluetooth/bluez/android/hal-bluetooth.c:get_profile_interface()
handsfree
D/BlueZ ( 2567):
external/bluetooth/bluez/android/hal-bluetooth.c:get_profile_interface()
a2dp
D/BlueZ ( 2567):
external/bluetooth/bluez/android/hal-bluetooth.c:get_profile_interface()
avrcp
D/BlueZ ( 2567):
external/bluetooth/bluez/android/hal-bluetooth.c:get_profile_interface()
health
D/BlueZ ( 2567):
external/bluetooth/bluez/android/hal-bluetooth.c:get_profile_interface()
hidhost
D/BlueZ ( 2567):
external/bluetooth/bluez/android/hal-bluetooth.c:get_profile_interface()
pan
D/BlueZ ( 2567):
external/bluetooth/bluez/android/hal-bluetooth.c:get_profile_interface()
gatt
D/BlueZ ( 2567):
external/bluetooth/bluez/android/hal-bluetooth.c:get_profile_interface()
socket
D/BlueZ ( 2567):
external/bluetooth/bluez/android/hal-bluetooth.c:open_bluetooth()
D/BlueZ ( 2567):
external/bluetooth/bluez/android/hal-bluetooth.c:get_bluetooth_interface()
D/BlueZ ( 2567): external/bluetooth/bluez/android/hal-bluetooth.c:init()
I/bluetoothd( 2570): bluetoothd[2571]: Bluetooth daemon 5.23
I/bluetoothd( 2570): bluetoothd[2571]: Starting SDP server
I/bluetoothd( 2570): bluetoothd[2571]: Bluetooth management interface 1.7
initialized
I/bluetoothd( 2570): bluetoothd[2571]: Kernel connection control will be used
I/bluetoothd( 2570): bluetoothd[2571]: Stopping SDP server
I/bluetoothd( 2570): bluetoothd[2571]: Exit
E/BlueZ ( 2567): bluetoothd connect timeout
# l2test
l2test[2591]: Waiting for connection on psm 4113 ...
# rctest
rctest[2593]: Can't create socket: Protocol not supported (93)
# btmgmt le on
Set Low Energy for hci0 failed with status 0x11 (Invalid Index)
# btmgmt info
# btmgmt power on
Set Powered for hci0 failed with status 0x11 (Invalid Index)
--
Patrick Shirkey
Boost Hardware Ltd
On Thu, October 23, 2014 11:29 pm, Andrei Emeltchenko wrote:
> Hi Patrick,
>
> On Thu, Oct 23, 2014 at 09:59:23PM +1100, Patrick Shirkey wrote:
>>
>> On Thu, October 23, 2014 7:59 pm, Patrick Shirkey wrote:
>> > Hi,
>> >
>> > I have now got backports to run with bluez instead of bluedroid and
>> the
>> > btusb driver instead of rtk_btusb.
>> >
>> > However the android bluetooth system does not want to run for me.
>
> So what is not working? Do you have logcat with "BlueZ" and "bluetothd"
> logs?
>
It is working better now and I can see the BLE device in the Settings UI.
For reference I had to add the following insmod commands to my init file
to get all the backports drivers to load.
# Bluez bluetooth and backports modules
insmod /system/vendor/modules/compat.ko
insmod /system/vendor/modules/bluetooth.ko
insmod /system/vendor/modules/btusb.ko
insmod /system/vendor/modules/rfcomm.ko
insmod /system/vendor/modules/bnep.ko
And I had to double check that Crypto configs were set (which is
referenced in the aosp-bluez docs on the website):
CONFIG_CRYPTO_CMAC=y
CONFIG_CRYPTO_USER_API=y
CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_USER_API_SKCIPHER=y
> Best regards
> Andrei Emeltchenko
>
>> >
>>
>> For reference purposes I have got bluez running on an 8723au chipset
>> with
>> the btusb driver from the "new" branch of the btusb git repo.
>>
>> Here's an overview of the steps required:
>>
>> - Patch the 3.4 kernel with the patch files from the aosp-bluez "misc"
>> repo
>> - Completely replace bluedroid in the android tree with bluez including
>> the modifed bionic tree from the aosp-bluez repo
>> - Cross compile the backports drivers replacing btusb.c with the version
>> from the "new" branch in the git repo.
>> - Copy the modules from the backports tree to the linux tree before
>> building the firmware image. (overwrite the .ko files generated by the
>> kernel build)
>> - Include the firmware binary images from the git repo "new" branch in
>> the
>> android build so they are copied to the /system/etc/firmware/ folder in
>> the firmware image
>> - Modify the init.rc script to include the init.bluetooth.rc file
>> - Modify the <platform>.mk file (in this case
>> /device/softwinner/wing-k70/wing-k70.mk) to load the following modules
>> on
>> boot:
>> /system/vendor/modules/compat.ko
>> /system/vendor/modules/bluetooth.ko
>> /system/vendor/modules/btusb.ko
>>
>> enable debug logging with :
>>
>> setprop persist.sys.bluetooth.debug 1
>>
>>
>>
>> # btmgmt info
>> hci0: addr CC:D2:9C:73:CB:45 version 6 manufacturer 93 class 0x000000
>> supported settings: powered connectable fast-connectable discoverable
>> bondable link-security ssp br/edr hs le advertising debug-keys privacy
>> current settings: bondable ssp br/edr le
>> name BlueZ for Android
>> short name
>>
>>
>> # haltest
>> audio_hw_device_open returned -98
>> hw_get_module_by_class returned -2
>> thread_evt_cb: evt=ASSOCIATE_JVM
>> if_bluetooth->init: BT_STATUS_SUCCESS
>> get_profile_interface(handsfree) : 0xb6e58134
>> get_profile_interface(a2dp) : 0xb6e580ec
>> get_profile_interface(avrcp) : 0xb6e58100
>> get_profile_interface(health) : 0xb6e583d0
>> get_profile_interface(hidhost) : 0xb6e580a0
>> get_profile_interface(pan) : 0xb6e580d0
>> get_profile_interface(gatt) : 0xb6e581ac
>> get_profile_interface(socket) : 0xb6e58094
>> if_bluetooth->init: BT_STATUS_DONE
>> if_av->init: BT_STATUS_SUCCESS
>> if_rc->init: BT_STATUS_SUCCESS
>> if_gatt->init: BT_STATUS_FAIL
>> adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
>> prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
>> 0000113b, 00001200}
>> adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
>> prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
>> 0000113b, 00001200}
>> adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
>> prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
>> 0000113b, 00001200}
>> if_hf->init: BT_STATUS_FAIL
>> if_hh->init: BT_STATUS_SUCCESS
>> if_pan->init: BT_STATUS_FAIL
>> adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
>> prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
>> 0000113b, 00001200}
>> adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
>> prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
>> 0000113b, 00001200}
>> if_hl->init: BT_STATUS_SUCCESS
>> >
>>
>>
>> # btmgmt le on
>> hci0 Set Low Energy complete, settings: bondable ssp br/edr le
>> # btmgmt find
>> Unable to start discovery. status 0x0f (Not Powered)
>> # btmgmt power on
>> hci0 Set Powered complete, settings: powered bondable ssp br/edr le
>> # btmgmt find
>> Discovery started
>> hci0 dev_found: BC:6A:29:AB:2C:AA type LE Public rssi -44 flags 0x0000
>> AD
>> flags 0x06 eir_len 25
>>
>>
>>
>>
>>
>> --
>> Patrick Shirkey
>> Boost Hardware Ltd
>> --
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-bluetooth" in
>> the body of a message to [email protected]
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
> in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Patrick Shirkey
Boost Hardware Ltd
Hi Patrick,
On Thu, Oct 23, 2014 at 09:59:23PM +1100, Patrick Shirkey wrote:
>
> On Thu, October 23, 2014 7:59 pm, Patrick Shirkey wrote:
> > Hi,
> >
> > I have now got backports to run with bluez instead of bluedroid and the
> > btusb driver instead of rtk_btusb.
> >
> > However the android bluetooth system does not want to run for me.
So what is not working? Do you have logcat with "BlueZ" and "bluetothd" logs?
Best regards
Andrei Emeltchenko
> >
>
> For reference purposes I have got bluez running on an 8723au chipset with
> the btusb driver from the "new" branch of the btusb git repo.
>
> Here's an overview of the steps required:
>
> - Patch the 3.4 kernel with the patch files from the aosp-bluez "misc" repo
> - Completely replace bluedroid in the android tree with bluez including
> the modifed bionic tree from the aosp-bluez repo
> - Cross compile the backports drivers replacing btusb.c with the version
> from the "new" branch in the git repo.
> - Copy the modules from the backports tree to the linux tree before
> building the firmware image. (overwrite the .ko files generated by the
> kernel build)
> - Include the firmware binary images from the git repo "new" branch in the
> android build so they are copied to the /system/etc/firmware/ folder in
> the firmware image
> - Modify the init.rc script to include the init.bluetooth.rc file
> - Modify the <platform>.mk file (in this case
> /device/softwinner/wing-k70/wing-k70.mk) to load the following modules on
> boot:
> /system/vendor/modules/compat.ko
> /system/vendor/modules/bluetooth.ko
> /system/vendor/modules/btusb.ko
>
> enable debug logging with :
>
> setprop persist.sys.bluetooth.debug 1
>
>
>
> # btmgmt info
> hci0: addr CC:D2:9C:73:CB:45 version 6 manufacturer 93 class 0x000000
> supported settings: powered connectable fast-connectable discoverable
> bondable link-security ssp br/edr hs le advertising debug-keys privacy
> current settings: bondable ssp br/edr le
> name BlueZ for Android
> short name
>
>
> # haltest
> audio_hw_device_open returned -98
> hw_get_module_by_class returned -2
> thread_evt_cb: evt=ASSOCIATE_JVM
> if_bluetooth->init: BT_STATUS_SUCCESS
> get_profile_interface(handsfree) : 0xb6e58134
> get_profile_interface(a2dp) : 0xb6e580ec
> get_profile_interface(avrcp) : 0xb6e58100
> get_profile_interface(health) : 0xb6e583d0
> get_profile_interface(hidhost) : 0xb6e580a0
> get_profile_interface(pan) : 0xb6e580d0
> get_profile_interface(gatt) : 0xb6e581ac
> get_profile_interface(socket) : 0xb6e58094
> if_bluetooth->init: BT_STATUS_DONE
> if_av->init: BT_STATUS_SUCCESS
> if_rc->init: BT_STATUS_SUCCESS
> if_gatt->init: BT_STATUS_FAIL
> adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
> prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
> 0000113b, 00001200}
> adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
> prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
> 0000113b, 00001200}
> adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
> prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
> 0000113b, 00001200}
> if_hf->init: BT_STATUS_FAIL
> if_hh->init: BT_STATUS_SUCCESS
> if_pan->init: BT_STATUS_FAIL
> adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
> prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
> 0000113b, 00001200}
> adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
> prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
> 0000113b, 00001200}
> if_hl->init: BT_STATUS_SUCCESS
> >
>
>
> # btmgmt le on
> hci0 Set Low Energy complete, settings: bondable ssp br/edr le
> # btmgmt find
> Unable to start discovery. status 0x0f (Not Powered)
> # btmgmt power on
> hci0 Set Powered complete, settings: powered bondable ssp br/edr le
> # btmgmt find
> Discovery started
> hci0 dev_found: BC:6A:29:AB:2C:AA type LE Public rssi -44 flags 0x0000 AD
> flags 0x06 eir_len 25
>
>
>
>
>
> --
> Patrick Shirkey
> Boost Hardware Ltd
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, October 23, 2014 7:59 pm, Patrick Shirkey wrote:
> Hi,
>
> I have now got backports to run with bluez instead of bluedroid and the
> btusb driver instead of rtk_btusb.
>
> However the android bluetooth system does not want to run for me.
>
For reference purposes I have got bluez running on an 8723au chipset with
the btusb driver from the "new" branch of the btusb git repo.
Here's an overview of the steps required:
- Patch the 3.4 kernel with the patch files from the aosp-bluez "misc" repo
- Completely replace bluedroid in the android tree with bluez including
the modifed bionic tree from the aosp-bluez repo
- Cross compile the backports drivers replacing btusb.c with the version
from the "new" branch in the git repo.
- Copy the modules from the backports tree to the linux tree before
building the firmware image. (overwrite the .ko files generated by the
kernel build)
- Include the firmware binary images from the git repo "new" branch in the
android build so they are copied to the /system/etc/firmware/ folder in
the firmware image
- Modify the init.rc script to include the init.bluetooth.rc file
- Modify the <platform>.mk file (in this case
/device/softwinner/wing-k70/wing-k70.mk) to load the following modules on
boot:
/system/vendor/modules/compat.ko
/system/vendor/modules/bluetooth.ko
/system/vendor/modules/btusb.ko
enable debug logging with :
setprop persist.sys.bluetooth.debug 1
# btmgmt info
hci0: addr CC:D2:9C:73:CB:45 version 6 manufacturer 93 class 0x000000
supported settings: powered connectable fast-connectable discoverable
bondable link-security ssp br/edr hs le advertising debug-keys privacy
current settings: bondable ssp br/edr le
name BlueZ for Android
short name
# haltest
audio_hw_device_open returned -98
hw_get_module_by_class returned -2
thread_evt_cb: evt=ASSOCIATE_JVM
if_bluetooth->init: BT_STATUS_SUCCESS
get_profile_interface(handsfree) : 0xb6e58134
get_profile_interface(a2dp) : 0xb6e580ec
get_profile_interface(avrcp) : 0xb6e58100
get_profile_interface(health) : 0xb6e583d0
get_profile_interface(hidhost) : 0xb6e580a0
get_profile_interface(pan) : 0xb6e580d0
get_profile_interface(gatt) : 0xb6e581ac
get_profile_interface(socket) : 0xb6e58094
if_bluetooth->init: BT_STATUS_DONE
if_av->init: BT_STATUS_SUCCESS
if_rc->init: BT_STATUS_SUCCESS
if_gatt->init: BT_STATUS_FAIL
adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
0000113b, 00001200}
adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
0000113b, 00001200}
adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
0000113b, 00001200}
if_hf->init: BT_STATUS_FAIL
if_hh->init: BT_STATUS_SUCCESS
if_pan->init: BT_STATUS_FAIL
adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
0000113b, 00001200}
adapter_properties_cb: status=BT_STATUS_SUCCESS num_properties=1
prop: type=BT_PROPERTY_UUIDS len=80 val={0000110e, 0000110c, 0000110a,
0000113b, 00001200}
if_hl->init: BT_STATUS_SUCCESS
>
# btmgmt le on
hci0 Set Low Energy complete, settings: bondable ssp br/edr le
# btmgmt find
Unable to start discovery. status 0x0f (Not Powered)
# btmgmt power on
hci0 Set Powered complete, settings: powered bondable ssp br/edr le
# btmgmt find
Discovery started
hci0 dev_found: BC:6A:29:AB:2C:AA type LE Public rssi -44 flags 0x0000 AD
flags 0x06 eir_len 25
--
Patrick Shirkey
Boost Hardware Ltd