[SOLVED] Bluetooth not working

@anon88919003 any ideas?

SSH to your device and execute the following 2 commands and paste the output.

killall -9 hciattach
/usr/bin/hciattach -n -s 115200 /dev/ttyS1 bcm43xx 2000000

You should see something similar to the following…

CoreELEC:~ # killall -9 hciattach
CoreELEC:~ # /usr/bin/hciattach -n -s 115200 /dev/ttyS1 bcm43xx 2000000
bcm43xx_init
Flash firmware /etc/firmware/brcm/BCM4359C0.hcd
Set Controller UART speed to 2000000 bit/s
Device setup complete
1 Like

udevadm info /sys/bus/sdio/devices/sdi*
P: /devices/d0070000.sdio/mmc_host/sdio/sdio:0001/s
dio:0001:1
L: 0
E: DEVPATH=/devices/d0070000.sdio/mmc_host/sdio/sdi
o:0001/sdio:0001:1
E: DRIVER=bcmsdh_sdmmc
E: SDIO_CLASS=00
E: SDIO_ID=02D0:4334
E: MODALIAS=sdio:c00v02D0d4334
E: SUBSYSTEM=sdio
E: USEC_INITIALIZED=16437450
E: SYSTEMD_WANTS=brcmfmac_sdio-firmware-aml.service
E: TAGS=:systemd:

P: /devices/d0070000.sdio/mmc_host/sdio/sdio:0001/s
dio:0001:2
L: 0
E: DEVPATH=/devices/d0070000.sdio/mmc_host/sdio/sdi
o:0001/sdio:0001:2
E: DRIVER=bcmsdh_sdmmc
E: SDIO_CLASS=00
E: SDIO_ID=02D0:4334
E: MODALIAS=sdio:c00v02D0d4334
E: SUBSYSTEM=sdio
E: USEC_INITIALIZED=16432762
E: SYSTEMD_WANTS=brcmfmac_sdio-firmware-aml.service
E: TAGS=:systemd:

CoreELEC (official): nightly_20190923 (Amlogic.arm)
CoreELEC:~ # killall -9 hciattach
CoreELEC:~ # /usr/bin/hciattach -n -s 115200 /dev/
ttyS1 bcm43xx 2000000
bcm43xx_init
and nothing more than

dmesg
[ 1398.345105@7] Bluetooth: hci0 sending frame fail
ed
[ 1466.500250@3] meson_uart c11084c0.serial: ttyS1
use xtal(8M) 24000000 change 2000000 to 2000000
[ 1466.500330@3] meson_uart c11084c0.serial: ttyS1
use xtal(8M) 24000000 change 2000000 to 115200

… the same (Mecool KIII Pro - CoreELEC 9.2.0 in internal storage)

1 Like

@cubimol try to execute the hciattach command twice, sometimes it needs an extra pass to work.

Nothing, still not working

In the systemctl listing I see ‘Broadcom sdio firmware update’ failed

  sys-devices-c11084c0.serial-tty-ttyS1.device   loaded active plugged   /sys/devices/c11084c0.serial/tty/ttyS1
  sys-devices-c81004c0.serial-tty-ttyS0.device   loaded active plugged   /sys/devices/c81004c0.serial/tty/ttyS0
  ...
  avahi-daemon.service                           loaded active running   Avahi Daemon                          
  bluetooth.service                              loaded active running   Bluetooth service                     
● brcmfmac_sdio-firmware-aml.service             loaded failed failed    Broadcom sdio firmware update         
● wetekdvb.service                               loaded failed failed    WeTek DVB module loader               
  ...

Try the following then…

systemctl mask brcmfmac_sdio-firmware-aml
reboot

Then the above commands again.

It also doesn’t work, with the previous versions of CoreELEC 9.0.x it worked.

CoreELEC:~ # /usr/bin/hciattach -n -s 115200 /dev/ttyS1 bcm43xx 2000000
bcm43xx_init
Patch not found for chip BCM4335A0, continue anyway
Set Controller UART speed to 2000000 bit/s
Device setup complete

I have the same problem on my mecool k2 pro s905d.
on 9.0.3 everything was ok, but on 9.2. bluetoothe does not work.
How to fix it ?

@cubimol thanks for this, I have now found the issue.

Firstly revert the previous change I told you to make with the following command.

systemctl unmask brcmfmac_sdio-firmware-aml

Then execute.

echo "ln -s /usr/lib/kernel-overlays/base/lib/firmware/brcm/BCM4335_V0343.0353.hcd /var/lib/firmware/brcm/BCM4335AO.hcd" >> /storage/.config/autostart.sh
reboot

Your bluetooth should come back up now.

The fix has been pushed to our repository so you will be able to remove the above line from autostart.sh in the future.

1 Like

What about BCM4334?

Execute

systemctl mask brcmfmac_sdio-firmware-aml
reboot
/usr/bin/hciattach -n -s 115200 /dev/ttyS1 bcm43xx 2000000

Paste the output here.

Stuck on
bcm43xx_init
Flash firmware /etc/firmware/brcm/BCM4334B0.hcd
Set Controller UART speed to 2000000 bit/s
Device setup complete

There is no reason your device should not be working as the firmware is there.

Revert the previous command with the following.

systemctl unmask brcmfmac_sdio-firmware-aml
reboot

When your device comes back up paste the output of hciconfig -a.

