What are iBeacons / BLE ?

Currently iBeacons, or more general BLE Beacons, are a very trendy topic. By the end of the day Beacons are nothing more than small devices, doing nothing else than sending their own ID all day long. Because this is done via the BLuetooth Low Energy Standard (BLE) this is not very energy consuming. And this is why most of those devices are running with a small cell battery for a over a year without battery changes. So far not that amazing. The game starts when you have rooms, buildings or any in- or outdoor places tagged with those beacons, each sending their own ID. If you know where which beacon is placed or where which ID is sending it signal and also have any mobile device ( iOS 7+, Android 4.3+ ) with activated Bluetooth, you could create any kind of proximity service.

So in general you need two things: A signal sending beacon and a signal receiving device. Currently there are more and more vendors shipping those ready to use iBeacons ( for example estimote or sensorberg ). If you already have a Raspberry and a suiting bluetooth dongle laying arround, you could also turn them into an iBeacon:

How to create your own iBeacon with an RaspberryPI

The guys from radius networks have a nice blog post about create iBeacons with an Rasberry. I prepared a fully image, so you do not have to do all the steps.

Simple Steps ( OSX example ):

  1. Download the Raspberry PI BLE Image – raspberryBLE.img.zip  (1,02Gb) and Unzip the image file.
  2. Insert your SD Card and open the Terminal
  3. Type in
    diskutil list

    You will get a list of all your disks. You could also see the diskname of your SD card. For example /dev/disk3

  4. Open the graphical „Disk Utility“ tool. You should see the SD card and at least one partition on the SD card. Unmount all partitions of the SD card, do not eject the entire SD card itself.
  5. Go back to the terminal and use the dd command to restore the downloaded image to the SD card. Make sure that you use the right device ( see 3. ) and use rdiskX instead just diskX.
    sudo dd if=/path/to/raspberryBLE.img of=/dev/rdisk3 bs=1m
  6. You’re done. Eject the SD card, put it into your Raspberry and plug the power in. After the Raspberry booted you should see your beacon sending signals. You could test it with any beacon app.


No beacon found ?

If you could not find any beacons sending their ID within your App, make sure that your Bluetooth stick you attached to your raspberry fully supports the LE standard ( e.g. IOGEAR ). Not each Bluetooth 4.0 stick will work.

Multiple Raspberries do not work ?

If you have multiple Raspberries running with this, make sure that you change your UUID of each beacon or at least the minor value of each beacon. The UUID, the unique id each beacon is sending is defined in the ibeacon.conf file in the root directory. In this case just open this file and change the lines:

export MAJOR1="00 01"
export MINOR1="00 01"

and make this a unique value per raspberry.

 

Have fun with your iBeacon !

2 thoughts on “ Create iBeacon with RaspberryPI ”

  1. Hello, very good your tutorial.

    I’m following your tutorial, but my iBeacon don’t sent signal. i don’t know why. you said if don’t work is possible to be it Bluetooth device.

    I received that message:

    Starting ibeacon… Launching first iBeacon
    [OK] Starting NTP server: ntpd.
    LE set advertise enable on hci0 returned status 12
    ….

    After show me my UUID,Major and Minor.

    Please help me, i need this so much.

    Can you help me?

    Best regards

    Thank you.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.