Develop a BLE application with Arduino and Bluefruit boards and Test with iphone LightBlue

Make it to the Right and Larger Audience


Develop a BLE application with Arduino and Bluefruit boards and Test with iphone LightBlue

Bluetooth low energy (BLE) is introduced as a light-weight subset of Bluetooth since Bluetooth 4.0. It originates from Nokia’s Wibree project and is quite different from Bluetooth by all means. There are many good BLE tutorials online and one of them is from Adafruit,

When BLE peripheral device is powered up, it periodically sends out (advertises) advertising data. BLE central device listens (scans) for advertisement and acquires surrounding BLE peripheral devices’ characteristics. This procedure is shown below. Central device can also send “scan response request” message so peripheral can respond with more information with “scan response data”. At protocol layer, this advertising process is governed by the so-called GAP (Generic Access Profile) profile.


In advertising process, peripheral device is not “connected” to central device yet and its advertisement can be pick up by multiple central devices. To setup a one-to-one connection, peripheral and central devices need to go through the following procedure.


Once connection is up, devices follow below procedure to exchange data. Central device which is the master sends out request and peripheral device responds with response data. This process repeats per connection interval. What is not shown in the drawing is within one connection interval, master/slave can also exchange data multiple times.


The communication in this connected state is governed by GATT (Generic Attribute Profile) profile which makes use of a generic data protocol called ATT (Attribute Protocol). GATT defiles profiles, services, and characteristics to represent, store, and transmit data. A profile can have multiple services and a service can have multiple characteristics. Profile and service can be predefined by Bluetooth SIG or be defined by users. It is characteristics really holds data of interest. Each characteristic distinguishes itself via a 16bit or 128bit UUID.

With above fundamental information about BLE, let’s take a look of a simple BLE application using Arduino and Bluefruit. Arduino is a popular open-source microcontroller development platform and Bluefruit is an BLE board using Nordic nRF8001 developed by adafruit.

The connection of these two are shown as below.


Below is Arduino code:

The following is site premium content.
Use points to gain access. You can either purchase points or contribute content and use contribution points to gain access.
Highlights: 3561 words
Firmware engineer
Author brief is empty

  1. mazhar 3 months ago

    Thanks for sharing!

  2. echatterjee 5 years ago

    Turns out having BLE working on Arduino is pretty simple thanks to the BLE library which does the heavy-lifting. For those who may wonder, the article uses a generic app on iOS and android to test the system.

  3. jieFan 5 years ago

    Nice article. Better with more complicated design.

  4. Indeed! I found another good reference for BLE on Arduino. It is using the same Arduino UNO + Adafruit Bluefruit board setup but the firmware uses Adafruit BLE library instead of BLEPeripheral.

  5. ZakH 5 years ago

    Good practical BLE dev tutorial. It is based on BLEPeripheral library. I can’t find a good tutorial about this library. Here is some resource about this lib with some simple example:


Contact Us

Thanks for helping us better serve the community. You can make a suggestion, report a bug, a misconduct, or any other issue. We'll get back to you using your private message ASAP.



Forgot your details?