README.rst
1.. zephyr:code-sample:: bluetooth_cap_initiator
2 :name: Common Audio Profile (CAP) Initiator
3 :relevant-api: bluetooth bt_bap bt_cap bt_conn
4
5 Connect to CAP Acceptors and setup unicast audio streaming or broadcast audio streams.
6
7Overview
8********
9
10Application demonstrating the CAP Initiator functionality.
11Starts by either scanning for a CAP Acceptor and then connects to and sets up available unicast
12audio streams, sets up a broadcast audio stream, or both.
13
14Check the :zephyr:code-sample-category:`bluetooth` samples for general information.
15
16Requirements
17************
18
19* BlueZ running on the host, or
20* A board with Bluetooth Low Energy 5.2 support
21
22Building and Running
23********************
24
25When building targeting an nrf52 series board with the Zephyr Bluetooth Controller,
26use ``-DEXTRA_CONF_FILE=overlay-bt_ll_sw_split.conf`` to enable the required ISO
27feature support.
28
29Building for an nrf5340dk
30-------------------------
31
32You can build both the application core image and an appropriate controller image for the network
33core with:
34
35.. zephyr-app-commands::
36 :zephyr-app: samples/bluetooth/cap_initiator/
37 :board: nrf5340dk/nrf5340/cpuapp
38 :goals: build
39 :west-args: --sysbuild
40
41If you prefer to only build the application core image, you can do so by doing instead:
42
43.. zephyr-app-commands::
44 :zephyr-app: samples/bluetooth/cap_initiator/
45 :board: nrf5340dk/nrf5340/cpuapp
46 :goals: build
47
48In that case you can pair this application core image with the
49:zephyr:code-sample:`bluetooth_hci_ipc` sample
50:zephyr_file:`samples/bluetooth/hci_ipc/nrf5340_cpunet_iso-bt_ll_sw_split.conf` configuration.
51
52Building for a simulated nrf5340bsim
53------------------------------------
54
55Similarly to how you would for real HW, you can do:
56
57.. zephyr-app-commands::
58 :zephyr-app: samples/bluetooth/cap_initiator/
59 :board: nrf5340bsim/nrf5340/cpuapp
60 :goals: build
61 :west-args: --sysbuild
62
63Note this will produce a Linux executable in :file:`./build/zephyr/zephyr.exe`.
64For more information, check :ref:`this board documentation <nrf5340bsim>`.
65
66Building for a simulated nrf52_bsim
67-----------------------------------
68
69.. zephyr-app-commands::
70 :zephyr-app: samples/bluetooth/cap_initiator/
71 :board: nrf52_bsim
72 :goals: build
73 :gen-args: -DEXTRA_CONF_FILE=overlay-bt_ll_sw_split.conf
74