Hi,
We are trying to bring up bluetooth on IMX8MP board over UART1.
Added into Kernel command line:
BOARD_KERNEL_CMDLINE += androidboot.bt_uart=/dev/ttymxc0 androidboot.btmacaddr=2f:0b:a1:aa:bf:04
Added UART into device tree.
When we try to enable the bluetooth on Android UI, we are getting the following crash on logcat,
07-20 09:04:13.504 2066 2093 E bt_btif_config: Config is missing adapter section
07-20 09:04:13.504 2066 2093 E droid.bluetoot: [0720/090413.504592:ERROR:config.cc(104)] config_new: unable to open file '/data/misc/bluedroid/bt_config.bak': No such file or directory
07-20 09:04:13.504 2066 2093 E bt_btif_config_transcode: btif_config_transcode unable to load XML file '/data/misc/bluedroid/bt_config.xml': 3
07-20 09:04:13.504 2066 2093 E bt_btif_config: init unable to transcode legacy file; creating empty config.
07-20 09:04:13.511 2066 2098 E bt_btif_storage: btif_storage_get_adapter_property: Controller not ready! Unable to return Bluetooth Address
07-20 09:04:13.511 2066 2098 E BluetoothServiceJni: adapter_properties_callback: Status 1 is incorrect
07-20 09:04:16.555 2066 2096 E bt_hci : startup_timer_expired
--------- beginning of crash
07-20 09:04:16.556 391 418 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 418 (HwBinder:391_2), pid 391 (bluetooth@1.0-s)
07-20 09:04:16.608 2116 2116 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-20 09:04:16.609 2116 2116 F DEBUG : Build fingerprint: 'Android/evk_8mp/evk_8mp:11/RQ1A.201205.003/eng.adlink.20220708.175229:userdebug/dev-keys'
07-20 09:04:16.609 2116 2116 F DEBUG : Revision: '0'
07-20 09:04:16.609 2116 2116 F DEBUG : ABI: 'arm64'
07-20 09:04:16.610 2116 2116 F DEBUG : Timestamp: 2022-07-20 09:04:16+0000
07-20 09:04:16.610 2116 2116 F DEBUG : pid: 391, tid: 418, name: HwBinder:391_2 >>> /vendor/bin/hw/android.hardware.bluetooth@1.0-service <<<
07-20 09:04:16.610 2116 2116 F DEBUG : uid: 1002
07-20 09:04:16.610 2116 2116 F DEBUG : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
07-20 09:04:16.610 2116 2116 F DEBUG : x0 0000000000000000 x1 00000000000001a2 x2 0000000000000006 x3 0000ffcbe7758520
07-20 09:04:16.610 2116 2116 F DEBUG : x4 fefeff282764726e x5 fefeff282764726e x6 fefeff282764726e x7 7f7f7f7f7f7f7f7f
07-20 09:04:16.610 211[ 2182.018593] init: Untracked pid 2116 exited with status 0
6 2116 F DEBUG : x8 00000[ 2182.026796] binder: release 391:391 transaction 105596 in, still active
000000000f0 x9 0000ffcdf8d3b800[ 2182.026946] init: Service 'vendor.bluetooth-1-0' (pid 391) received signal 6
x10 ffffff80ffffffdf x11 00000[ 2182.036107] binder: send failed reply for transaction 105596 to 2066:2111
00000000001
07-20 09:04:16.610 [ 2182.046212] init: Sending signal 9 to service 'vendor.bluetooth-1-0' (pid 391) process group...
2116 2116 F DEBUG : x12 00[ 2182.068388] libprocessgroup: Successfully killed process cgroup uid 1002 pid 391 in 0ms
00ffcbe7758010 x13 0000000000000[ 2182.071067] binder: release 391:418 transaction 107716 in, still active
016 x14 0000ffcbe7758198 x15 00[ 2182.079000] init: Untracked pid 2118 exited with status 0
0000007d000000
07-20 09:04:16.61[ 2182.087465] binder: send failed reply for transaction 107716 to 2066:2096
0 2116 2116 F DEBUG : x16[ 2182.099349] init: starting service 'vendor.bluetooth-1-0'...
0000ffcdf8dd4c80 x17 0000ffcdf8db63c0 x18 0000ffcbe73fc000 x19 00000000000000ac
07-20 09:04:16.610 2116 2116 F DEBUG : x20 0000000000000187 x21 00000000000000b2 x22 00000000000001a2 x23 00000000ffffffff
07-20 09:04:16.611 2116 2116 F DEBUG : x24 0000ffcbe7759000 x25 0000ffcbe7758998 x26 0000ffcbe7759000 x27 0000000000000000
07-20 09:04:16.611 2116 2116 F DEBUG : x28 00000000000fc000 x29 0000ffcbe77585a0
07-20 09:04:16.611 2116 2116 F DEBUG : lr 0000ffcdf8d69544 sp 0000ffcbe7758500 pc 0000ffcdf8d69574 pst 0000000000000000
07-20 09:04:16.633 2116 2116 F DEBUG : backtrace:
07-20 09:04:16.633 2116 2116 F DEBUG : #00 pc 000000000004e574 /apex/com.android.runtime/lib64/bionic/libc.so (abort+180) (BuildId: f81965d884d6ebc5e5c3fd825c17a209)
07-20 09:04:16.633 2116 2116 F DEBUG : #01 pc 00000000000079f0 /vendor/lib64/hw/android.hardware.bluetooth@1.0-impl.so (std::__1::__throw_bad_function_call()+8) (BuildId: e0b742ea3831890d06f5)
07-20 09:04:16.633 2116 2116 F DEBUG : #02 pc 0000000000006900 /vendor/lib64/hw/android.hardware.bluetooth@1.0-impl.so (android::hardware::bluetooth::V1_0::implementation::BluetoothHci::close)
07-20 09:04:16.633 2116 2116 F DEBUG : #03 pc 0000000000013558 /apex/com.android.vndk.v30/lib64/android.hardware.bluetooth@1.0.so (android::hardware::bluetooth::V1_0::BnHwBluetoothHci::_hidl_)
07-20 09:04:16.633 2116 2116 F DEBUG : #04 pc 0000000000013964 /apex/com.android.vndk.v30/lib64/android.hardware.bluetooth@1.0.so (android::hardware::bluetooth::V1_0::BnHwBluetoothHci::onTran)
07-20 09:04:16.633 2116 2116 F DEBUG : #05 pc 0000000000094ae8 /apex/com.android.vndk.v30/lib64/libhidlbase.so (android::hardware::BHwBinder::transact(unsigned int, android::hardware::Parcel )
07-20 09:04:16.633 2116 2116 F DEBUG : #06 pc 0000000000098b9c /apex/com.android.vndk.v30/lib64/libhidlbase.so (android::hardware::IPCThreadState::getAndExecuteCommand()+1076) (BuildId: a108a)
07-20 09:04:16.633 2116 2116 F DEBUG : #07 pc 0000000000099df8 /apex/com.android.vndk.v30/lib64/libhidlbase.so (android::hardware::IPCThreadState::joinThreadPool(bool)+96) (BuildId: a108af492)
07-20 09:04:16.633 2116 2116 F DEBUG : #08 pc 00000000000a8ff0 /apex/com.android.vndk.v30/lib64/libhidlbase.so (android::hardware::PoolThread::threadLoop()+24) (BuildId: a108af492dfd57b616484)
07-20 09:04:16.633 2116 2116 F DEBUG : #09 pc 000000000001567c /apex/com.android.vndk.v30/lib64/libutils.so (android::Thread::_threadLoop(void*)+260) (BuildId: d1997a8c7b581c47382e2b8064338bf)
07-20 09:04:16.634 2116 2116 F DEBUG : #10 pc 0000000000014f14 /apex/com.android.vndk.v30/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+412) (BuildId: d1997a8c7b581c47382)
07-20 09:04:16.634 2116 2116 F DEBUG : #11 pc 00000000000b0c08 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: f81965d884d6ebc5e5c3fd825c17a209)
07-20 09:04:16.634 2116 2116 F DEBUG : #12 pc 00000000000505d0 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: f81965d884d6ebc5e5c3fd825c17a209)
07-20 09:04:16.697 374 374 E tombstoned: Tombstone written to: /data/tombstones/tombstone_00
07-20 09:04:16.738 2066 2111 F HidlStatus: Status.cpp:143] Failed HIDL return status not checked. Usually this happens because of a transport error (error parceling, binder driver, or from unparceling'
07-20 09:04:16.738 2066 2111 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 2111 (bt_hci_thread), pid 2066 (droid.bluetooth)
07-20 09:04:16.788 2066 2096 E bt_hci : hci_close: Error closing the Bluetooth HAL
07-20 09:04:16.836 2125 2125 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-20 09:04:16.836 2125 2125 F DEBUG : Build fingerprint: 'Android/evk_8mp/evk_8mp:11/RQ1A.201205.003/eng.adlink.20220708.175229:userdebug/dev-keys'
07-20 09:04:16.837 2125 2125 F DEBUG : Revision: '0'
07-20 09:04:16.837 2125 2125 F DEBUG : ABI: 'arm64'
07-20 09:04:16.837 2125 2125 F DEBUG : Timestamp: 2022-07-20 09:04:16+0000
07-20 09:04:16.837 2125 2125 F DEBUG : pid: 2066, tid: 2111, name: bt_hci_thread >>> com.android.bluetooth <<<
07-20 09:04:16.837 2125 2125 F DEBUG : uid: 1002
07-20 09:04:16.837 2125 2125 F DEBUG : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
07-20 09:04:16.838 2125 2125 F DEBUG : Abort message: 'Failed HIDL return status not checked. Usually this happens because of a transport error (error parceling, binder driver, or from unparceling).'
07-20 09:04:16.838 2125 2125 F DEBUG : x0 0000000000000000 x1 000000000000083f x2 0000000000000006 x3 0000e1bfc28f52b0
07-20 09:04:16.838 2125 2125 F DEBUG : x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 7f7f7f7f7f7f7f7f
07-20 09:04:16.838 2125 2125 F DEBUG : x8 00000000000000f0 x9 0000e1c24dc21800 x10 ffffff80fffffbdf x11 0000000000000001
07-20 09:04:16.838 2125 2125 F DEBUG : x12 0000e1bfc28f4160 x13 00000000000001a6 x14 0000e1bfc28f4210 x15 000000007d000000
07-20 09:04:16.838 2125 2125 F DEBUG : x16 0000e1c24dcbac80 x17 0000e1c24dc9c3c0 x18 0000e1bfc263a020 x19 00000000000000ac
07-20 09:04:16.838 2125 2125 F DEBUG : x20 0000000000000812 x21 00000000000000b2 x22 000000000000083f x23 00000000ffffffff
07-20 09:04:16.838 2125 2125 F DEBUG : x24 00000000746c7561 x25 0000e1bfc28f6000 x26 b400e1c0fc258848 x27 0000e1bfd31747b8
07-20 09:04:16.838 2125 2125 F DEBUG : x28 0000e1c03c1b7000 x29 0000e1bfc28f5330
07-20 09:04:16.838 2125 2125 F DEBUG : lr 0000e1c24dc4f544 sp 0000e1bfc28f5290 pc 0000e1c24dc4f574 pst 0000000000000000
07-20 09:04:16.924 2125 2125 F DEBUG : backtrace:
07-20 09:04:16.925 2125 2125 F DEBUG : #00 pc 000000000004e574 /apex/com.android.runtime/lib64/bionic/libc.so (abort+180) (BuildId: f81965d884d6ebc5e5c3fd825c17a209)
07-20 09:04:16.925 2125 2125 F DEBUG : #01 pc 00000000005647e8 /apex/com.android.art/lib64/libart.so (art::Runtime::Abort(char const*)+2320) (BuildId: 07e9d1b6c845ed0756a71370c009243a)
07-20 09:04:16.925 2125 2125 F DEBUG : #02 pc 0000000000013ab0 /system/lib64/libbase.so (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+80) (B)
07-20 09:04:16.925 2125 2125 F DEBUG : #03 pc 0000000000013090 /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+320) (BuildId: 6d398535cd6d9315930f056432520bb9)
07-20 09:04:16.925 2125 2125 F DEBUG : #04 pc 000000000005440c /system/lib64/libhidlbase.so (android::hardware::details::return_status::assertOk() const+236) (BuildId: 525e3e8749b695911bbea61)
07-20 09:04:16.925 2125 2125 F DEBUG : #05 pc 0000000000054450 /system/lib64/libhidlbase.so (android::hardware::details::return_status::~return_status()+48) (BuildId: 525e3e8749b695911bbea612)
07-20 09:04:16.925 2125 2125 F DEBUG : #06 pc 00000000002665f0 /system/lib64/libbluetooth.so (hci_initialize()+864) (BuildId: 1386fc50507bfea1c9b40e68d9f361ca)
07-20 09:04:16.925 2125 2125 F DEBUG : #07 pc 000000000009e8a0 /system/lib64/libchrome.so (base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*)+192) (BuildId: c0d8f6d7d8e62550)
07-20 09:04:16.925 2125 2125 F DEBUG : #08 pc 00000000000bf024 /system/lib64/libchrome.so (base::MessageLoop::RunTask(base::PendingTask*)+324) (BuildId: c0d8f6d7d8e625506d14a3ec12a127cc)
07-20 09:04:16.925 2125 2125 F DEBUG : #09 pc 00000000000bf3d0 /system/lib64/libchrome.so (base::MessageLoop::DoWork()+464) (BuildId: c0d8f6d7d8e625506d14a3ec12a127cc)
07-20 09:04:16.925 2125 2125 F DEBUG : #10 pc 00000000000c0bd0 /system/lib64/libchrome.so (base::MessagePumpDefault::Run(base::MessagePump::Delegate*)+104) (BuildId: c0d8f6d7d8e625506d14a3ec1)
07-20 09:04:16.926 2125 2125 F DEBUG : #11 pc 00000000000e3274 /system/lib64/libchrome.so (base::RunLoop::Run()+84) (BuildId: c0d8f6d7d8e625506d14a3ec12a127cc)
07-20 09:04:16.926 2125 2125 F DEBUG : #12 pc 00000000001a3494 /system/lib64/libbluetooth.so (bluetooth::common::MessageLoopThread::Run(std::__1::promise<void>)+268) (BuildId: 1386fc50507bfea)
07-20 09:04:16.926 2125 2125 F DEBUG : #13 pc 00000000001a2fd8 /system/lib64/libbluetooth.so (bluetooth::common::MessageLoopThread::RunThread(bluetooth::common::MessageLoopThread*, std::__1::)
07-20 09:04:16.926 2125 2125 F DEBUG : #14 pc 00000000001a399c /system/lib64/libbluetooth.so (void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, st)
07-20 09:04:16.926 2125 2125 F DEBUG : #15 pc 00000000000b0c08 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: f81965d884d6ebc5e5c3fd825c17a209)
07-20 09:04:16.926 2125 2125 F DEBUG : #16 pc 00000000000505d0 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: f81965d884d6ebc5e5c3fd825c17a209)
07-20 09:04:17.614 2066 2090 E AdapterState: BLE_TURNING_ON : BLE_START_TIMEOUT
07-20 09:04:18.372 374 374 E tombstoned: Tombstone written to: /data/tombstones/tombstone_01
[ 2183.736418] init: Untracked pid 2125 exited with status 0
[ 2183.750869] init: Untracked pid 2128 exited with status 0
07-20 09:04:18.456 565 601 E BluetoothManagerService: MESSAGE_BLUETOOTH_SERVICE_DISCONNECTED(1)
Please share your inputs.
Thanks,
Hariharan.V.