BLE peripheral Example

Source code path: example/ble/peripheral

Supported Platforms

All platforms

Overview

This example demonstrates how to implement GAP peripheral and GATT server functionality on this platform.

Usage Instructions

  1. When operating as a slave device, the board starts advertising upon boot with the name SIFLI_APP-xx-xx-xx-xx-xx-xx, where xx represents the Bluetooth address of the device. It can be connected via BLE apps on mobile phones.

  2. When operating as a GATT server, write and read operations can be performed from the mobile client, or by enabling CCCD, the device will update the characteristic value every second.

Hardware Requirements

Before running this example, prepare:

Compilation and Flashing

Switch to the example project directory and run the scons command to compile:

> scons --board=eh-lb525 -j32

Switch to the example project/build_xx directory and run uart_download.bat, then select the port as prompted to download:

$ ./uart_download.bat

     Uart Download

please input the serial port num:5

For detailed compilation and download steps, please refer to the Quick Start Guide.

Expected Results

After the example starts:

  1. It can be discovered and connected by mobile BLE apps, allowing corresponding GATT characteristic value read/write operations.

Troubleshooting

Reference Documentation

Update History

Version

Date

Release Notes

0.0.1

01/2025

Initial version