Skip to content
Rex St. John

Get in touch

Configure Intel Edison for Bluetooth LE (Smart) Development

Thanks to Fab-Lab.eu for compiling this awesome reference in the Intel community forum.

Originally published on the rexstjohn.com blog

Tags
  • ios
  • nodejs
  • intel-edison

Originally published at rexstjohn.com on November 16, 2014. Recovered from the Internet Archive.

Thanks to Fab-Lab.eu for compiling this awesome reference in the Intel community forum.

Note: There is a known bug with BlueZ and Bleno, keep an eye on this bug.

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.

Before we proceed, make sure your Edison is online via Wi-Fi.

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 use Edison with Bluetooth LE.

The key to getting Bleno working seems to be this:

rfkill unblock bluetooth
killall bluetoothd
hciconfig hci0 up

Note: Learn to make friends with these “hciconfig” commands. Use the above sequence if you are having problems connecting to your device via a BLE scanner. Here are some other handy commands:

  • hciconfig hci0 leadv (tell Edison to begin advertising it’s BLE services)
  • hciconfig hci0 reset (sometimes necessary if things don’t seem to be broadcasting)
  • hciconfig hci0 leadv 1-3 commands (completely undocumented, something about different advertising modes)
  • hciconfig hci0 noleadv (disable advertising)

I have found also it is important to be handy with “killall node” when using Bleno…Cntrl + C doesn’t get the job done, especially if you are using Intel XDK and a terminal.