hciconfig -a
hci0: Type: Primary Bus: UART
BD Address: 43:34:B0:00:1F:AC ACL MTU: 102
1:8 SCO MTU: 64:1
UP RUNNING PSCAN
RX bytes:761 acl:0 sco:0 events:53 errors:0
TX bytes:3315 acl:0 sco:0 commands:53 error
s:0
Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7
b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV
2 HV3
Link policy: RSWITCH SNIFF
Link mode: SLAVE ACCEPT
Name: ‘CoreELEC’
Class: 0x0c0000
Service Classes: Rendering, Capturing
Device Class: Miscellaneous,
HCI Version: 4.0 (0x6) Revision: 0x6b6
LMP Version: 4.0 (0x6) Subversion: 0x410d
Manufacturer: Broadcom Corporation (15)
Strange but now it works! Cheers!

Great, thank you !

Will it work even for MeCool KIII?

And please for “just one code post solution” to be perfectly clear for everyone :slight_smile:

for my macool kii s905d not work :frowning:

likewise, also for my KII no bluetooth yet …

It still doesn’t work on my Mecool KIII Pro… I have canceled all changes and left the clean boot version. It seems that the bluetooth hardware requires the firmware version bcm4335b0 according to this:

CoreELEC:~ # lspci -nnk | grep -iA2 net; lsusb; hciconfig -a; dmesg | egrep -i 'blue|firm'
-sh: lspci: not found
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 043e:70f5 LG Electronics USA, Inc. External HDD
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
hci0:   Type: Primary  Bus: UART
        BD Address: 2A:xx:xx:xx:5E:C5  ACL MTU: 1021:8  SCO MTU: 64:1
        UP RUNNING PSCAN
        RX bytes:719 acl:0 sco:0 events:47 errors:0
        TX bytes:3269 acl:0 sco:0 commands:47 errors:0
        Features: 0xbf 0xfe 0xcf 0xff 0xdf 0xff 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH SNIFF
        Link mode: SLAVE ACCEPT
        Name: 'CoreELEC'
        Class: 0x0c0000
        Service Classes: Rendering, Capturing
        Device Class: Miscellaneous,
        HCI Version: 4.0 (0x6)  Revision: 0x0
        LMP Version: 4.0 (0x6)  Subversion: 0x4106
        Manufacturer: Broadcom Corporation (15)

[    7.746383@2] kernel-overlays-setup: added firmware from /usr/lib/kernel-overlays/base/lib/firmware
[   13.434632@7] dhd_conf_set_conf_path_by_nv_path: config_path=/usr/lib/firmware/brcm/config.txt
[   13.434837@7] dhd_os_open_image: /usr/lib/firmware/brcm/config.txt (425 bytes) open success
[   13.467916@5] Bluetooth: Core ver 2.18
[   13.468147@5] Bluetooth: HCI device and connection manager initialized
[   13.468184@5] Bluetooth: HCI socket layer initialized
[   13.468195@5] Bluetooth: L2CAP socket layer initialized
[   13.468232@5] Bluetooth: SCO socket layer initialized
[   13.469164@5] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[   13.807211@3] Bluetooth: HCI UART driver ver 2.2
[   13.807222@3] Bluetooth: HCI H4 protocol initialized
[   13.807226@3] Bluetooth: HCI BCSP protocol initialized
[   13.807229@3] Bluetooth: HCILL protocol initialized
[   13.807232@3] Bluetooth: HCIATH3K protocol initialized
[   13.807236@3] Bluetooth: HCI Three-wire UART (H5) protocol initialized
[   13.881933@7] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   13.881950@7] Bluetooth: BNEP filters: protocol multicast
[   13.881987@7] Bluetooth: BNEP socket layer initialized
[   14.911720@7] dhd_os_open_image: /usr/lib/firmware/brcm/config.txt (425 bytes) open success
[   14.914027@7] dhd_conf_set_fw_name_by_chip: firmware_path=/usr/lib/firmware/brcm/fw_bcm4335b0_ag.bin
[   14.914033@7] dhd_conf_set_nv_name_by_chip: nvram_path=/usr/lib/firmware/brcm/nvram_bcm4335.txt
[   14.914039@7] dhdsdio_download_firmware: set use_rxchain 0
[   14.914043@7] dhdsdio_download_firmware: set txglomsize 36
[   14.914048@7] Final fw_path=/usr/lib/firmware/brcm/fw_bcm4335b0_ag.bin
[   14.914052@7] Final nv_path=/usr/lib/firmware/brcm/nvram_bcm4335.txt
[   14.914057@7] Final conf_path=/usr/lib/firmware/brcm/config.txt
[   14.914854@7] dhd_os_open_image: /usr/lib/firmware/brcm/fw_bcm4335b0_ag.bin (607156 bytes) open success
[   14.984775@5] dhd_os_open_image: /usr/lib/firmware/brcm/nvram_bcm4335.txt (3289 bytes) open success
[   15.141998@7] Firmware up: op_mode=0x0015, MAC=40:xx:xx:xx:62:e7
[   15.212641@5] Firmware version = wl0: May 18 2014 16:56:54 version 6.34.171.58.2
[   15.212655@5]   Firmware: wl0: May 18 2014 16:56:54 version 6.34.171.58.2
[   15.352532@5] i2c i2c-2: Load avl6862 firmware patch for DVB-S/S2 size=44108