Hiattach has bcm specific initialisation.
Till now to run BT I didn't do start bluetoothd command.
Also after 2 hciattach's when i manaually give hciconfig hci0 up, it gives me Connection timed out(110) error.
But inspite of this BT will be start when clicked , since i have given those 2 commands( i guess)
I used to check /sys/class/rfkill/rfkill0 for power state.
Here state will be 1 when boot up.
Is this right parameter to check?
I also checked with 2 hciattach's in init.rc , It didn't work either.
Also , if i give bluetoothd -start i get this :
# bluetoothd -start
bluetoothd -start
** (process:2648): CRITICAL (recursed) **: g_convert_with_fallback: assertion `to_codeset != NULL' failed
aborting...
[1] + Stopped (signal) bluetoothd -start
Further, When bluetooth starts successfully(cmd line - 2 commands) heres log:
01-01 00:24:58.711: INFO/ActivityManager(2509): Displayed activity com.android.settings/.bluetooth.BluetoothSettings: 310 ms (total 310 ms)
01-01 00:24:59.806: DEBUG/BluetoothService(2509): Bluetooth state 0 -> 1
01-01 00:25:02.030: INFO/bluedroid(2509): Starting hciattach daemon
01-01 00:25:02.061: INFO/bluedroid(2509): Starting bluetoothd deamon
01-01 00:25:05.311: ERROR/BluetoothEventLoop.cpp(2509): event_filter: Received signal org.freedesktop.DBus:NameAcquired from /org/freedesktop/DBus
01-01 00:25:05.416: DEBUG/BluetoothService(2509): Bluetooth state 1 -> 2
01-01 00:25:05.456: DEBUG/dalvikvm(2616): GC freed 1276 objects / 95736 bytes in 440ms
01-01 00:25:05.471: VERBOSE/A2dpAudioInterface(1880): setParameters() bluetooth_enabled=true
01-01 00:25:05.551: ERROR/BluetoothEventLoop.cpp(2509): event_filter: Received signal org.bluez.Adapter:PropertyChanged from /org/bluez/2482/hci0
01-01 00:25:05.571: INFO/bluetooth_ScoSocket.cpp(2550): Listening SCO socket...
01-01 00:25:05.671: INFO/BluetoothPbapService(2616): Starting PBAP service
01-01 00:25:05.706: DEBUG/dalvikvm(2976): GC freed 3503 objects / 212264 bytes in 167ms
01-01 00:25:14.666: INFO/BtOpp RfcommListener(2616): Accept thread started on channel 12
01-01 00:25:15.816: ERROR/BluetoothEventLoop.cpp(2509): event_filter: Received signal org.bluez.Adapter:PropertyChanged from /org/bluez/2482/hci0
When error, this is the log:
01-01 00:01:24.536: INFO/ActivityManager(1928): Displayed activity com.android.settings/.bluetooth.BluetoothSettings: 306 ms (total 306 ms)
01-01 00:01:25.181: DEBUG/BluetoothService(1928): Bluetooth state 0 -> 1
01-01 00:01:27.386: INFO/bluedroid(1928): Starting hciattach daemon
01-01 00:01:30.411: DEBUG/dalvikvm(2020): GC freed 2082 objects / 181736 bytes in 67ms
01-01 00:01:37.571: ERROR/bluedroid(1928): bt_enable: Timeout waiting for HCI device to come up
01-01 00:01:37.571: DEBUG/BluetoothService(1928): Bluetooth state 1 -> 0
01-01 00:01:37.681: ERROR/libdbus(1928): arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file external/dbus/dbus/dbus-message.c line 1070.
01-01 00:01:37.681: ERROR/libdbus(1928): This is normally a bug in some application using the D-Bus library.
01-01 00:01:37.681: DEBUG/libc-abort(1928): abort() called in pid 1928
01-01 00:01:37.721: INFO/DEBUG(1877): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-01 00:01:37.721: INFO/DEBUG(1877): Build fingerprint: 'Samsung/SPH-M900/SPH-M900/SPH-M900:2.1-update1/ECLAIR/DH02:eng/test-keys'
01-01 00:01:37.721: INFO/DEBUG(1877): pid: 1928, tid: 2033 >>> system_server <<<
01-01 00:01:37.721: INFO/DEBUG(1877): signal 11 (SIGSEGV), fault addr deadbaad
01-01 00:01:37.721: INFO/DEBUG(1877): r0 00000027 r1 afe2f218 r2 afe2f23d r3 afe10635
01-01 00:01:37.721: INFO/DEBUG(1877): r4 afe37e08 r5 afe2f218 r6 deadbaad r7 ae833d7d
01-01 00:01:37.721: INFO/DEBUG(1877): r8 47b5eb80 r9 444e6eb8 10 444e6ea0 fp 002554e0
01-01 00:01:37.721: INFO/DEBUG(1877): ip 000a3832 sp 47b5ea18 lr afe1f34d pc afe1063e cpsr a0000030
01-01 00:01:37.781: DEBUG/dalvikvm(2104): GC freed 3477 objects / 211640 bytes in 174ms
01-01 00:01:37.851: INFO/DEBUG(1877): #00 pc 0001063e /system/lib/libc.so
01-01 00:01:37.851: INFO/DEBUG(1877): #01 pc 0002c28c /system/lib/libdbus.so
01-01 00:01:37.851: INFO/DEBUG(1877): #02 pc 00016086 /system/lib/libdbus.so
01-01 00:01:37.851: INFO/DEBUG(1877): #03 pc 00020db0 /system/lib/libdbus.so
01-01 00:01:37.851: INFO/DEBUG(1877): #04 pc 0004d450 /system/lib/libandroid_runtime.so
01-01 00:01:37.851: INFO/DEBUG(1877): #05 pc 0004d56a /system/lib/libandroid_runtime.so
01-01 00:01:37.861: INFO/DEBUG(1877): #06 pc 0004f176 /system/lib/libandroid_runtime.so
01-01 00:01:37.861: INFO/DEBUG(1877): #07 pc 0000f174 /system/lib/libdvm.so
01-01 00:01:37.861: INFO/DEBUG(1877): #08 pc 00037f16 /system/lib/libdvm.so
01-01 00:01:37.861: INFO/DEBUG(1877): #09 pc 0003159a /system/lib/libdvm.so
01-01 00:01:37.861: INFO/DEBUG(1877): #10 pc 00013ed8 /system/lib/libdvm.so
01-01 00:01:37.866: INFO/DEBUG(1877): #11 pc 000196b4 /system/lib/libdvm.so
01-01 00:01:37.866: INFO/DEBUG(1877): #12 pc 00018c88 /system/lib/libdvm.so
01-01 00:01:37.866: INFO/DEBUG(1877): #13 pc 0004dbd2 /system/lib/libdvm.so
01-01 00:01:37.866: INFO/DEBUG(1877): #14 pc 0003b324 /system/lib/libdvm.so
01-01 00:01:37.866: INFO/DEBUG(1877): #15 pc 0002d674 /system/lib/libdvm.so
01-01 00:01:37.871: INFO/DEBUG(1877): #16 pc 0003d202 /system/lib/libandroid_runtime.so
01-01 00:01:37.871: INFO/DEBUG(1877): #17 pc 0003d514 /system/lib/libandroid_runtime.so
01-01 00:01:37.871: INFO/DEBUG(1877): #18 pc 0001540c /system/lib/libbinder.so
01-01 00:01:37.871: INFO/DEBUG(1877): #19 pc 00018ae4 /system/lib/libbinder.so
01-01 00:01:37.896: INFO/DEBUG(1877): #20 pc 00018cb2 /system/lib/libbinder.so
01-01 00:01:37.896: INFO/DEBUG(1877): #21 pc 0001f33c /system/lib/libbinder.so
01-01 00:01:37.896: INFO/DEBUG(1877): #22 pc 0001b60c /system/lib/libutils.so
01-01 00:01:37.896: INFO/DEBUG(1877): #23 pc 0002886e /system/lib/libandroid_runtime.so
01-01 00:01:37.896: INFO/DEBUG(1877): #24 pc 0001ba36 /system/lib/libutils.so
01-01 00:01:37.901: INFO/DEBUG(1877): #25 pc 0000f8d0 /system/lib/libc.so
01-01 00:01:37.901: INFO/DEBUG(1877): #26 pc 0000f3a4 /system/lib/libc.so
01-01 00:01:37.901: INFO/DEBUG(1877): stack:
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5e9d8 47b5ea14
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5e9dc afe13ab3 /system/lib/libc.so
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5e9e0 afe3802c /system/lib/libc.so
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5e9e4 afe37fd8 /system/lib/libc.so
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5e9e8 00000000
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5e9ec afe13ce5 /system/lib/libc.so
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5e9f0 00000000
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5e9f4 be596834
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5e9f8 00015e58 [heap]
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5e9fc afe37e08 /system/lib/libc.so
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5ea00 afe2f218 /system/lib/libc.so
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5ea04 00002ed8
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5ea08 ae833d7d /system/lib/libdbus.so
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5ea0c afe10635 /system/lib/libc.so
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5ea10 df002777
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5ea14 e3a070ad
01-01 00:01:37.901: INFO/DEBUG(1877): #00 47b5ea18 afe37fd8 /system/lib/libc.so
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5ea1c ae83a22c /system/lib/libdbus.so
01-01 00:01:37.901: INFO/DEBUG(1877): 47b5ea20 ae833d7d /system/lib/libdbus.so
01-01 00:01:37.921: INFO/DEBUG(1877): 47b5ea24 afe176cf /system/lib/libc.so
01-01 00:01:37.921: INFO/DEBUG(1877): 47b5ea28 ae833d7d /system/lib/libdbus.so
01-01 00:01:37.921: INFO/DEBUG(1877): 47b5ea2c fffffbdf
01-01 00:01:37.921: INFO/DEBUG(1877): 47b5ea30 ae8423c4 /system/lib/libdbus.so
01-01 00:01:37.921: INFO/DEBUG(1877): 47b5ea34 afe37fd8 /system/lib/libc.so
01-01 00:01:37.921: INFO/DEBUG(1877): 47b5ea38 ae83a22c /system/lib/libdbus.so
01-01 00:01:37.921: INFO/DEBUG(1877): 47b5ea3c ae82c28f /system/lib/libdbus.so
01-01 00:01:37.921: INFO/DEBUG(1877): #01 47b5ea40 ae8423c4 /system/lib/libdbus.so
01-01 00:01:37.921: INFO/DEBUG(1877): 47b5ea44 ae81608b /system/lib/libdbus.so
01-01 00:01:40.816: INFO/ActivityThread(2094): Removing dead content provider: settings
01-01 00:01:40.821: ERROR/BluetoothAdapter(2073): android.os.DeadObjectException
01-01 00:01:40.821: ERROR/BluetoothAdapter(2073): at android.os.BinderProxy.transact(Native Method)
01-01 00:01:40.821: ERROR/BluetoothAdapter(2073): at android.bluetooth.IBluetooth$Stub$Proxy.getAddress(IBluetooth.java:400)
01-01 00:01:40.821: ERROR/BluetoothAdapter(2073): at android.bluetooth.BluetoothAdapter.getAddress(BluetoothAdapter.java:168)
01-01 00:01:40.821: ERROR/BluetoothAdapter(2073): at com.android.bluetooth.pbap.BluetoothPbapService.onCreate(BluetoothPbapService.java:196)
01-01 00:01:40.821: ERROR/BluetoothAdapter(2073): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2686)
01-01 00:01:40.821: ERROR/BluetoothAdapter(2073): at android.app.ActivityThread.access$3100(ActivityThread.java:116)
01-01 00:01:40.821: ERROR/BluetoothAdapter(2073): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1848)
01-01 00:01:40.821: ERROR/BluetoothAdapter(2073): at android.os.Handler.dispatchMessage(Handler.java:99)
01-01 00:01:40.821: ERROR/BluetoothAdapter(2073): at android.os.Looper.loop(Looper.java:123)
01-01 00:01:40.821: ERROR/BluetoothAdapter(2073): at android.app.ActivityThread.main(ActivityThread.java:4208)
01-01 00:01:40.821: ERROR/BluetoothAdapter(2073): at java.lang.reflect.Method.invokeNative(Native Method)
01-01 00:01:40.821: ERROR/BluetoothAdapter(2073): at java.lang.reflect.Method.invoke(Method.java:521)
01-01 00:01:40.821: ERROR/BluetoothAdapter(2073): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:850)
01-01 00:01:40.821: ERROR/BluetoothAdapter(2073): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
01-01 00:01:40.821: ERROR/BluetoothAdapter(2073): at dalvik.system.NativeStart.main(Native Method)
01-01 00:01:40.826: INFO/ServiceManager(1875): service 'batteryinfo' died
01-01 00:01:40.826: INFO/ServiceManager(1875): service 'activity.services' died
01-01 00:01:40.826: INFO/ServiceManager(1875): service 'usagestats' died
and all service die and it restarts.
Can you please advice on this
Thanks ,