Hi All,
I am not able to make the Bluetooth controller working on the IMX8M mini evk. I made an fsl-image-machine-test and test the wifi interface without any problem.
Here are the steps I made to make bluetooth working:
root@imx8mmevk: ~# systemctl start bluetooth
root@imx8mmevk: ~# hciconfig hci0 up
Can't get device info: No such device
root@imx8mmevk: ~# bluetoothctl
Agent Registered
[bluetooth]# devices
No default controller available
[bluetooth]# quit
root@imx8mmevk: ~# hciattach /dev/ttymxc2 qca
qca
frame_hci_cmd_pkt: Sending EDL_PATCH_VER_REQ_CMD
HCI-CMD -1: 0x1 0x0 0xfc 0x1 0x19
read_vs_hci_event: Wait for HCI-Vendor Specfic Event from SOC
wait_for_data: Timing out on select for 3 secs.
hci_send_vs_cmd: Failed to get HCI-VS Event from SOC
Failed to attach the patch payload to the Controller!
qca_soc_init: Fail to get Rome Version (0xffffff92)
Initialization timed out.
root@imx8mmevk: ~# dmesg | grep Bluetooth
[ 0.876192] Bluetooth: Core ver 2.22
[ 0.883771] Bluetooth: HCI device and connection manager initialized
[ 0.890162] Bluetooth: HCI socket layer initialized
[ 0.895054] Bluetooth: L2CAP socket layer initialized
[ 0.900144] Bluetooth: SCO socket layer initialized
[ 1.741862] Bluetooth: HCI UART driver ver 2.3
[ 1.746328] Bluetooth: HCI UART protocol H4 registered
[ 1.751475] Bluetooth: HCI UART protocol BCSP registered
[ 1.756796] Bluetooth: HCI UART protocol ATH3K registered
[ 1.762203] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 1.768621] Bluetooth: HCI UART protocol Broadcom registered
[ 1.774293] Bluetooth: HCI UART protocol QCA registered
[ 3.255586] Bluetooth: RFCOMM TTY layer initialized
[ 3.260485] Bluetooth: RFCOMM socket layer initialized
[ 3.265645] Bluetooth: RFCOMM ver 1.11
[ 3.269413] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 3.274734] Bluetooth: BNEP filters: protocol multicast
[ 3.279975] Bluetooth: BNEP socket layer initialized
[ 3.284949] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 3.290883] Bluetooth: HIDP socket layer initialized
root@imx8mmevk: ~# lsmod
Module Size Used by
crc32_ce 16384 0
crct10dif_ce 16384 0
qca9377 4608000 0
root@imx8mmevk: ~#
Anyone can help me?
Thanks
Regards.
Hi Jean
one can check sect,4.12 Bluetooth attached Linux Manual and
IMX Bluetooth Obex - Variscite Wiki
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor,
Thanks for your quick reply and useful information.
I verified my Linux imx kernel config (/proc/configs.gz and .config) and everything seems to be activated:
• CONFIG_SERIAL_IMX=y
• CONFIG_TTY=y
• CONFIG_BT_HCIUART=y
• CONFIG_BT_HCIUART_H4=y
• CONFIG_BT_HCIUART_QCA=y
• CONFIG_BT_HCIUART_BCM=y
• CONFIG_BT=y
• CONFIG_BT_RFCOMM=y
• CONFIG_BT_RFCOMM_TTY=y
• CONFIG_BT_BNEP=y
• CONFIG_BT_BNEP_MC_FILTER=y
• CONFIG_BT_BNEP_PROTO_FILTER=y
• CONFIG_BT_HIDP=y
here is the output of dmesg:
$ dmesg | grep -i Bluetooth Bluetooth: Core ver 2.22 Bluetooth: HCI device and connection manager initialized Bluetooth: HCI socket layer initialized Bluetooth: L2CAP socket layer initialized Bluetooth: SCO socket layer initialized Bluetooth: HCI UART driver ver 2.3 Bluetooth: HCI UART protocol H4 registered Bluetooth: HCI UART protocol BCSP registered Bluetooth: HCI UART protocol ATH3K registeredBluetooth: HCI UART protocol Three-wire (H5) registered Bluetooth: HCI UART protocol Broadcom registered Bluetooth: HCI UART protocol QCA registeredBluetooth: RFCOMM TTY layer initialized Bluetooth: RFCOMM socket layer initialized Bluetooth: RFCOMM ver 1.11 Bluetooth: BNEP (Ethernet Emulation) ver 1.3 Bluetooth: BNEP filters: protocol multicast Bluetooth: BNEP socket layer initialized Bluetooth: HIDP (Human Interface Emulation) ver 1.2 Bluetooth: HIDP socket layer initialized
my lsmod returns the kernel module qca9377 as expected and bluez5 is included.
My mistake! Bluetooth chip is not connected to /dev/ttymxc2 but /dev/ttymxc0. Now hciattach make the setup complete.
Thanks for your help.
Regards.
Hi Jean,
I am using iMX8MM DDR4 EVK . But the hciattach of both the ttymxc is not successful. Am i missing somethign here? could you please help. thaks
root@imx8mmevk:~# hciattach /dev/ttymxc0 qca
qca
frame_hci_cmd_pkt: Sending EDL_PATCH_VER_REQ_CMD
HCI-CMD -1: 0x1 0x0 0xfc 0x1 0x19
read_vs_hci_event: Wait for HCI-Vendor Specfic Event from SOC
wait_for_data: HCI-VS-EVENT available in TTY Serial buffer
read_vs_hci_event: Wait for HCI-Vendor Specfic Event from SOC, buf[0] - 0x4
It is not VS event !!
hci_send_vs_cmd: Failed to get HCI-VS Event from SOC
Failed to attach the patch payload to the Controller!
qca_soc_init: Fail to get Rome Version (0xffffff92)
Can't initialize device: Success
Regards,
Raajesh K
Hi Raajesh,
The right ttymxc to choose to make bluetooth controller working is defined in the device tree of the IMX8MM in Yocto environment. I don't remember the exact location of the file in the Yocto environment but try to find fsl-imx8mm.dts(i) file in sources. The corresponding ttymxc has to be defined with status = "okay".
Maybe this can help you to find the device tree of imx8mm platform:
"The device tree for file each boot variation is specified in the machine configuration files in the arch/arm/dts directory."
Hope It can help you.
Regards,
Jean
Hi
I am facing the same issues with my IMX8M Mini board. I have tried doing everything on this thread, one thing i am not able to do, is using hciattach command. I suspect i am doing something wrong. Since i am very new to this, can someone please elaborate on using the hciattach command to turn bluetooth ON? I get the following error when i try to run the hciattach command.
evk_8mm:/ #
evk_8mm:/ # hciattach
/system/bin/sh: hciattach: not found
127|evk_8mm:/ # hciattach /dev/ttymxc2 qca
/system/bin/sh: hciattach: not found
Regards
Abdu