[Android Software/Hacking General [Developers Only]] TheWhisp:
Hi, I recently started working on CM10 port for Galaxy Mini 2, most of the bugs have been already solved. Tough, I am not able to fix bluetooth. It seems the device is using some Qualcomm chip which firmware is downloaded by hci_qcomm_init binary. Hciattach is run by init.qcom.bt.sh which is located in /etc, it calls hci_qcomm_init and in the logcat I see that the firmware (qualcomm-ibs) is downloaded successfully. Then bluetoothd is starting and bunch of d-bus related errors come up. And bluedroid stops hciattach and bluetoothd.

Logcat:

D/BluetoothMasReceiver( 1242): Bluetooth STATE CHANGED to 11
D/dalvikvm( 350): GC_EXPLICIT freed 134K, 44% free 5890K/10375K, paused 48ms+17ms, total 270ms
I/bluedroid( 350): Starting hciattach daemon
I/qcom-bluetooth( 1260): /system/etc/init.qcom.bt.sh: Transport :
I/qcom-bluetooth( 1261): /system/etc/init.qcom.bt.sh: Power Class: Ignored. Default(1) used (1-CLASS1/2-CLASS2/3-CUSTOM)
I/qcom-bluetooth( 1262): /system/etc/init.qcom.bt.sh: Power Class: To override, Before turning BT ON; setprop qcom.bt.dev_power_class <1 or 2 or 3>
D/dalvikvm( 517): GC_EXPLICIT freed 767K, 64% free 2695K/7363K, paused 3ms+10ms, total 72ms
D/dalvikvm( 350): GC_EXPLICIT freed 142K, 44% free 5886K/10375K, paused 5ms+9ms, total 106ms
I/qcom-bluetooth( 1270): /system/etc/init.qcom.bt.sh: Bluetooth QSoC firmware download succeeded, /dev/ttyHS0 qualcomm-ibs 3000000
I/qcom-bluetooth( 1271): /system/etc/init.qcom.bt.sh: start hciattach
I/qcom-bluetooth( 1273): /system/etc/init.qcom.bt.sh: start_hciattach: pid = 1272
D/dalvikvm( 350): GC_EXPLICIT freed 143K, 44% free 5907K/10375K, paused 10ms+19ms, total 137ms
I/bluedroid( 350): Starting bluetoothd deamon
E/BluetoothEventLoop.cpp( 350): get_adapter_path: D-Bus error: org.freedesktop.DBus.Error.ServiceUnknown (The name org.bluez was not provided by any .service files)
I/abtfilt ( 1276): Ath BT Filter Daemon
I/abtfilt ( 1276): Enabling Debug Information
D/abtfilt ( 1276): Abf_WlanCheckSettings : wlan: wlan0
D/abtfilt ( 1276): Calling Fcore Init
I/abtfilt ( 1276): BT Filter Core init complete
I/abtfilt ( 1276): WLAN Stack Notification init complete
I/abtfilt ( 1276): AFH Classification Command will be issued on WLAN connect/disconnect
I/abtfilt ( 1276): Headset Profile notifications will use HCI filter instead of DBUS
E/BluetoothEventLoop.cpp( 350): get_adapter_path: D-Bus error: org.freedesktop.DBus.Error.ServiceUnknown (The name org.bluez was not provided by any .service files)
I/abtfilt ( 1276): Starting the WLAN Event Handler task
I/abtfilt ( 1276): Checking WLAN adapter on startup ..
D/abtfilt ( 1276): Abf_WlanCheckSettings : wlan: wlan0
I/abtfilt ( 1276): Starting the BT Filter task
I/abtfilt ( 1276): BT Filter Core : WLAN Arrived
E/abtfilt ( 1276): [DoMethodCall] Failed to invoke method call (org.bluez.Manager : method : DefaultAdapter) The name org.bluez was not provided by any .service files
D/abtfilt ( 1276): Abf_WlanCheckSettings : wlan: wlan0
I/abtfilt ( 1276): FLAGS = 67, Issue FE antenna configuration as single
I/abtfilt ( 1276): WLAN Adapter Added
E/abtfilt ( 1276): Last Error: Try again
E/abtfilt ( 1276): [AcquireBtAdapter] Get Default Adapter failed
E/abtfilt ( 1276): Last Error: Try again
D/abtfilt ( 1276): rule to add: type='signal',interface='org.bluez.Manager'
D/abtfilt ( 1276): rule to add: type='signal',interface='org.bluez.Manager'
I/abtfilt ( 1276): BT Stack Notification init complete
D/abtfilt ( 1276): Service running, waiting for termination ....
I/abtfilt ( 1276): Starting the BT Event Handler task
I/abtfilt ( 1276): Entering DBus Message loop
D/abtfilt ( 1276): WMI_REPORT_SLEEP_STATE_EVENTID: 6
I/abtfilt ( 1276): FLAGS = 67, Issue FE antenna configuration as single
I/abtfilt ( 1276): BT Filter Core : WLAN Arrived
D/abtfilt ( 1276): Abf_WlanCheckSettings : wlan: wlan0
I/abtfilt ( 1276): FLAGS = 67, Issue FE antenna configuration as single
E/BluetoothEventLoop.cpp( 350): get_adapter_path: D-Bus error: org.freedesktop.DBus.Error.ServiceUnknown (The name org.bluez was not provided by any .service files)
E/BluetoothEventLoop.cpp( 350): get_adapter_path: D-Bus error: org.bluez.Error.NoSuchAdapter (No such adapter)
E/BluetoothEventLoop.cpp( 350): failure setting up Event Loop!
D/abtfilt ( 1276): Got DBus Message ...
D/abtfilt ( 1276): Got DBus Message ...
D/abtfilt ( 1276): BtAdapterAdded (/org/bluez/1275/hci0) Callback ...
D/dalvikvm( 517): GC_EXPLICIT freed 764K, 64% free 2692K/7363K, paused 4ms+9ms, total 50ms
D/dalvikvm( 350): GC_EXPLICIT freed 153K, 44% free 5901K/10375K, paused 5ms+11ms, total 102ms
D/BluetoothEventLoop( 350): Property Changed: Pairable : false
D/BluetoothEventLoop( 350): Property Changed: Powered : false
D/BluetoothEventLoop( 350): Property Changed: UUIDs : 3
E/BluetoothService.cpp( 350): setBluetoothTetheringNative true
E/bluetooth_common.cpp( 350): dbus_func_args_timeout_valist: D-Bus error in Register: org.freedesktop.DBus.Error.UnknownMethod (Method "Register" with signature "ss" on interface "org.bluez.NetworkServer" doesn't exist
E/bluetooth_common.cpp( 350): )
D/BluetoothEventLoop( 350): Property Changed: UUIDs : 4
D/BluetoothEventLoop( 350): Property Changed: UUIDs : 5
D/BluetoothAdapterStateMachine( 350): WarmUp process message: 101
D/BluetoothAdapterStateMachine( 350): WarmUp process message: 54
D/BluetoothEventLoop( 350): Property Changed: UUIDs : 6
D/BluetoothEventLoop( 350): Property Changed: UUIDs : 7
D/BluetoothEventLoop( 350): Property Changed: UUIDs : 8
D/dalvikvm( 350): GC_EXPLICIT freed 165K, 44% free 5893K/10375K, paused 4ms+7ms, total 92ms
D/dalvikvm( 517): GC_EXPLICIT freed 766K, 64% free 2697K/7363K, paused 3ms+8ms, total 57ms
D/dalvikvm( 350): GC_EXPLICIT freed 112K, 44% free 5893K/10375K, paused 5ms+8ms, total 89ms
D/dalvikvm( 350): GC_EXPLICIT freed 113K, 44% free 5892K/10375K, paused 4ms+7ms, total 95ms
D/dalvikvm( 517): GC_CONCURRENT freed 1753K, 64% free 2681K/7363K, paused 3ms+7ms, total 49ms
D/dalvikvm( 517): GC_EXPLICIT freed 374K, 68% free 2415K/7363K, paused 4ms+4ms, total 39ms
D/dalvikvm( 350): GC_EXPLICIT freed 120K, 44% free 5893K/10375K, paused 5ms+8ms, total 90ms
D/dalvikvm( 350): GC_EXPLICIT freed 132K, 44% free 5899K/10375K, paused 5ms+7ms, total 92ms
D/dalvikvm( 517): GC_EXPLICIT freed 410K, 64% free 2674K/7363K, paused 3ms+9ms, total 49ms
D/dalvikvm( 350): GC_EXPLICIT freed 115K, 44% free 5896K/10375K, paused 5ms+7ms, total 90ms
I/abtfilt ( 1276): BT Event Filter Set, Mask: 0x00001000:01C0003A
E/abtfilt ( 1276): [IssueHCICommand] Failed to write to hci:0 (err:100)
E/abtfilt ( 1276): Last Error: Network is down
E/abtfilt ( 1276): [GetAdapterInfo] Failed to get BD_ADDR
E/abtfilt ( 1276): Last Error: Network is down
D/abtfilt ( 1276): rule to add: type='signal',interface='org.bluez.Adapter'
D/abtfilt ( 1276): rule to add: type='signal',interface='org.bluez.Adapter'
D/abtfilt ( 1276): rule to add: type='signal',interface='org.bluez.Adapter'
D/abtfilt ( 1276): rule to add: type='signal',interface='org.bluez.Adapter'
D/abtfilt ( 1276): rule to add: type='signal',interface='org.bluez'
D/abtfilt ( 1276): rule to add: type='signal',interface='org.bluez'
I/abtfilt ( 1276): [HCIFilterThread] starting up
I/abtfilt ( 1276): [/org/bluez/1275/hci0] BT Adapter Added
I/abtfilt ( 1276): [AcquireDefaultAudioDevice]StartRegister
D/abtfilt ( 1276): rule to add: type='signal',interface='org.bluez.Headset'
D/abtfilt ( 1276): rule to add: type='signal',interface='org.bluez.Headset'
D/abtfilt ( 1276): rule to add: type='signal',interface='org.bluez.Headset'
D/abtfilt ( 1276): rule to add: type='signal',interface='org.bluez.Headset'
D/abtfilt ( 1276): rule to add: type='signal',interface='org.bluez.AudioSink'
D/abtfilt ( 1276): rule to add: type='signal',interface='org.bluez.AudioSink'
D/abtfilt ( 1276): rule to add: type='signal',interface='org.bluez.AudioSink'
D/abtfilt ( 1276): rule to add: type='signal',interface='org.bluez.AudioSink'
I/abtfilt ( 1276): [AcquireDefaultAudioDevice]EndRegister
D/abtfilt ( 1276): Got DBus Message ...
D/abtfilt ( 1276): Got DBus Message ...
D/dalvikvm( 350): GC_EXPLICIT freed 112K, 44% free 5897K/10375K, paused 4ms+8ms, total 89ms
D/dalvikvm( 517): GC_EXPLICIT freed 669K, 64% free 2677K/7363K, paused 3ms+8ms, total 58ms
D/dalvikvm( 350): GC_EXPLICIT freed 113K, 44% free 5896K/10375K, paused 4ms+7ms, total 92ms
D/dalvikvm( 350): GC_EXPLICIT freed 112K, 44% free 5897K/10375K, paused 7ms+8ms, total 97ms
D/dalvikvm( 517): GC_EXPLICIT freed 688K, 64% free 2695K/7363K, paused 8ms+8ms, total 57ms
D/dalvikvm( 350): GC_EXPLICIT freed 113K, 44% free 5896K/10375K, paused 5ms+6ms, total 90ms
D/dalvikvm( 350): GC_EXPLICIT freed 112K, 44% free 5897K/10375K, paused 4ms+7ms, total 96ms
D/dalvikvm( 517): GC_EXPLICIT freed 723K, 64% free 2697K/7363K, paused 3ms+8ms, total 50ms
D/dalvikvm( 350): GC_EXPLICIT freed 113K, 44% free 5896K/10375K, paused 4ms+8ms, total 89ms
D/dalvikvm( 350): GC_EXPLICIT freed 116K, 44% free 5898K/10375K, paused 5ms+8ms, total 89ms
D/dalvikvm( 517): GC_EXPLICIT freed 714K, 64% free 2696K/7363K, paused 6ms+8ms, total 53ms
D/dalvikvm( 350): GC_EXPLICIT freed 114K, 44% free 5897K/10375K, paused 4ms+8ms, total 91ms
D/dalvikvm( 350): GC_EXPLICIT freed 112K, 44% free 5897K/10375K, paused 4ms+8ms, total 90ms
D/dalvikvm( 517): GC_EXPLICIT freed 722K, 64% free 2698K/7363K, paused 3ms+8ms, total 52ms
D/BluetoothAdapterStateMachine( 350): WarmUp process message: 104
E/BluetoothAdapterStateMachine( 350): Bluetooth adapter SDP failed to load
D/abtfilt ( 1276): Got DBus Message ...
D/abtfilt ( 1276): Got DBus Message ...
D/abtfilt ( 1276): Got DBus Message ...
D/abtfilt ( 1276): Got DBus Message ...
D/abtfilt ( 1276): Got DBus Message ...
D/BluetoothEventLoop( 350): Property Changed: UUIDs : 7
E/BluetoothService.cpp( 350): setBluetoothTetheringNative false
E/bluetooth_common.cpp( 350): dbus_func_args_timeout_valist: D-Bus error in Unregister: org.freedesktop.DBus.Error.UnknownMethod (Method "Unregister" with signature "s" on interface "org.bluez.NetworkServer" doesn't exist
E/bluetooth_common.cpp( 350): )
D/BluetoothEventLoop( 350): Property Changed: UUIDs : 6
D/BluetoothEventLoop( 350): Property Changed: UUIDs : 5
D/BluetoothEventLoop( 350): Property Changed: UUIDs : 4
D/BluetoothEventLoop( 350): Property Changed: UUIDs : 3
I/bluedroid( 350): Stopping bluetoothd deamon
D/dalvikvm( 350): GC_EXPLICIT freed 139K, 44% free 5894K/10375K, paused 5ms+10ms, total 97ms
I/bluedroid( 350): Stopping hciattach deamon
D/BluetoothAdapterStateMachine( 350): Bluetooth state 11 -> 10
D/BluetoothAdapterStateMachine( 350): PowerOff process message: 101
D/dalvikvm( 350): GC_EXPLICIT freed 141K, 44% free 5901K/10375K, paused 7ms+9ms, total 105ms
D/DockEventReceiver( 607): finishStartingService: stopping service
D/BluetoothMasReceiver( 1242): Bluetooth STATE CHANGED to 10

Samsung has done some changes in the bluetooth source, but they have just put the whole external/bluetooth folder in their opensource package so I don't know what they have changed in there.

Could some experienced developer help me with this? Thanks :)