1#!/usr/bin/env bash
2#
3# Copyright (c) 2023-2024 Nordic Semiconductor ASA
4#
5# SPDX-License-Identifier: Apache-2.0
6
7# CSIP test where the SIRK is encrypted
8
9source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
10
11VERBOSITY_LEVEL=2
12
13cd ${BSIM_OUT_PATH}/bin
14
15SIMULATION_ID="csip_sirk_encrypted"
16
17printf "\n\n======== Running test with SIRK encrypted ========\n\n"
18Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf \
19  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=0 -testid=csip_set_coordinator \
20  -RealEncryption=1 -rs=1 -D=4
21
22Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf \
23  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=1 -testid=csip_set_member_enc \
24  -RealEncryption=1 -rs=2 -D=4 -argstest rank 1
25
26Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf \
27  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=2 -testid=csip_set_member_enc \
28  -RealEncryption=1 -rs=3 -D=4 -argstest rank 2
29
30Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf \
31  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=3 -testid=csip_set_member_enc \
32  -RealEncryption=1 -rs=4 -D=4 -argstest rank 3
33
34# Simulation time should be larger than the WAIT_TIME in common.h
35Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \
36  -D=4 -sim_length=60e6 $@
37
38wait_for_background_jobs
39