Hi,
Currently I'm working on imx8mp with android 11.
We have our bluetooth module rtl8822bu ,which we have connected it to the imx8mp based evk through the mini PCIe port which is internally connected to the USB.
We are trying to bring up the bluetooth module and could see the bt_vendor.conf file under the directory path android_build/hardware/nxp/libbt/conf/nxp/evk_8mp, that is related to UART.
bt_vendor.conf:
mchar_port = /dev/ttymxc0
pFileName_helper = /vendor/firmware/mrvl/helper_uart_3000000.bin
pFileName_image = /vendor/firmware/mrvl/uart8997_bt_v4.bin
baudrate_dl_helper = 115200
baudrate_dl_image = 3000000
iSecondBaudrate = 0
baudrate_fw_init = 115200
baudrate_bt = 3000000
enable_download_fw=0
here we could see the configuration are related to the UART but not to the USB.
What are the changes that has to be done in this bt_vendor.conf file, to bring-up the bluetooth module?
Please provide your inputs.
Thanks.
We're encountering the same issue with the QCA9377 WiFi/BT USB module.
It works successfully on kernel version 5.4.70, but we're facing problems when using it with Android 11.
Could you please share how you resolved this issue?
Thanks and regards,
Deepak Kumar Beniya
Hi @Dhruvit,
Thanks for your support.
We tried configuration changes whatever you provided, but still we are not able to enable bluetooth.
Is there any other way that we can fix this issue,so please provide us.
Thanks,
Hi @ducho7783,
I hope you are doing well.
->Please check File: android_build/device/fsl/
BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_OUT)/drivers/net/
BOARD_HAVE_BLUETOOTH := true
->One can set an early init config file to load the Bluetooth driver on early boot
insmod vendor/lib/modules/hci_uart.ko
->Please make sure the bt_vendor.conf file has a configuration like the below example.
mchar_port = /dev/ttyUSB0
is_uart_port = 1
baudrate_bt = 115200
baudrate_fw_init = 3000000
bd_address = 12:34:56:78:9a:bc
->One can use the below command to enable Bluetooth
adb shell service call bluetooth_manager 6
Thanks & Regards,
Dhruvit Vasavada
Hi @Dhruvit,
Thanks for your response.
Here we are working with btusb driver so we added btintel.ko and btusb.ko in Boardconfig.mk file
BOARD_VENDOR_KERNEL_MODULES += \
$(KERNEL_OUT)/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko \
$(KERNEL_OUT)/drivers/net/wireless/broadcom/brcm80211/brcmutil/brcmutil.ko \
$(KERNEL_OUT)/drivers/bluetooth/btintel.ko\
$(KERNEL_OUT)/drivers/bluetooth/btusb.ko.
And we are using USB so why to add hci_uart.ko ?
we have also configured bt_vendor.conf file as below, which is in the path hardware/nxp/libbt/conf/nxp/evk_8mp/bt_vendor.conf.
mchar_port = /dev/ttyUSB0
is_uart_port = 1
baudrate_bt = 115200
baudrate_fw_init = 3000000
bd_address = 00:0E:8E:BA:9C:C3 
and we tried service call bluetooth_manager 6 but still we are getting the same issue,
phyboard_pollux:/ # [ 130.613196] binder: release 381:381 transaction 102338 in, still active
[ 130.618284] init: Untracked pid 2068 exited with status 0
[ 130.624843] binder: send failed reply for transaction 102338 to 2019:2063
[ 130.625756] init: Service 'vendor.bluetooth-1-0' (pid 381) received signal 6
[ 130.639905] init: Sending signal 9 to service 'vendor.bluetooth-1-0' (pid 381) process group...
[ 130.649573] libprocessgroup: Successfully killed process cgroup uid 1002 pid 381 in 0ms
[ 130.663488] init: Untracked pid 2070 exited with status 0
[ 130.671540] init: starting service 'vendor.bluetooth-1-0'...
[ 132.170331] init: Untracked pid 2077 exited with status 0
[ 132.183551] init: Untracked pid 2080 exited with status 0
[ 132.189615] binder: undelivered death notification, b400fbe68b305430
[ 132.975210] init: Untracked pid 2138 exited with status 0
[ 132.982704] binder: release 2078:2082 transaction 117792 in, still active
[ 132.989946] init: Service 'vendor.bluetooth-1-0' (pid 2078) received signal 6
[ 132.997356] binder: send failed reply for transaction 117792 to 2090:2133
[ 133.803851] binder: undelivered death notification, b400fbe68b304b40
[ 135.033733] binder: release 2203:2204 transaction 134781 in, still active
[ 135.040654] binder: send failed reply for transaction 134781 to 2157:2199
[ 135.817674] init: Untracked pid 2218 exited with status 0
[ 135.829812] init: Untracked pid 2220 exited with status 0
[ 135.852323] binder: undelivered death notification, b400fbe68b305590
[ 137.110735] init: starting service 'vendor.bluetooth-1-0'...
[ 137.119695] init: Control message: Processed ctl.interface_start for 'android.hardware.bluetooth@1.0::IBluetoothHci/default' from pid: 242 (/system/bin/hwservicemanager)
[ 137.135703] init: Control message: Processed ctl.interface_start for 'android.hardware.bluetooth@1.0::IBluetoothHci/default' from pid: 242 (/system/bin/hwservicemanager)
[ 137.229808] init: Untracked pid 2281 exited with status 0
[ 137.233920] binder: release 2275:2275 transaction 150957 in, still active
[ 137.235522] init: Service 'vendor.bluetooth-1-0' (pid 2275) received signal 6
[ 137.249332] init: Sending signal 9 to service 'vendor.bluetooth-1-0' (pid 2275) process group...
[ 137.250210] binder: send failed reply for transaction 150957 to 2229:2271
[ 137.258604] libprocessgroup: Successfully killed process cgroup uid 1002 pid 2275 in 0ms
[ 137.276012] init: Untracked pid 2283 exited with status 0
[ 138.018302] binder: undelivered death notification, b400fbe68b30cff0
[ 139.744951] AidlLazyServiceRegistrar: Trying to shut down the service. No clients in use for any service in process.
[ 139.756441] AidlLazyServiceRegistrar: Unregistered all clients and exiting
[ 139.766204] printk: Binder:310_3: 221 output lines suppressed due to ratelimiting
[ 140.235868] binder: release 2346:2348 transaction 151341 in, still active
[ 140.242779] binder: send failed reply for transaction 151341 to 2300:2342
[ 140.982090] init: Untracked pid 2362 exited with status 0
[ 140.993324] init: Untracked pid 2364 exited with status 0
[ 141.006019] binder: undelivered death notification, b400fbe68b306560
[ 142.256253] init: starting service 'vendor.bluetooth-1-0'...
[ 142.264741] init: Control message: Processed ctl.interface_start for 'android.hardware.bluetooth@1.0::IBluetoothHci/default' from pid: 242 (/system/bin/hwservicemanager)
[ 142.280467] init: Control message: Processed ctl.interface_start for 'android.hardware.bluetooth@1.0::IBluetoothHci/default' from pid: 242 (/system/bin/hwservicemanager)
[ 142.373321] init: Untracked pid 2424 exited with status 0
[ 142.380679] binder: release 2418:2418 transaction 151673 in, still active
[ 142.380978] init: Service 'vendor.bluetooth-1-0' (pid 2418) received signal 6
[ 142.387502] binder: send failed reply for transaction 151673 to 2372:2414
[ 142.401996] init: Sending signal 9 to service 'vendor.bluetooth-1-0' (pid 2418) process group...
[ 142.411619] libprocessgroup: Successfully killed process cgroup uid 1002 pid 2418 in 0ms
[ 142.420565] init: updatable process 'vendor.bluetooth-1-0' exited 4 times in 4 minutes
[ 143.146742] binder: undelivered death notification, b400fbe68b30a080
[ 147.267761] init: starting service 'vendor.bluetooth-1-0'...
Please help us in resolving the issue.
Thanks.
Hi @ducho7783,
I hope you are doing well.
And we are using USB so why add hci_uart.ko?
->It is because the nxp chipset provides wifi and bt support, where wifi is accessible via sdio, PCIe & bt is accessible via uart and that is recommended & for that I recommended.
From the logs, it is seen that the bt service tried to start but it received signal 6 and got dead.
It may be an issue of permission.
Please check with the below command to give all permission to let the service start and nothing can restrict them.
setenforce permissive
Hi @Dhruvit ,
Thanks for your support.
The board that we are using is phycore i.mx 8M plus and we don't have any wifi/bt modules integrated in that.
We are using the separate BT/Wifi module(rtl8822bu) which from the vendor Realtek.
And we tried the way that you have mentioned i.e. setenforce permissive for giving the permission.
Still we stuck with the same issue.
Please help in resolving the issue.
Thanks.
Hi @ducho7783,
I hope you are doing well.
If one is not using NXP Wifi/Bt chipset for the same then one has to integrate that chip with the custom board and for that purpose Please Contact Realtek vendor.
Because It is seen from the logs that the chipset is not getting bonded and that is the reason for its service getting shut down every time.
Please contact the chipset vendor for the same.
Thanks & Regards.
Dhruvit Vasavada
Hi @Dhruvit ,
Thanks for your response,
So as I'm seeing this issue is occurred in android but same thing I did in Linux platform and It is working fine, I loaded same driver and same firmware, even I checked Bluetooth logs from Dmesg that is also same.
See here (both android and linux logs),
///////////////////////////////////////Android logs ///////////////////////////////////////////////////////////////////////////////
phyboard_pollux:/ # dmesg |grep Bluetooth
[ 0.145549] Bluetooth: Core ver 2.22
[ 0.145576] Bluetooth: HCI device and connection manager initialized
[ 0.145585] Bluetooth: HCI socket layer initialized
[ 0.145592] Bluetooth: L2CAP socket layer initialized
[ 0.145599] Bluetooth: SCO socket layer initialized
[ 2.078613] Bluetooth: HCI UART driver ver 2.3
[ 2.083076] Bluetooth: HCI UART protocol H4 registered
[ 2.088223] Bluetooth: HCI UART protocol BCSP registered
[ 2.093577] Bluetooth: HCI UART protocol LL registered
[ 2.098724] Bluetooth: HCI UART protocol ATH3K registered
[ 2.104156] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 2.110670] Bluetooth: HCI UART protocol Broadcom registered
[ 2.116360] Bluetooth: HCI UART protocol QCA registered
[ 2.543073] Bluetooth: RFCOMM TTY layer initialized
[ 2.547968] Bluetooth: RFCOMM socket layer initialized
[ 2.553113] Bluetooth: RFCOMM ver 1.11
[ 2.556871] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 2.562189] Bluetooth: BNEP filters: protocol multicast
[ 2.567441] Bluetooth: BNEP socket layer initialized
[ 2.572420] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 2.578352] Bluetooth: HIDP socket layer initialized
[ 5.287075] Bluetooth: hci0: command 0xfc18 tx timeout
[ 7.582211] Bluetooth: hci1: RTL: examining hci_ver=07 hci_rev=000b lmp_ver=07 lmp_subver=8822
[ 7.596121] Bluetooth: hci1: RTL: rom_version status=0 version=2
[ 7.602203] Bluetooth: hci1: RTL: loading rtl_bt/rtl8822b_fw.bin
[ 7.616147] Bluetooth: hci1: RTL: loading rtl_bt/rtl8822b_config.bin
[ 7.626129] Bluetooth: hci1: RTL: cfg_sz 14, total sz 20270
[ 8.383877] Bluetooth: hci1: RTL: fw version 0xab6b705c
[ 13.283103] Bluetooth: hci0: BCM: failed to write update baudrate (-110)
[ 13.289865] Bluetooth: hci0: Failed to set baudrate
[ 15.299101] Bluetooth: hci0: command 0x0c03 tx timeout
[ 23.523087] Bluetooth: hci0: BCM: Reset failed (-110)
//////////////////////////////////////////////////Linux logs ///////////////////////////////////////////////////////////////////////////
root@phyboard-pollux-imx8mp-2:~#
root@phyboard-pollux-imx8mp-2:~#
root@phyboard-pollux-imx8mp-2:~# dmesg | grep Bluetooth
[ 0.085671] Bluetooth: Core ver 2.22
[ 0.085701] Bluetooth: HCI device and connection manager initialized
[ 0.085709] Bluetooth: HCI socket layer initialized
[ 0.085718] Bluetooth: L2CAP socket layer initialized
[ 0.085731] Bluetooth: SCO socket layer initialized
[ 1.660212] Bluetooth: HCI UART driver ver 2.3
[ 1.664671] Bluetooth: HCI UART protocol H4 registered
[ 1.669816] Bluetooth: HCI UART protocol BCSP registered
[ 1.675165] Bluetooth: HCI UART protocol LL registered
[ 1.680308] Bluetooth: HCI UART protocol ATH3K registered
[ 1.685733] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 1.692124] Bluetooth: HCI UART protocol Broadcom registered
[ 1.697814] Bluetooth: HCI UART protocol QCA registered
[ 1.703047] Bluetooth: HCI UART protocol AG6XX registered
[ 2.187207] Bluetooth: RFCOMM TTY layer initialized
[ 2.192100] Bluetooth: RFCOMM socket layer initialized
[ 2.197263] Bluetooth: RFCOMM ver 1.11
[ 2.201039] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 2.206356] Bluetooth: BNEP filters: protocol multicast
[ 2.211590] Bluetooth: BNEP socket layer initialized
[ 2.216561] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 2.222489] Bluetooth: HIDP socket layer initialized
[ 4.393652] Bluetooth: hci1: RTL: examining hci_ver=07 hci_rev=000b lmp_ver=07 lmp_subver=8822
[ 4.403608] Bluetooth: hci1: RTL: rom_version status=0 version=2
[ 4.409633] Bluetooth: hci1: RTL: loading rtl_bt/rtl8822b_fw.bin
[ 4.420974] Bluetooth: hci1: RTL: loading rtl_bt/rtl8822b_config.bin
[ 4.428100] Bluetooth: hci1: RTL: cfg_sz 14, total sz 20270
[ 5.178236] Bluetooth: hci1: RTL: fw version 0xab6b705c
[ 5.374577] Bluetooth: hci0: command 0xfc18 tx timeout
[ 13.534838] Bluetooth: hci0: BCM: failed to write update baudrate (-110)
[ 13.541560] Bluetooth: hci0: Failed to set baudrate
[ 15.550852] Bluetooth: hci0: command 0x0c03 tx timeout
[ 23.774857] Bluetooth: hci0: BCM: Reset failed (-110)
Can you give some input here basis on this.
Thanks .
Hi @ducho7783,
I hope you are doing well.
Thanks for the clarification. But still, there is Vendor HAL integration is required in Android to make your chipset work.
->Please make sure to add the HAL libraries at the below-given location.
->Edit mek_8q.mk located at “<Android_home>/device/fsl/
->I have shared the example based on the NXP reference, please select realtek HAL libraries and the package that is provided.
For example purpose:-