Built-in Bluetooth not working.


  • Hello, I'm trying to enable the built-in Bluetooth, but I was not able to do it. I can see on the schematics that the Bluetooth is connected to uart1, and the WiFi is connected to the SDIO. 
    I can use WiFi without any issue, but every time I try to use bluetoothctl, I get the message: "Waiting to connect to Bluetooth... "
    Executing hciconfig reports nothing, and connmanctl enable Bluetooth responds with a: "bluetooth is not available".
    I tried to execute hciattach -n /dev/ttymxc1 any 115200 noflow nosleep, but i can see on the logs the following errors: "Bluetooth: hci0: command 0x1003 tx timeout, Bluetooth: hci0: command 0x1001 tx timeout, Bluetooth: hci0: command 0x1009 tx timeout".

    Any idea of the procedure to enable Bluetooth? 



  • Dear @André Campos, Enter it as a "root" and follow the instructions below to enable Bluetooth.

    Bluetooth boot messages

    # dmesg | grep -i Bluetooth
    

    Start and Enable Bluetooth service

    # systemctl enable bluetooth.service
    # systemctl start bluetooth.service
    

    Device identification

    # hciconfig hci0 up
    # hciconfig
    # hcitool dev
    # hcitool --help

    To connect a device, follow these steps:

    # bluetoothctl
    [bluetooth]# power on
    [bluetooth]# default-agent
    [bluetooth]# pairable on
    [bluetooth]# scan on

    You can verify the status of the Bluetooth service startup by using the following command

    # systemctl status bluetooth
    

  • Hello @Kothandaraman Kannadasan 

    First of all, thank you for your reply.

    Here are the command's results of what you send to execute:


    dmesg | grep -i Bluetooth
    "
    [    0.112085] Bluetooth: Core ver 2.22
    [    0.112112] NET: Registered PF_BLUETOOTH protocol family
    [    0.112118] Bluetooth: HCI device and connection manager initialized
    [    0.112127] Bluetooth: HCI socket layer initialized
    [    0.112137] Bluetooth: L2CAP socket layer initialized
    [    0.112153] Bluetooth: SCO socket layer initialized
    [    1.657555] Bluetooth: HCI UART driver ver 2.3
    [    1.662022] Bluetooth: HCI UART protocol H4 registered
    [    1.667168] Bluetooth: HCI UART protocol BCSP registered
    [    1.672509] Bluetooth: HCI UART protocol LL registered
    [    1.677654] Bluetooth: HCI UART protocol ATH3K registered
    [    1.683072] Bluetooth: HCI UART protocol Three-wire (H5) registered
    [    1.689450] Bluetooth: HCI UART protocol Broadcom registered
    [    1.695135] Bluetooth: HCI UART protocol QCA registered
    [    2.114496] Bluetooth: RFCOMM TTY layer initialized
    [    2.119391] Bluetooth: RFCOMM socket layer initialized
    [    2.124567] Bluetooth: RFCOMM ver 1.11
    [    2.128328] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
    [    2.133646] Bluetooth: BNEP filters: protocol multicast
    [    2.138879] Bluetooth: BNEP socket layer initialized
    [    2.143847] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
    [    2.149779] Bluetooth: HIDP socket layer initialized
    "
    I was able to enable and start the Bluetooth service:
    "root@lec-imx8mp:~# systemctl enable bluetooth.service
    [   79.108886] systemd-sysv-generator[1233]: SysV service '/etc/init.d/umountnfs.sh' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to in.
    [   79.133940] systemd-sysv-generator[1233]: SysV service '/etc/init.d/save-rtc.sh' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to inc.
    [   79.158896] systemd-sysv-generator[1233]: SysV service '/etc/init.d/sendsigs' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to includ.
    [   79.183036] systemd-sysv-generator[1233]: SysV service '/etc/init.d/umountfs' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to includ.
    [   79.207355] systemd-sysv-generator[1233]: SysV service '/etc/init.d/halt' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include a .
    [   79.231141] systemd-sysv-generator[1233]: SysV service '/etc/init.d/reboot' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include .
    [   79.255091] systemd-sysv-generator[1233]: SysV service '/etc/init.d/rc.local' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to includ.
    [   79.279180] systemd-sysv-generator[1233]: SysV service '/etc/init.d/single' lacks a native systemd unit file. Automatically generating a unit file for compatibility. Please update package to include ."

    And I can see that the service is running without any error message:

     

    "Apr 28 17:43:49 lec-imx8mp systemd[1]: Starting Bluetooth service...
    Apr 28 17:43:49 lec-imx8mp bluetoothd[1260]: Bluetooth daemon 5.64
    Apr 28 17:43:49 lec-imx8mp systemd[1]: Started Bluetooth service.
    Apr 28 17:43:49 lec-imx8mp bluetoothd[1260]: Starting SDP server
    Apr 28 17:43:49 lec-imx8mp bluetoothd[1260]: Bluetooth management interface 1.21 initialized
    "

    However, I can't bring hci0 up, since it is not found:
    "root@lec-imx8mp:~# hciconfig hci0 up
    Can't get device info: No such device"

    Executing hcitool dev does not show any available device.

    As you can see, the Bluetooth device is not found, any idea of what the causes can be? I am using the provided kirkstone image provided on the download page. I also tried to use the provided debian image and compile one using Yocto. However, the results were always the same. Any ideas of what may be missing?


Please login to reply this topic!