Our next stop will be to setup bluetooth for our Pi. We will need bluetooth for many bluetooth enabled services. We will discuss in future posts what we will do with bluetooth. For now assume we need it 🙂
If you are using RPi 2 you are going to need a bluetooth dongle. I used the following but in no way I am endorsing or selling it. Just pointing out what I used and how it might help, since I have heard many cases in which people bought bluetooth dongles that did not work with Raspberry Pi.
After you get your hardware you are going to need to install a few stuff on your Pi. Start it up and open up the terminal. Now let’s start installing stuff.
Just to be sure we are up to date before installing the packages we need execute the following
sudo apt-get update and then sudo apt-get upgrade
sudo apt-get install bluetooth bluez blueman python-gobject python-gobject-2
This will install bluetooth drivers and dependencies, a GUI bluetooth manager and some python dependencies.
When all of this is done, although not necessary, reboot your Pi. When your Pi starts up again if you go to Menu -> Preferences -> Bluetooth Devices it will bring up the GUI Manager we just installed. You are of course able to setup your bluetooth using the terminal but it’s a lot easier using this GUI Manager.
So once you open the Bluetooth Devices Manager click search so it can find all your nearby bluetooth enabled devices.
But first you should do is set up the Raspberry Pi’s bluetooth adapter by navigating to Adapter -> Preferences. From here you can name your Pi within the Bluetooth network and set whether it can be seen by other devices or not. At this stage, set it to Always visible:
Now to pair with a device (your phone) we need to select it, right click on it and click pair. This will do the standard and basic pairing we all know. Type one password on your pi and type the same password on your phone. Then you can click trust to always trust your device from your pi.
Simple as pi 🙂