BLE iBeacon Advertisement Example

Source code path: example/ble/iBeacon

Supported Platforms

  • eh-lb52x

  • eh-lb56x

  • eh-lb58x

Overview

This example demonstrates the usage of iBeacon advertisement.

Usage Instructions

  1. After booting, the iBeacon broadcast will be enabled. You can refer to the implementation of ble_app_ibeacon_advertising_start(). The default iBeacon broadcast content is UUID: 95d0b422-a4bd-45d4-9920-576bc6632372, Major: 256, Minor: 258, RSSI at 1m: -50 dBm.

  2. Use the finsh command “cmd_diss adv_update [UUID] [Major] [Minor] [RSSI_at_1m]” to modify the broadcast content. The UUID format should be like “12345678-1234-1234-1234-123456789abc”; Major value range is 0–65535; Minor value range is 0–65535; RSSI_at_1m value range is -128 to 127.

  3. Use the finsh commands “cmd_diss adv_start” and “cmd_diss adv_stop” to enable and stop the iBeacon broadcast, respectively.

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 perform iBeacon advertisement and modify advertisement content.

Troubleshooting

Reference Documentation

Update History

Version

Date

Release Notes

0.0.1

09/2025

Initial version