Can anybody tell me exactly what I need to do in order to get my android phone to communicate to the Raspberry Pi via Bluetooth? I am new to this and I have made an Android app that has 2 buttons that will hopefully turn on and off an Led.
Firstly you need to make sure you use a Bluetooth module that supports the SPP Profile.
It can either be a USB (With SPP [most have this]) one or one that has UART break out like this.
With a USB you will get a new Serial port listed under /dev/. Then you can use Python or C# Mono to run and read UART and do things you want.
On the Android side you need to create a BlueTooth Socket
The most common type of Bluetooth socket is RFCOMM, which is the type supported by the Android APIs. RFCOMM is a connection-oriented, streaming transport over Bluetooth. It is also known as the Serial Port Profile (SPP).
- You have to connect to the BlueTooth device manually via the Settings panel.
- Programmatic BlueTooth hopping or device pairing is a nightmare and sometimes not even possible.
- Be careful - Not all models of phones support SPP. For example NOT A SINGLE IPHONE has SPP. Sometimes jailbreaking and doing a lot of hacking you can do some clever stuff. There is expensive hardware that is Apple approved that enables a new Serial port to send vie BlueTooth SPP
For hardware check out this list of working Bluetooth adapters for the Pi.
My Pi is down right now (my SD card died and guess who didn't make a backup copy of it!) otherwise I would try to install the Bluetooth packages listed in this article. To pair your Pi with your phone you can use the
bluetooth-agent command of the