Raspberry Pi Bluetooth In/Out Board or “Who’s Home”

I wanted to create an electronic In/Out Board. The type you may have to record who is present or not in a company or home. It is usually placed by the front entrance so anyone can see who is in or out.

I also wanted another project for my Raspberry Pi, so that is why I am using it, but it makes a really good lower power choice of computer to drive this application. There are many extensions to this basic instructable, because of the Pi, like run a web server to show who is in and out via a web page, or run a local LCD display.

There is one major assumption here, that everyone carries a mobile phone and they are willing to keep bluetooth on (is that two assumptions? :-/). Their bluetooth must be on but it is NOT necessary to be ‘discoverable’ for this to work. Each person must only make there device discoverable for a short time so you can determine their bluetooth address. Once that is found, this device will just query the presence of that known bluetooth device.

I call it my “Who’s Home” device.Raspberry Pi Bluetooth In Out Board or Who's Home

Step 1: Raspberry Pi Setup

Let’s get started.

You will need:
A Raspberry Pi computer, I tested with the 512 MB model, with internet connection.
An SD card loaded with the latest Raspbian “wheezy” software. See http://www.raspberrypi.org/downloads for how to get that setup.
A supported bluetooth USB dongle. See http://elinux.org/RPi_VerifiedPeripherals#USB_Bluetooth_adapters
Some way to access a terminal on the Pi. I used ssh, or just use the normal desktop and open Terminal.

Step 2: Install bluetooth software

At the terminal type the command

sudo apt-get install bluez

this will take a little while to install the bluetooth drivers and software.
Also needed is the the pybluez interface from Python to bluetooth.

sudo apt-get install python-bluez

If you have not already, insert your bluetooth dongle into a USB port on the pi.
At the terminal you can use hcitool to check your device, e.g. type

hcitool devRaspberry Pi Bluetooth In Out Board or Who's Home schematic

Step 3: Get bluetooth device addresses

You can use the inquiry.py script from the pybluez website to query the nearby discoverable devices.

At the pi terminal:
wget https://pybluez.googlecode.com/svn/trunk/examples/simple/inquiry.py
python inquiry.py

You will need the long address, numbers separated by :’s for the next step.


For more detail: Raspberry Pi Bluetooth In/Out Board or “Who’s Home”

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top