RPi 3 Bluetooth isn't working

  • LibreELEC version 6.90.004 7.0

    Raspberry Pi 3

    I would like to use my keyboard using the bluetooth module of the raspberry, but it seems it doesn't work.

    Confirmed here:
    LibreELEC

    Edited once, last by Soringo (April 2, 2016 at 3:10 PM).

  • So, after a lot of comparing the commits between OE and LE without finding anything helpfull I started a shot in the dark and replaced the bootloader and dtb files from LE with the one from OE, and Bluetooth started working. So I did a binary compare and found that the only file that differs between OE and LE is "bcm2710-rpi-3-b.dtb". So something is wrong with the bcm2710-rpi-3-b.dtb file used by LE.

    As a workaround you can download the OE 7 beta tar file, extract the bcm2710-rpi-3-b.dtb from it's "3rdparty/bootloader" directory and replace the one on the SD card with it.


  • So, after a lot of comparing the commits between OE and LE without finding anything helpfull I started a shot in the dark and replaced the bootloader and dtb files from LE with the one from OE, and Bluetooth started working. So I did a binary compare and found that the only file that differs between OE and LE is "bcm2710-rpi-3-b.dtb". So something is wrong with the bcm2710-rpi-3-b.dtb file used by LE.

    As a workaround you can download the OE 7 beta tar file, extract the bcm2710-rpi-3-b.dtb from it's "3rdparty/bootloader" directory and replace the one on the SD card with it.

    Thank you.
    I hope libreELEC developers read you ;)
    I've passed through dietpi, xbian, osmc, openelec, and now I am here. I hope to find a home soon.

    Best regards.

    Edited once, last by Soringo (April 3, 2016 at 8:36 PM).


  • Thank you.

    No problem.

    @Developers
    I'm pretty sure I found the culprit, it's this patch:

    Code
    From bc34eb8e494f45f0a18c56603f3d06e378035fb7 Mon Sep 17 00:00:00 2001
    From: Phil Elwell <[email protected]>
    Date: Sat, 19 Mar 2016 16:51:37 +0000
    Subject: [PATCH 205/212] BCM270X_DT: Remove explicit claiming of UART pins


    in "linux-01-RPi_support.patch". If I remove it, and rebuild LE, Bluetooth is working fine.

    Edited once, last by Grimson (April 3, 2016 at 8:35 PM).


  • Can you both ( Soringo + Grimson) post the /flash/config.txt you are using with LE? RPi3 Bluetooth is working for me...

    For testing purposes I used a fresh SD card and the current 6.90.004 image from the downloads page, so my config.txt was completely unmodified. Test builds were created with a clean build from the current master branch and updated using the .tar file, so config.txt hasn't been touched.


  • Can you both ( Soringo + Grimson) post the /flash/config.txt you are using with LE? RPi3 Bluetooth is working for me...

    Of course. I modified it, but not relationship with bluetooth, and after trying to connect the keyboard (modification done to occult the "low voltage coloured square").

    cQwW6UGP

    By the way: it seems "openelec" still appears there ;)

    Note: if you see bluetooth disabled, it is because as far as it is not working for me, I turned it off so no resources are used.

    Edited once, last by Soringo (April 3, 2016 at 9:45 PM).

  • Ok, here is a reliable way to reproduce it.

    Reqs: Raspi 3 without any additional hardware, only connected to a TV, no network or USB devices. Anker Bluetooth speakers to see if anything is found.

    Step 1, with a clean image:
    1. DD the LE image on a fresh SD.
    2. Let it boot, finish the wizard without changing anything.
    3. Go into the LE settings, turn on Bluetooth in the Services settings.
    4. Go to the Bluetooth screen, it tells you there are no Bluetooth adapters found.
    5. Turn on the BT speakers, nothing changes.

    Step 2:
    1. Build the LE master, commit: 42265e9 at the time of testing.
    2. Update with the .tar file and repeat above points 3 to 5, nothing changes

    Step 3:
    1. Remove the "offending" patch I noted previously.
    2. Rebuild LE and update again with the .tar file.
    3. Go into the LE settings, turn on BT if you turned it of previously.
    4. Go to the BT screen, it tells you that there are no BT devices visible (different message than in Step 1).
    5. Turn on the BT speakers, a few seconds later they are visible an can be connected.

    Additional info:
    lsmod with the current official LE build and BT turned on is missing: hci_uart and btbcm.
    dmesg with the current official LE build is missing these:

    Code
    Bluetooth: HCI UART driver ver 2.3
    Bluetooth: HCI UART protocol H4 registered
    Bluetooth: HCI UART protocol Three-wire (H5) registered
    Bluetooth: HCI UART protocol BCM registered

    and ends after:

    Code
    Bluetooth: HCI device and connection manager initialized
    Bluetooth: HCI socket layer initialized
    Bluetooth: L2CAP socket layer initialized
    Bluetooth: SCO socket layer initialized

    Edited once, last by Grimson (April 3, 2016 at 9:57 PM).

  • Can you run the following commands:

    Code
    systemctl status brcmfmac_sdio-firmware.service | paste
    cat /flash/cmdline.txt | paste

    and paste the links. Thanks.

    Edited once, last by milhouse (April 3, 2016 at 11:23 PM).


  • Can you run the following commands:

    Code
    systemctl status brcmfmac_sdio-firmware.service | paste
    cat /flash/cmdline.txt | paste

    and paste the links. Thanks.

    Hi, just wanted to say i have the same issues as my bluetooth doesnt work on the rpi3 after updating from the latest openelec build where it did work. Judging by this thread a fresh install wont help and im not too bothered about bluetooth as i have an ir receiver plugged in. Anyway i thought i would do what you said to see if it helps any.

    Code
    boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 quiet


    Don't know if thats what you want or if its the same problem as the others are having. Im not going to try replacing any files as
    [font="Open Sans, sans-serif, Arial"]Grimson suggested[/font] , i'll just wait for an update.


  • Can you run the following commands:

    Code
    systemctl status brcmfmac_sdio-firmware.service | paste
    cat /flash/cmdline.txt | paste

    and paste the links. Thanks.


    Here from the current official build:
    TFDH
    and from my build with the mentioned patch removed:
    VYPL
    cmdline.txt has not been modified:

    Code
    boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 quiet

  • As a workaround you can download the OE 7 beta tar file, extract the bcm2710-rpi-3-b.dtb from it's "3rdparty/bootloader" directory and replace the one on the SD card with it.

    Thank you, I thought id take a look anyway and see if I could do this. After extracting the file, i plugged my sd card into my windows laptop and replaced the file there and when i booted up my pie it has bluetooth yay. Still needs fixing though for other users and future versions.

  • OK, 6.90.004 is using firmware from March 15 which predates the kernel changes - basically, firmware and kernel are out of sync, which is breaking Bluetooth (actually, the UART). Will get the firmware updated now, in time for 6.90.005 in a day or so. Thanks for reporting.


  • OK, 6.90.004 is using firmware from March 15 which predates the kernel changes - basically, firmware and kernel are out of sync, which is breaking Bluetooth (actually, the UART). Will get the firmware updated now, in time for 6.90.005 in a day or so. Thanks for reporting.

    Cool and thanks. Will you always add quick updates like this if something is broken and you can add a quick fix? If so then I will definitely stick with this OS.


  • Cool and thanks. Will you always add quick updates like this if something is broken and you can add a quick fix? If so then I will definitely stick with this OS.

    When something is broken we'll obviously fix the source code as soon as possible, however whether that triggers a binary release depends on the severity of the problem, and whether there's any workarounds/temporary fixes.

    In this case we're about to produce another Alpha before heading into Beta, so it makes sense to get this in ASAP. However once we've got official releases out, not every bug fix will result in an immediate release (unless we're doing a spectacularly bad job at testing!) as we will instead batch fixes for the next patch release, the frequency of which will be determined by the size of the fix list/severity of the bugs etc., but you shouldn't be kept waiting too long.

    In the meantime if you run the following commands on your 6.90.004 system you should find you have working Bluetooth (if not, please post again):

    Code
    mount -o remount,rw /flash
    (cd /flash && wget -q http://milhouse.libreelec.tv/other/firmware_bt_fix.tar.gz -O - | tar xvzf -)
    sync && mount -o remount,ro /flash
    reboot

    After running the above commands, you should have March 24 firmware:

    Code
    LibreELEC:~ # vcgencmd version
    Mar 24 2016 12:49:34
    Copyright (c) 2012 Broadcom
    version e16cd015026a8bda22bb50dc30b30ce07f52a202 (clean) (release)
  • I reinstalled the current version by copying over the update installer from openelec file that i first used which undid the change i made mentioned earlier and broke the bluetooth. Running your code fixed it again and now it runs fine, thanks.

    Edited once, last by JJK9 (April 4, 2016 at 4:08 AM).