Using Bluetooth

Overview

LinkIt 7697 supports Bluetooth Low Energy by providing the LBLE library. However, it does not support classic profiles such as Bluetooth BR or EDR.

A Bluetooth Low Energy device is either a central device or a peripheral device. A peripheral device, such as a heart rate sensor, advertises itself by broadcasting information to others. A central device discovers nearby peripheral devices, and connects to the peripheral device to access its attributes, such as services or characteristics.


In the Arduino supporting package, an LBLE library with the following classes are provided:

  • LBLE class are used to initialize Bluetooth Low Energy subsystem.
  • LBLECentral class provides basic central device operations, such as scanning for nearby peripherals.
  • LBLEPeripheral class provides basic peripheral device features, including:
    • Setting advertisement package.
    • Configuring characteristics and services.

Initializing Bluetooth

On LinkIt 7697, you must initialize the Bluetooth subsystem before using it. In order to do so, you need to call LBLE.begin() first and wait for the initialization sequence to complete by checking LBLE.ready().

LBLE.begin();
while(!LBLE.ready())
{
    delay(50);
}

You must initialize the Bluetooth subsystem before using any other Bluetooth functions, including central and peripheral classes.

After intializing the Bluetooth subsystem, you have the following choices: