How to install latest bluez 5.66(Compile/install latest bluez) on Raspberry step by step

Make Raspberry build-in bluetooth adapter acting as Bluetooth gateway (part 1)

https://blog.matterxiaomi.com/blog/make-raspberry-acting-bluetooth-gateway-part1/

 

Here are the commands I used to get Bluetooth running on the Raspberry Pi 3b +, from a fresh install:

 

$sudo apt-get -s install bluez #-s simulates the install, showing you
$#that an outdated version of bluez is on your machine
$sudo apt-get --purge remove bluez
$cd ~
$wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.49.tar.xz # find the latest bluez kernel at
$#http://www.kernel.org/pub/linux/bluetooth and install that, changing the version number of upcoming steps 
$tar xvf bluez-5.49.tar.xz
$sudo apt-get install -y libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev
$cd bluez-5.49
$./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var
$make
$sudo make install
$cd ~
$cd /usr/libexec/bluetooth
$./bluetoothd --version
$cd ~
$cd usr/lib/bluetooth
$./bluetoothd --version #identify what the newer version is. 
#Mine was in libexec. If yours is not, reverse the paths in the following steps
$cd ~
$sudo nano /lib/systemd/system/bluetooth.service
#Go to the Exec Start line. Point it to /usr/libexec/bluetooth/bluetoothd
$sudo mv /usr/lib/bluetooth/bluetoothd /usr/lib/bluetooth/bluetoothd-543.orig
$sudo ln -s /usr/libexec/bluetooth/bluetoothd /usr/lib/bluetooth/bluetoothd 
$sudo systemctl daemon-reload 

 

useful links

How to install uninstall upgrade latest bluez(Compile/install latest bluez) on Raspberry step by step (bluez 5.49)

https://www.msly.cn/boards/topic/12350/how-to-install-uninstall-upgrade-latest-bluezcompileinstall-latest-bluez-on-raspberry-step-by-step

 

updated:20230120

How to install latest bluez 5.66(Compile/install latest bluez) on Raspberry step by step

https://www.msly.cn/boards/topic/14427/how-to-install-latest-bluez-566compileinstall-latest-bluez-on-raspberry-step-by-step

Comments


Comments are closed