• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Bluetooth stopped working on pi3 after apt upgrade

Scheduled Pinned Locked Moved Help and Support
bluetoothpi3controller8bitdo
8 Posts 2 Posters 1.6k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    moody31415
    last edited by 31 Oct 2021, 00:52

    Pi Model: 3b
    RetroPie Version: 4.7.19
    Linux 5.10.63-v7+ armv7l GNU/Linux
    Built From: Upgrade from old 2017-era retropie image
    USB Devices connected: xbox 360 wireless adapter
    Controller used: xbox 360 (connects with usb adapter); 8bitdo SNES30 gamepad (no longer connects, bluetooth)

    The onboard bluetooth controller seems to have stopped working after I recently ran sudo apt update && sudo apt upgrade. It was working before I updated, but I don't recall what version etc. I was on then.
    I saw a few posts on this, including the top pinned post here, however the issue I'm seeing appears a little different than that one. Also here and here and here, although that last one is a really long thread and searching for 'bluetooth' within that thread, I didn't find a lot of ideas to fix this.

    After boot completes, bluetooth is disabled. This wasn't the case prior to upgrade:

    pi@retropie:~ $ systemctl status bluetooth
    ● bluetooth.service - Bluetooth service
       Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
       Active: inactive (dead)
         Docs: man:bluetoothd(8)
    

    I can manually start it:

    pi@retropie:~ $ sudo systemctl start bluetooth
    pi@retropie:~ $ systemctl status bluetooth
    ● bluetooth.service - Bluetooth service
       Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
       Active: active (running) since Sat 2021-10-30 03:45:37 UTC; 4s ago
         Docs: man:bluetoothd(8)
     Main PID: 985 (bluetoothd)
       Status: "Running"
        Tasks: 1 (limit: 1631)
       CGroup: /system.slice/bluetooth.service
               └─985 /usr/lib/bluetooth/bluetoothd
    
    Oct 30 03:45:37 retropie systemd[1]: Starting Bluetooth service...
    Oct 30 03:45:37 retropie bluetoothd[985]: Bluetooth daemon 5.50
    Oct 30 03:45:37 retropie systemd[1]: Started Bluetooth service.
    Oct 30 03:45:37 retropie bluetoothd[985]: Starting SDP server
    Oct 30 03:45:37 retropie bluetoothd[985]: Bluetooth management interface 1.18 initialized
    

    However running bluetoothctl doesn't find a controller.

    When trying to use sudo ~/RetroPie-Setup/retropie_setup.sh to configure bluetooth, it hangs for 15-30 seconds when trying to "Pair and Connect to Bluetooth Devices" before it shows the "searching for devices…" screen.

    Hciconfig doesn't see it:

    pi@retropie:~ $ hciconfig hci0
    Can't get device info: No such device
    

    Nor does bdaddr:

    pi@retropie:~ $ bdaddr
    Can't open device hci0: No such device (19)
    

    Systemctl status hciuart shows it failed to start:

    pi@retropie:~ $ systemctl status hciuart
    ● hciuart.service - Configure Bluetooth Modems connected by UART
       Loaded: loaded (/lib/systemd/system/hciuart.service; enabled; vendor preset: enabled)
       Active: failed (Result: exit-code) since Sat 2021-10-30 23:51:29 UTC; 10min ago
      Process: 405 ExecStart=/usr/bin/btuart (code=exited, status=1/FAILURE)
    
    Oct 30 23:51:15 retropie systemd[1]: Starting Configure Bluetooth Modems connected by UART...
    Oct 30 23:51:29 retropie btuart[405]: Failed to reset chip, invalid HCI event
    Oct 30 23:51:29 retropie btuart[405]: Can't initialize device: Success
    Oct 30 23:51:29 retropie btuart[405]: bcm43xx_init
    Oct 30 23:51:29 retropie systemd[1]: hciuart.service: Control process exited, code=exited, status=1/FAILURE
    Oct 30 23:51:29 retropie systemd[1]: hciuart.service: Failed with result 'exit-code'.
    Oct 30 23:51:29 retropie systemd[1]: Failed to start Configure Bluetooth Modems connected by UART.
    

    Manually trying to start bluetooth:

    pi@retropie:~ $ sudo btuart
    bcm43xx_init
    Initialization timed out.
    pi@retropie:~ $
    

    I have the "correct" bluez package, per the pinned thread:

    pi@retropie:~ $ apt show bluez
    Package: bluez
    Version: 5.50-1.2~deb10u2+rpt1
    Priority: optional
    Section: admin
    Maintainer: Debian Bluetooth Maintainers <team+pkg-bluetooth@tracker.debian.org>
    Installed-Size: 3,771 kB
    Depends: libasound2 (>= 1.0.17), libc6 (>= 2.28), libdbus-1-3 (>= 1.9.14), libdw1 (>= 0.127), libglib2.0-0 (>= 2.31.8), libreadline7 (>= 6.0), libudev1 (>= 196), kmod, udev, lsb-base, dbus
    Suggests: pulseaudio-module-bluetooth
    Conflicts: bluez-audio (<= 3.36-3), bluez-utils (<= 3.36-3)
    Breaks: udev (<< 170-1)
    Replaces: bluez-audio (<= 3.36-3), bluez-input, bluez-network, bluez-serial, bluez-utils (<= 3.36-3), udev (<< 170-1)
    Homepage: http://www.bluez.org
    Download-Size: 770 kB
    APT-Manual-Installed: no
    APT-Sources: http://archive.raspberrypi.org/debian buster/main armhf Packages
    Description: Bluetooth tools and daemons
     This package contains tools and system daemons for using Bluetooth devices.
     .
     BlueZ is the official Linux Bluetooth protocol stack. It is an Open Source
     project distributed under GNU General Public License (GPL).
    
    N: There is 1 additional record. Please use the '-a' switch to see it
    

    Attempting to install different bluez per this thread failed:

    pi@retropie:~ $ sudo apt install bluez=5.50-1.2~deb10u1+rpt2
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Version '5.50-1.2~deb10u1+rpt2' for 'bluez' was not found
    pi@retropie:~ $
    

    Any help would be appreciated :)

    1 Reply Last reply Reply Quote 0
    • M
      mitu Global Moderator
      last edited by mitu 31 Oct 2021, 02:41

      What does rfkill show ? Run

      rfkill list all
      

      and post the output. Is your kernel/firmware up-to-date ?

      M 1 Reply Last reply 31 Oct 2021, 17:48 Reply Quote 0
      • M
        moody31415 @mitu
        last edited by moody31415 31 Oct 2021, 17:48

        @mitu I think my kernel/firmware is up to date; doesn't apt update && apt upgrade do that? If not, where should I look to do that - I've also gone through retropie_setup.sh and updated in the last few days too.

        Logging in indicates I'm on a recent kernel:
        Linux retropie 5.10.63-v7+ #1459 SMP Wed Oct 6 16:41:10 BST 2021 armv7l

        pi@retropie:~ $ rfkill list all
        0: phy0: Wireless LAN
                Soft blocked: no
                Hard blocked: no
        pi@retropie:~ $
        

        Poking around, I think this is the firmware I have currently:

        pi@retropie:~ $ /opt/vc/bin/vcgencmd version
        Sep 30 2021 19:22:24
        Copyright (c) 2012 Broadcom
        version 51215b4f6e3966401ecd99652a35cf1c25069113 (clean) (release) (start)
        pi@retropie:~ $
        
        1 Reply Last reply Reply Quote 0
        • M
          mitu Global Moderator
          last edited by 31 Oct 2021, 17:57

          Your kernel/fimrware seems up-to-date. rfkill shows that BT is not detected though, so unblocking it will not work.
          Are you sure you haven't disabled BT from the config.txt file ?

          M 1 Reply Last reply 31 Oct 2021, 18:19 Reply Quote 0
          • M
            moody31415 @mitu
            last edited by 31 Oct 2021, 18:19

            @mitu I didn't intentionally disable it, but after the update ssh was not enabled either and I had to re-enable it with the tools in raspi-config in emulation station.
            Here's a pastebin of my config.txt
            Also, if I try to rpi-update, it says that my boot partition isn't large enough:

            Partition size 57M may not be sufficient for new Pi4 files
            This could result in a system that will not boot.
            256M FAT partition is recommended. Ensure you have a backup if continuing.
            Would you like to proceed? (y/N)
            

            I don't have a pi4, but I figured I shouldn't proceed. Just now, I found a walkthrough on resizing my boot partition to be larger here although that is a few years old (and is using the gui). Do you think rpi-update would help?

            M 1 Reply Last reply 31 Oct 2021, 18:38 Reply Quote 0
            • M
              mitu Global Moderator @moody31415
              last edited by 31 Oct 2021, 18:38

              @moody31415 said in Bluetooth stopped working on pi3 after apt upgrade:

              Also, if I try to rpi-update, it says that my boot partition isn't large enough:

              Yes, because the new images have a larger boot partition. Since you've upgraded in-place, you don't have the right partition size for the new rpi-update.

              Do you think rpi-update would help?

              No, it's not necessary.

              Looking at the config.txt, I don't see BT being disabled, which is ok. However, being an in-place upgrade, there may be some things which haven't been upgraded properly. One of the reasons this procedure is not recommended.

              The issue is that the hciuart service doesn't start and the BT UART is not initialized. Do you have the bluez-firmware package installed ?

              M 1 Reply Last reply 31 Oct 2021, 22:02 Reply Quote 0
              • M
                moody31415 @mitu
                last edited by 31 Oct 2021, 22:02

                @mitu Yep;

                pi@retropie:~ $ apt show bluez-firmware
                Package: bluez-firmware
                Version: 1.2-4+rpt8
                Priority: optional
                Section: non-free/kernel
                Maintainer: Debian Bluetooth Maintainers <team+pkg-bluetooth@tracker.debian.org>
                Installed-Size: 332 kB
                Download-Size: 175 kB
                APT-Manual-Installed: no
                APT-Sources: http://archive.raspberrypi.org/debian buster/main armhf Packages
                Description: Firmware for Bluetooth devices
                 This firmware is required for operation of Bluetooth dongles based on
                 the Broadcom BCM203x chipset.
                
                N: There is 1 additional record. Please use the '-a' switch to see it
                pi@retropie:~ $
                
                M 1 Reply Last reply 9 Nov 2021, 19:29 Reply Quote 0
                • M
                  moody31415 @moody31415
                  last edited by 9 Nov 2021, 19:29

                  @mitu and to any future readers - I fixed it!

                  After much searching, I found this link https://github.com/goodtft/LCD-show/issues/278 for an issue with an LCD display I tried to use years ago. Apparently, it updated my /boot/cmdline.txt file to put ttyAMA0 in my console, instead of the default serial0. Swapping it back to console=serial0,115200 and rebooting, and now bluetooth works again!

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post

                  Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                  Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.

                    [[user:consent.lead]]
                    [[user:consent.not_received]]