WiPiBeacon uses a Raspberry Pi B+, Bluetooth 4.0 dongle, and WiFi adapter to convert a Pi into an iBeacon running an local WiFi network and a LAMP server.
The Pi is discoverable by an iPhone app, which can then connect to the Pi’s WiFi network and pull down data from the Pi’s web server or trigger content on a screen attached to the Pi that is customisable to the iPhone within its proximity.
Steps for setting up the Raspberry Pi as an iBeacon
You need to install the official Linux Bluetooth software stack, BlueZ, and various USB development packages, some using the
apt-get tool at the command line. These commands require an internet connection.
First run this:
sudo apt-get install libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev
sudo apt-get install bluetooth bluez-utils blueman
To start broadcasting:
sudo hciconfig hci0 up
sudo hciconfig hci0 leadv
sudo hciconfig hci0 noscan
sudo hcitool -i hci0 cmd 0x08 0x008 1E 02 01 1A 1A FF 4C 00 02 15 92 77 83 01 B2 EB 49 0F A1 DD 7F E3 8C 49 2E DE 00 00 00 00 C5 00
The unique identifier for the iBeacon in the example above is
92 77 83 01 B2 EB 49 0F A1 DD 7F E3 8C 49 2E DE and can be swapped for a key of your choosing, however it must match that listed in your app.
I recommend downloading HiBeacons by Nick Tournpelis which is a great demo app for finding iBeacons and a good place to start if you are unfamiliar with the Bluetooth framework.
Just change the constant kUUID string to whatever you have set the iBeacon identifier to be.
static NSString * const kUUID = @"00000000-0000-0000-0000-000000000000";
To the below if using the same code as above.
static NSString * const kUUID = @"9277830A-B2EB-490F-A1DD-7FE38C492EDE";
You will also require a MicroSD card and SD adapter if using a B+, power supply, keyboard, mouse and screen.