In order to use your Raspberry Pi to send out Beacon data in the advertising frame, we'll need to install a few open source tools, mainly Bluez
Check if you already have Bluez
If you already have a modern version of Bluez you do not need to compile and can skip to step 4!
On your Raspberry Pi, try running
sudo apt-get install bluez
and then
dpkg --status bluez | grep '^Version:'
If you get something like Version: 5.23-2+rpi2
Where the version is greater than 5.11 you can skip the installation and compilation steps.
sudo apt-get install libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev sudo apt-get install libical-dev sudo apt-get install libreadline-dev
sudo mkdir bluez cd bluez sudo wget www.kernel.org/pub/linux/bluetooth/bluez-5.11.tar.xz
3. Unzip and Compile Bluez
Next you need to actually build Bluez on the Pi. This step may take a while, but should work without any hiccups if you properly installed all the libraries in step one above:sudo unxz bluez-5.11.tar.xz sudo tar xvf bluez-5.11.tar cd bluez-5.11 sudo ./configure --disable-systemd sudo make sudo make install
4. Insert the USB Module and Reset
Once Bluez has been built, shut down your computer with sudo shutdown -h now and once its Halted, insert your Bluetooth 4.0 USB Module and then restart the Raspberry Pi so that all of the changes we have made can take effect.
Text editor powered by tinymce.