# Overview

The relationship between the platform and BLE stack library can be seen in the following picture.

![](https://1555789063-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lj1MxDmShTQrCAMd7Sr%2F-Lj1MyjBj93yCY6nPMFc%2F-Lj1NZG5CiTk3UNjmdvJ%2Fimport15.png?generation=1562334349000531\&alt=media)

* BLE\_serialDriver.h, which contains the BLE basic settings library
* BLE\_stateHandler.h, which contains the BLE configuration and communication library
* BleAlpwDataExchange\_Server.h, which contains the ALPWISE Data Exchange Service for the server role

## Functions

| Function                             | Description                                                                                                       |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
| `BLE_coreStackInit()`                | Initialize the entire BLE stack, including transport layers and radio frequency settings                          |
| `BLE_coreStateMachine()`             | Run the BLE stack and register a BLE device with the specified BLE role, device name and configuration parameters |
| `BLE_customServiceRegistry()`        | Register an application callback for the custom BLE service                                                       |
| `BLE_enablenotificationForConnect()` | Enable/Disable the callback function for device connection and disconnection notification                         |
| `BLE_setDeviceName()`                | Set the BLE device name before registering the device                                                             |
| `BLE_sendData()`                     | Transmit data to the other BLE device after connecting to it                                                      |
