Lets Turn Intel Edison Into An iBeacon!

Lets turn Intel Edison into an iBeacon!  You will need a Mac, an Intel Edison and an iPhone or iPad with the latest iOS to run through this example.

Note: There is a known bug with BlueZ and Bleno, keep an eye on this bug. I have better expanded coverage of a working solution in my other post linked here.

Before we start, we must first thank Fab-Lab.eu for compiling this awesome reference in the Intel community forum. Thanks Fab-Lab.eu for being the best!

Step 1: Install all the things

Assuming you have a current Intel Edison (this guide may be subject to change if new updates are released), perform the following steps:

  • Plug both your Micro-USB cables into Edison (which has been snapped into a large Arduino break-out board)
  • Open terminal and type: “screen /dev/cu.(TAB to autocomplete your Edison port name) 115200 -L” as per the Intel guides

Now lets turn on BLE (again, quoted from Fab-Lab.eu’s guide linked above):

rfkill unblock bluetooth
hciconfig hci0 up

vi /etc/opkg/base-feeds.conf (insert only following lines)
src/gz all http://repo.opkg.net/edison/repo/all
src/gz edison http://repo.opkg.net/edison/repo/edison
src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32

Note: “vi” is a barebones text editor which has some confusing syntax. Copy and paste (e.g. vi’s insert mode) the above three lines into the .conf file indicated and then close vi by hitting “Shift + :” (to leave Insert mode) after making the above edit and then typing “wq” and hitting enter to write the change and then quit.

Now run:

opkg update
opkg install bluez5-dev

Next, we will install Bleno and Noble, useful Node.js utilities for doing fun stuff with BLE and Javascript:

npm install -g async
npm install noble
npm install bleno

Once this is done, you should be able to turn Edison into an iBeacon.

Step 2: Set our iBeacon UUID

Print out the contents of “node_modules/bleno/test-ibeacon.js” by running the following command in the terminal:

cat node_modules/bleno/test-ibeacon.js

Look at the following line:

bleno.startAdvertisingIBeacon('e2c56db5dffb48d2b060d0f5a71096e0', 0, 0, -59);

This effectively instructs Bleno to act as a beacon with the included line of numbers and letters as it’s identifier. Now run the following command to start the iBeacon behavior:

node node_modules/bleno/test-ibeacon.js

You should see this:

Screen Shot 2014-11-15 at 3.40.46 PM

Detecting our “Edison” iBeacon

Lets prove to ourselves that our Edison is indeed an iBeacon now by detecting it with our iPhone or iPad. Take a moment and go to the AppStore on your iOS device and download the following app: Locate Beacons.

Note: Make sure you have Bluetooth enabled, the button is located on the “pull up” menu in iOS 8.

When you run “Locate Beacons,” tap the button “Locate iBeacons.”  Now you should see an iBeacon with a suspiciously similar UUID (with all caps and “-” characters now) string of numbers and letters as below:

beacon