I am running Linux raspberrypi 4.1.13+ #826 PREEMPT Fri Nov 13 20:13:22 GMT 2015 armv6l GNU/Linux on my Raspberry Pi Model B.

The RPi comes preinstalled with BlueZ v5.23, which is horribly outdated and buggy. I hoped to install the newer BlueZ v5.36, so I checked out their repo. I disabled systemd in the configure process and let it make. But even after a successful sudo make install and multiple reboots, bluetoothd -v still returns 5.23.

Does anybody have an idea why this could be and how to update BlueZ?

  • What is the output of: which bluetoothd? did you uninstall the previous version? Did you stop the old version from starting? Is their an entry in /etc/alternatives? If so what does it point to. – Steve Robillard Dec 11 '15 at 2:27
up vote 6 down vote accepted

BlueZ 5.43 is available in the Stretch repositories, but Jessie only comes with version 5.23.

I'd try the following to get the more recent version:
Add the stretch sources to your sources.list and at the same time tell APT to (still) default to jessie. You'd do the former by copy/paste the jessie line and in the copy change jessie to stretch. You'd do the latter by creating a file /etc/apt/apt.conf.d/40defaultrelease with the following contents:

APT::Default-Release "jessie";

Then do apt-get update to let APT know of the new packages and versions. To install bluez from stretch/testing, do the following: apt-get install bluez -t stretch. This will install bluez and its dependencies from stretch.
This way you get a nicely packed Debian/Raspbian package, but at the version you want.
Because of the APT::Default-Release "jessie" you'd still install/upgrade package from jessie by default and would only get stretch package when you explicitly request them (with '-t').

There's also a small variation to that and that is apt-get install bluez/stretch and this will only install the bluez package itself from stretch, but the rest from jessie. This may be a 'cleaner' variant as will only install that one package from stretch. OTOH it may cause an installation problem if it can't satisfy it's dependencies from jessie.
In that case I suggest to do it with aptitude like this: aptitude install bluez/stretch.
The dependency resolver of aptitude is more powerful then apt-get's and will likely find a solution to it. It may come up with 1 (or more) 'bogus' suggestions, but just say 'n' then and let it calculate a new solution till you find one that is appropriate.

  • 1
    Try comparing the timestamp of the existing /usr/sbin/bluetoothd with the bluez-5.36/src/bluetoothd after the make. It could also be that Makefile does not have a rule to install bluetoothd. In which case move the original blueoothd to a .org and copy the src/bluetoothd into /usr/sbin and try to restart the daemon. – user36965 Dec 11 '15 at 4:57
  • @VittalNBadithe I think you want to add your comment to the question, not this answer ;-) – Diederik de Haas Dec 11 '15 at 11:21
  • This approach works fine to install BlueZ 5.36. The bad news is that after installing this with the latest pi kernel you get an error when pairing "Bluetooth: SMP security requested but not available". If anybody knows how to fix this short of compiling a new Kernel I would like to hear it. – Brook Apr 12 '16 at 1:30
  • 5.39 appears to fix the issue with pairing and SMP security. I would recommend against doing the above method and instead just install 5.39 from source. – Brook Apr 14 '16 at 2:07

This was pre Jessie but I logged the following steps in March

git clone git://git.kernel.org/pub/scm/bluetooth/bluez.git 
cd bluez

sudo apt-get install autoconf make automake cmake libtool libglib2.0 libdbus-1-dev libudev-dev libical-dev libreadline-dev 
libtoolize --force 

then

aclocal 
autoheader 
automake --force-missing --add-missing 
autoconf
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --enable-experimental --with-systemdsystemunitdir=/lib/systemd/system --with-systemduserunitdir=/usr/lib/systemd
make

from my blog http://www.jumpstation.co.uk/flog/Mar2015.html#p090320152120

  • there are some spaces in your apt-get install line which shouldn't be there. As it's only 2 characters, I (apparently) couldn't edit it myself. – Diederik de Haas Dec 11 '15 at 11:49
  • @DiederikdeHaas well spotted, fixed – rob Dec 11 '15 at 11:51
  • There are a few things that don't work [I am a Linux noob, so forgive me if they are obvious]. First --force isn't allowed, secondly it can't locate libtoolize – bluewhile Dec 11 '15 at 15:52
  • And automake fails with error: required file './ltmain.sh' not found – bluewhile Dec 11 '15 at 16:12
  • @bluewhile sorry the libtoolize --force was supposed to be on its own line. – rob Dec 11 '15 at 16:22

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.