BT Music Sink Example

Source code path: example/bt/music_sink

Supported Platforms

  • eh-lb52x

  • eh-lb56x

  • eh-lb58x

Overview

This example demonstrates playing music from source devices on the local device after connecting to mobile phones and other A2DP Source devices via Bluetooth.

Example Usage

The example enables Bluetooth Inquiry scan and page scan on startup, allowing A2DP source devices like mobile phones to discover this device and initiate connections. After connection, mobile phone music can be played. The default Bluetooth name of this device is sifli_music_sink.

Hardware Requirements

Before running this example, you need to 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, 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 relevant introduction in Quick Start.

Expected Results

After the example starts: A2DP source devices like mobile phones can connect to this device and play music.

Exception Diagnosis

Reference Documentation

Update History

Version

Date

Release Notes

0.0.1

01/2025

Initial version