BLE Troubleshooting
Failed to get BlueZ package on RaspberryPi
You may encounter the following error when installing BlueZ on a RaspberryPi:
sudo apt-get build-dep bluez
Reading package lists... Done
E: You must put some 'deb-src' URIs in your sources.list
You can fix this by modifying the apt
source:
-
Open apt sources list file sudo nano /etc/apt/sources.list
-
Uncomment the line "deb-sr http://archive.raspbian.org/raspbian/jessie main contrib non-free rpi"
Bluetooth is blocked on RaspberryPi
If you encounter this error when executing the command systemctl status bluetooth
, we can you can fix it with the command:
sudo rfkill unblock bluetooth
Update the BlueZ package
You may need to update BlueZ, you can update or install it with the following command:
apt-get install dbus
If it is not running, start it with:
systemctl start dbus
You can also install the specific BlueZ version, as described in the section below.
Install BlueZ 5.60
-
Download
wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.60.tar.xz tar xvJf bluez-5.60.tar.xz
-
Run the configuration command
cd bluez-5.60 less README
Run the configuration command according to the README file:
$ sudo apt-get build-dep bluez $ ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var ... checking for rst2man... no checking for rst2man.py... no configure: error: rst2man is required
-
Install rst2man
sudo apt-get install python-docutils
-
Install
make sudo make install sudo reboot
Inspect Bluetooth service status
systemctl status dbus.service
bluetoothctl -v
systemctl status bluetooth.service