zephyr/tests/bsim/bluetooth/audio/test_scripts/csip.sh
Emil Gydesen d19abff476 Bluetooth: CSIP: Add support for dynamically setting set size
The set size can now be dynamically set and notified.
The rank is added as a argument in the case that changing
the set size, also affects the device's rank, as ranks
in a coordinated set needs to be continuous.

The set coordinator implementation has been updated
to support receiving the new set size, and providing
this information to the upper layers.

This commit adds a babblesim test for the new API,
as well as a shell command.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-20 14:23:40 +01:00

40 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
#
# Copyright (c) 2020-2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: Apache-2.0
# Basic CSIP test. A set coordinator connects to multiple set members
# lock thems, unlocks them and disconnects.
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
VERBOSITY_LEVEL=2
EXECUTE_TIMEOUT=100
cd ${BSIM_OUT_PATH}/bin
SIMULATION_ID="csip"
Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf \
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=0 -testid=csip_set_coordinator \
-RealEncryption=1 -rs=10 -D=4
Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf \
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=1 -testid=csip_set_member \
-RealEncryption=1 -rs=20 -D=4 -argstest rank 1 size 3
Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf \
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=2 -testid=csip_set_member \
-RealEncryption=1 -rs=30 -D=4 -argstest rank 2 size 3
Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf \
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=3 -testid=csip_set_member \
-RealEncryption=1 -rs=40 -D=4 -argstest rank 3 size 3
# Simulation time should be larger than the WAIT_TIME in common.h
Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \
-D=4 -sim_length=60e6 $@
wait_for_background_jobs