Zouzou2016
Posts: 3
Joined: Wed Oct 16, 2019 6:54 pm

Raspbian buster bluetooth failure after 2019.09.16 update

Wed Oct 16, 2019 7:01 pm

Anybody to help as today updating raspbian buster through raspbian buster gui my Logitec K380 bluetooth keyboard even if it shows that is connected unfortunately does not respond to keyboard clicks...
I have the latest raspbian buster NOOBS with libre elec add on.
When I reboot and switch to libre elec I can connect and pair bluetooth normally but when switching again to raspbian buster even it gecognises the bluetooth keyboard when starting typing nothing happens...

terjegj
Posts: 2
Joined: Tue Oct 22, 2019 6:41 am

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Tue Oct 22, 2019 7:01 am

The exact same thing happened to me with my K380 and a recently updated non-NOOBS Buster on RPi 4B 4GB version. Removing and re-pairing the keyboard doesn't help; although it seemingly pairs and connects fine, it doesn't type, except for a few cases where I can manage to type one or two characters just after reconnecting, The keyboard works nicely with my Mac Mini and has new batteries.

strangerganesh
Posts: 1
Joined: Fri Jan 15, 2016 6:26 am

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Sat Oct 26, 2019 4:49 am

Same here. I'm using Logitech k480 Bluetooth keyboard. With the fresh install of buster it worked but the moment the OS was updated, it stopped working. In bluetoothctl it was showing as if it was constantly connecting and disconnecting

dave_p
Posts: 28
Joined: Sun Mar 04, 2012 2:11 pm

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Sat Oct 26, 2019 7:28 pm

Same problem on a fully-updated Pi4 when trying to use an Apple keyboard.

Monitoring the bluetooth status with btmon, the initial pairing works OK, then there is a timeout after 20 seconds and pairing is lost. At this point the bluetoothd process goes to 100% CPU. 30 seconds later the Pi re-tries pairing which is successful, then the whole sequence repeats indefinitely. Even during the time that the keyboard claims to be connected, it doesn't actually work.

I had hoped to attach my log to this thread but whatever filename I choose is rejected with an 'invalid extension' error.

uilfut
Posts: 72
Joined: Sat Mar 03, 2018 1:20 am
Location: Toronto

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Sun Oct 27, 2019 8:26 pm

K380 user checking in also...

Haven't used Pi4 for a couple of weeks and now won't connect to bluetooth kb for more than a few seconds.

Hoping whichever update broke this can be reversed :)

dave_p
Posts: 28
Joined: Sun Mar 04, 2012 2:11 pm

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Mon Oct 28, 2019 2:39 pm

I built a fresh SD card from the current Raspbian image (2019.09.24); the bluetooth keyboard worked. I then upgraded the packages one-by-one to the latest version, testing the bt keyboard each time. The package which 'broke' the keyboard was firmware-brcm80211. OK this may not be a valid test, as the firmware files were then out-of-step with the driver software, but it seems to show the area at fault.

The version of firmware-brcm80211 supplied with the image was 1:20190114-1+rpt2, and the upgrade replaced this with 1:20190114-1+rpt3. I would have liked to try replacing 1:20190114-1+rpt2 but I couldn't find it in the Raspbian archives. I did try 20190114-2 but although this fixed bluetooth it broke wifi - probably the firmware for the Pi4 wifi chip is missing.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2875
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Mon Oct 28, 2019 3:40 pm

My usual BT keyboards are working as expected, but I have a K380 on order for testing purposes.

You can downgrade just the Bluetooth firmware by downloading the previous version from this link: https://github.com/RPi-Distro/bluez-fir ... 4345C0.hcd

Click the Download button, copy the file (probably now at ~/Downloads/BCM4345C0.hcd if you are running on the Pi) to /lib/firmware/brcm/BCM4345C0.hcd (you'll need sudo/root privilege to write there), then reboot to activate.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2875
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Mon Oct 28, 2019 4:54 pm

Everything I just wrote was true, but perhaps less helpful than it could have been...

1) For random reasons the WiFi on my test 4B was not enabled, and as reported the keyboard was working fine. Enabling WiFi killed the keyboard at some point during or after the scan - connecting wasn't necessary to break it.

2) Although the Bluetooth and WiFi halves of the CYW43455 are largely separate, there is a channel between the two for co-existence data. I suspect it is this mechanism which is failing, because rolling back the WiFi firmware solves the problem (which is odd, because this firmware was billed as improving coexistence, and I've not seen the problem in testing). The three older WiFi firmware files can be downloaded from here: https://github.com/RPi-Distro/firmware- ... c5f9c/brcm - they're called brcmfmac43455-sdio.* . Install them the same way as you do the BT firmware - "sudo cp brcmfmac43455-sdio.* /lib/firmware/brcm" and reboot.

3) For some reason, despite seeing the hard error earlier, BT and WiFi do sometimes coexist on the latest firmware, which might explain how it wasn't spotted earlier. However, downgrading the WiFi firmware and leaving the Bluetooth firmware up-to-date is consistently reliable for me.

dave_p
Posts: 28
Joined: Sun Mar 04, 2012 2:11 pm

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Mon Oct 28, 2019 9:19 pm

@PhilE many thanks for the reply.

