2

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?

David Refoua
  • 109
  • 1
  • 6
paulgavrikov
  • 123
  • 1
  • 5
  • 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 02:27

2 Answers2

5

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.

Aurora0001
  • 6,308
  • 3
  • 23
  • 38
Diederik de Haas
  • 809
  • 8
  • 12
  • 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. –  Dec 11 '15 at 04: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 01: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 02:07
3

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

rob
  • 2,803
  • 2
  • 21
  • 31