> For the complete documentation index, see [llms.txt](https://cavedu.gitbook.io/linkit-7697/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cavedu.gitbook.io/linkit-7697/linkit-7697-development-guide-for-arduino-ide/developer-guide/using-bluetooth.md).

# Using Bluetooth

### Overview <a href="#usingbluetooth-overview" id="usingbluetooth-overview"></a>

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**.

<br>

![](https://3972650740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FY4gduUSLWOCI23CXUWej%2Fuploads%2FZS0VkNKblbM5f98QcTsx%2Fble_intro.png?alt=media\&token=4a476475-a77a-4f65-9567-42230896face)

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 <a href="#usingbluetooth-initializingbluetooth" id="usingbluetooth-initializingbluetooth"></a>

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:

* [Create a Bluetooth beacon](https://docs.labs.mediatek.com/resource/linkit7697-arduino/en/developer-guide/using-bluetooth/beacons)
* [Create a Bluetooth central device](https://docs.labs.mediatek.com/resource/linkit7697-arduino/en/developer-guide/using-bluetooth/central-devices) to connect to other peripherals
* [Create a Bluetooth peripheral device](https://docs.labs.mediatek.com/resource/linkit7697-arduino/en/developer-guide/using-bluetooth/peripheral-devices) to provide data and service to central devices
