Bluetooth Low Energy (BLE)

Bluetooth low energy (BLE) is a very low power wireless technology standard for personal area networks. Typical applications of BLE are health care, fitness trackers, beacons, smart home, security, entertainment, proximity sensors, industrial and automotive.

mbed BLE, also called BLE_API, is the Bluetooth Low Energy software solution for mbed. This thin abstraction runs on many targets and allows developers to create new BLE applications.

Getting started

  1. Choose an mbed board that supports BLE, such as the NRF51-DK.

    If your platform doesn’t support BLE but is compatible with the Arduino UNO R3 connector, you can use an extension board such as the X-NUCLEO-IDB05A1 to add BLE capabilities to your development board.

  2. Install a BLE scanner on your phone. It allows you to track all BLE activities from your embedded application. This is a mandatory tool for BLE software development:

  3. Compile and run our BLE samples:

    • mbed OS 5 samples are available on developer.mbed.org and Github:
      • The beacon example is a good starting point; it demonstrates how you can create a BLE beacon with just a few lines of code.
      • The heart rate monitor example demonstrates how to build a heart rate sensor that can be connected and monitored by a BLE client such as your phone.
      • The LED and LED blinker are a single example, which demonstrates how a client (LED) and a server (LED blinker) work together over BLE.

    Tip: Despite the differences between the different mbed OS versions, there is only one version of mbed BLE, and it is easy to move code from one version of the OS to another. Choose the sample you use according to the version of mbed OS supported by your development board.

Going further

  • Introduction to mbed BLE is a resource for developers new to BLE and mbed BLE. It covers how to build BLE embedded applications with mbed.

  • The Bluetooth Low Energy main page on developer.mbed.org also provide samples and resources around BLE.

  • The mbed BLE API reference offer the full details of the API.

  • The mbed BLE online community is also a great place to ask questions and share your knowledge.

API reference