-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bluetooth: CCP: Initial CCP Client implemenation
Added initial CCP client implementation that simply does discovery of TBS on a remote CCP server. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
- Loading branch information
Showing
44 changed files
with
1,678 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
project(ccp_call_control_client) | ||
|
||
target_sources(app PRIVATE | ||
src/main.c | ||
) | ||
|
||
zephyr_library_include_directories(${ZEPHYR_BASE}/samples/bluetooth) |
15 changes: 15 additions & 0 deletions
15
samples/bluetooth/ccp_call_control_client/Kconfig.sysbuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright 2023 Nordic Semiconductor ASA | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
source "share/sysbuild/Kconfig" | ||
|
||
config NET_CORE_BOARD | ||
string | ||
default "nrf5340dk/nrf5340/cpunet" if "$(BOARD)" = "nrf5340dk" | ||
default "nrf5340_audio_dk/nrf5340/cpunet" if "$(BOARD)" = "nrf5340_audio_dk" | ||
default "nrf5340bsim/nrf5340/cpunet" if $(BOARD_TARGET_STRING) = "NRF5340BSIM_NRF5340_CPUAPP" | ||
|
||
config NET_CORE_IMAGE_HCI_IPC | ||
bool "HCI IPC image on network core" | ||
default y | ||
depends on NET_CORE_BOARD != "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
.. zephyr:code-sample:: bluetooth_ccp_call_control_client | ||
:name: Call Control Profile (CCP) Call Control Server | ||
:relevant-api: bluetooth bt_ccp bt_tbs | ||
|
||
CCP Call Control Server sample that registers one or more TBS bearers and advertises the | ||
TBS UUID(s). | ||
|
||
Overview | ||
******** | ||
|
||
Application demonstrating the CCP Call Control Client functionality. | ||
Starts by scanning for a CCP Call Control Server to connect and set up calls. | ||
|
||
The profile works for both GAP Central and GAP Peripheral devices, but this sample only assumes the | ||
GAP Central role. | ||
|
||
This sample can be found under :zephyr_file:`samples/bluetooth/ccp_call_control_client` | ||
in the Zephyr tree. | ||
|
||
Check the :zephyr:code-sample-category:`bluetooth` samples for general information. | ||
|
||
Requirements | ||
************ | ||
|
||
* BlueZ running on the host, or | ||
* A board with Bluetooth Low Energy 5.2 support | ||
|
||
Building and Running | ||
******************** | ||
|
||
When building targeting an nrf52 series board with the Zephyr Bluetooth Controller, | ||
use ``-DOVERLAY_CONFIG=overlay-bt_ll_sw_split.conf`` to enable the required feature support. | ||
|
||
Building for an nrf5340dk | ||
------------------------- | ||
|
||
You can build both the application core image and an appropriate controller image for the network | ||
core with: | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/bluetooth/ccp_call_control_client/ | ||
:board: nrf5340dk/nrf5340/cpuapp | ||
:goals: build | ||
:west-args: --sysbuild | ||
|
||
If you prefer to only build the application core image, you can do so by doing instead: | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/bluetooth/ccp_call_control_client/ | ||
:board: nrf5340dk/nrf5340/cpuapp | ||
:goals: build | ||
|
||
In that case you can pair this application core image with the | ||
:zephyr:code-sample:`bluetooth_hci_ipc` sample | ||
:zephyr_file:`samples/bluetooth/hci_ipc/nrf5340_cpunet_iso-bt_ll_sw_split.conf` configuration. | ||
|
||
Building for a simulated nrf5340bsim | ||
------------------------------------ | ||
|
||
Similarly to how you would for real HW, you can do: | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/bluetooth/ccp_call_control_client/ | ||
:board: nrf5340bsim/nrf5340/cpuapp | ||
:goals: build | ||
:west-args: --sysbuild | ||
|
||
Note this will produce a Linux executable in :file:`./build/zephyr/zephyr.exe`. | ||
For more information, check :ref:`this board documentation <nrf5340bsim>`. | ||
|
||
Building for a simulated nrf52_bsim | ||
----------------------------------- | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/bluetooth/ccp_call_control_client/ | ||
:board: nrf52_bsim | ||
:goals: build | ||
:gen-args: -DOVERLAY_CONFIG=overlay-bt_ll_sw_split.conf |
6 changes: 6 additions & 0 deletions
6
samples/bluetooth/ccp_call_control_client/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG_BT_BUF_EVT_RX_SIZE=255 | ||
CONFIG_BT_BUF_ACL_RX_SIZE=255 | ||
CONFIG_BT_BUF_ACL_TX_SIZE=251 | ||
CONFIG_BT_BUF_CMD_TX_SIZE=255 | ||
|
||
CONFIG_BT_SEND_ECC_EMULATION=y |
6 changes: 6 additions & 0 deletions
6
samples/bluetooth/ccp_call_control_client/boards/nrf5340dk_nrf5340_cpuapp.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG_BT_BUF_EVT_RX_SIZE=255 | ||
CONFIG_BT_BUF_ACL_RX_SIZE=255 | ||
CONFIG_BT_BUF_ACL_TX_SIZE=251 | ||
CONFIG_BT_BUF_CMD_TX_SIZE=255 | ||
|
||
CONFIG_BT_SEND_ECC_EMULATION=y |
6 changes: 6 additions & 0 deletions
6
samples/bluetooth/ccp_call_control_client/overlay-bt_ll_sw_split.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Zephyr Bluetooth Controller | ||
CONFIG_BT_LL_SW_SPLIT=y | ||
|
||
# Zephyr Controller tested maximum advertising data that can be set in a single HCI command | ||
CONFIG_BT_CTLR_ADV_DATA_LEN_MAX=191 | ||
CONFIG_BT_CTLR_SCAN_DATA_LEN_MAX=191 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
CONFIG_BT=y | ||
CONFIG_LOG=y | ||
CONFIG_BT_CENTRAL=y | ||
CONFIG_BT_GATT_CLIENT=y | ||
CONFIG_BT_GATT_AUTO_DISCOVER_CCC=y | ||
CONFIG_BT_AUDIO=y | ||
CONFIG_BT_EXT_ADV=y | ||
CONFIG_BT_DEVICE_NAME="CCP Call Control Client" | ||
|
||
CONFIG_BT_SMP=y | ||
CONFIG_BT_KEYS_OVERWRITE_OLDEST=y | ||
|
||
# CCP support | ||
CONFIG_BT_CCP_CALL_CONTROL_CLIENT=y | ||
CONFIG_BT_CCP_CALL_CONTROL_CLIENT_BEARER_COUNT=2 | ||
CONFIG_BT_TBS_CLIENT_GTBS=y | ||
CONFIG_BT_TBS_CLIENT_TBS=y | ||
CONFIG_BT_TBS_CLIENT_MAX_TBS_INSTANCES=1 | ||
CONFIG_UTF8=y | ||
|
||
# TBS Client may require up to 12 buffers | ||
CONFIG_BT_ATT_TX_COUNT=12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
sample: | ||
description: Bluetooth Low Energy Call Control Profile Server sample | ||
name: Bluetooth Low Energy Call Control Profile Server sample | ||
tests: | ||
sample.bluetooth.ccp_call_control_client: | ||
harness: bluetooth | ||
platform_allow: | ||
- qemu_cortex_m3 | ||
- qemu_x86 | ||
- nrf5340dk/nrf5340/cpuapp | ||
- nrf5340bsim/nrf5340/cpuapp | ||
integration_platforms: | ||
- qemu_x86 | ||
- nrf5340dk/nrf5340/cpuapp | ||
tags: bluetooth | ||
sysbuild: true | ||
sample.bluetooth.ccp_call_control_client.bt_ll_sw_split: | ||
harness: bluetooth | ||
platform_allow: | ||
- nrf52_bsim | ||
- nrf52833dk/nrf52833 | ||
- nrf52840dk/nrf52840 | ||
- nrf52840dongle/nrf52840 | ||
integration_platforms: | ||
- nrf52_bsim | ||
- nrf52833dk/nrf52833 | ||
- nrf52840dk/nrf52840 | ||
- nrf52840dongle/nrf52840 | ||
extra_args: OVERLAY_CONFIG=overlay-bt_ll_sw_split.conf | ||
tags: bluetooth |
Oops, something went wrong.