Replacing the three brcmfmac43455* files in /lib/firmware/brcm with the previous versions fixes bluetooth keyboard on my test SD - it wasn't necessary to downgrade the bluetooth firmware.

Thanks again.

DataGhost
Posts: 1
Joined: Mon Oct 28, 2019 8:55 pm

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Mon Oct 28, 2019 10:30 pm

Thanks dave_p for narrowing it down. I didn't even realise that there was new firmware on the loose and that I dist-upgraded to it just as I was building my bluetooth audio sink, and moved from my RPi3B to RPi4. Too focused on the wrong thing because it wasn't consistent and logical :(

For me it was my phone (Samsung Galaxy S9) losing connection after a few seconds of inactivity, while the issue wasn't there when playing audio from my PC or an iPhone. If I didn't play audio or allowed the media transport to close and stay closed for a few seconds, it'd lose the connection somehow and timeout after 30 seconds. Seeing as you are still managing some keypresses sometimes before it stops, that looks kind of similar.

But yeah, as for the solution... let's go with a workaround. The package may be gone, but you can still take the firmware from the current (2019-09-26) buster images. Restoring /lib/firmware/brcm/brcmfmac43455* from the image fixes the problem for me. I made a bugreport, hopefully in the correct place.

Edit: that's what I get for testing too much and doing a big write-up, others come to the same conclusion in the meantime :)

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6228
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Mon Oct 28, 2019 11:19 pm

The previous package may be found here - http://archive.raspberrypi.org/debian/p ... t2_all.deb

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2875
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Wed Oct 30, 2019 9:50 am

There's an issue open on the WiFi firmware github repo: https://github.com/RPi-Distro/firmware-nonfree/issues/7

uilfut
Posts: 72
Joined: Sat Mar 03, 2018 1:20 am
Location: Toronto

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Thu Oct 31, 2019 9:37 pm

Will this resolve itself in a later update? How long away would this next update be?

(Sorry super lazy right now.)

uilfut
Posts: 72
Joined: Sat Mar 03, 2018 1:20 am
Location: Toronto

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Thu Oct 31, 2019 9:38 pm

(And thanks, PhilE, for following through.)

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2875
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Thu Oct 31, 2019 10:02 pm

If you "sudo apt update" and "sudo apt upgrade" now you'll get the updated/reverted firmware package.

uilfut
Posts: 72
Joined: Sat Mar 03, 2018 1:20 am
Location: Toronto

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Thu Oct 31, 2019 10:04 pm

Super. Thank you.

terjegj
Posts: 2
Joined: Tue Oct 22, 2019 6:41 am

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Fri Nov 01, 2019 7:58 am

Works again for me too after the update. Thanks!

uilfut
Posts: 72
Joined: Sat Mar 03, 2018 1:20 am
Location: Toronto

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Tue Nov 05, 2019 11:53 am

One last thing (hope you don't mind me posting here) - while trying to make it work I broke the task bar icon / bluetooth manager. I can't seem to relaunch it. Is it blueman, can you tell me? Or bluez? I uninstalled everything when the keyboard wasn't working in desperation... and can't remember what I did!

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2875
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Tue Nov 05, 2019 12:01 pm

It's our own LXPanel Bluetooth plugin that talks to BlueZ via DBus. The first thing you can do is right-click on the task bar and select "Add / Remove Panel Items". Then look at the list of Panel Applets and see if "Bluetooth" is in the list. If it isn't, click the "Add" button and select it.

If that doesn't work, try "sudo apt install --reinstall lxplug-bluetooth", then repeat the Panel Applets step if necessary.

uilfut
Posts: 72
Joined: Sat Mar 03, 2018 1:20 am
Location: Toronto

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Wed Nov 06, 2019 4:11 am

Thanks PhilE, that doesn't do the trick unfortunately.

I've removed and added it to the task bar, and reinstalled lxplug-bluetooth, and bluez (again). Weird.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2875
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Wed Nov 06, 2019 9:20 am

Thanks PhilE, that doesn't do the trick unfortunately.

I've removed and added it to the task bar, and reinstalled lxplug-bluetooth, and bluez (again). Weird.
In what way does it not work? Does it appear but not function, or do you not see it at all? And do you have evidence that Bluetooth is working?

uilfut
Posts: 72
Joined: Sat Mar 03, 2018 1:20 am
Location: Toronto

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Wed Nov 06, 2019 3:01 pm

Doesn't appear in task bar - I'll try and set it up via command line later through bluez and test it that way. Thank you.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2875
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Wed Nov 06, 2019 3:05 pm

Did it appear in the "Add / Remove Panel Items" list of Panel Applets? If not, did it appear in the list you get by clicking on the Add button?

uilfut
Posts: 72
Joined: Sat Mar 03, 2018 1:20 am
Location: Toronto

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Wed Nov 06, 2019 3:13 pm

Yes it did appear in setup menu - just wouldn't appear when added.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2875
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Raspbian buster bluetooth failure after 2019.09.16 update

Wed Nov 06, 2019 3:19 pm

That's the behaviour you get if the plugin can't find a Bluetooth interface (the idea is to distinguish a present but RF-blocked interface from no interface). You can confirm this by verifying that "hcitool dev" returns an empty list of devices.

Return to “Raspberry Pi OS”