BLE AMS Example
Source code path: example/ble/ams
Supported Platforms
All platforms
Overview
This example demonstrates how to trigger Apple AMS (Apple Media Service) protocol subscription and simple handling of corresponding events. AMS is an audio control protocol provided by Apple that allows access to the current iOS device’s audio playback status and control of music play, pause, etc.
Usage Instructions
The example starts advertising upon boot with the name SIFLI_APP-xx-xx-xx-xx-xx-xx, where xx represents the Bluetooth address of the device. This can be obtained using the finsh command “nvds get_mac”.
Use BLE software (LightBlue, nRF Connect, etc.) on iOS devices (iPhone or iPad) to connect to this device. Note that AMS requires pairing to complete, so you must accept when the pairing dialog appears on the iOS device.
Play music on the iOS device. This example has registered AMS Player/queue/track, and you can see related content in the logs.
Related protocol reference: AMS Official Documentation
Hardware Requirements
Before running this example, prepare:
One development board supported by this example (Supported Platforms).
iOS device.
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:
It can be connected and successfully paired by BLE software on iOS (such as LightBlue, nRF Connect).
When the iOS device plays music, the device displays related information through logs.
Troubleshooting
Reference Documentation
Update History
Version |
Date |
Release Notes |
---|---|---|
0.0.1 |
01/2025 |
Initial version |