1#!/usr/bin/env bash
2# Copyright (c) 2024 Demant A/S
3# SPDX-License-Identifier: Apache-2.0
4
5source ${ZEPHYR_BASE}/tests/bsim/sh_common.source
6
7# Basic PAST Test: Broadcaster is broadcasting Periodic Advertisements (PA).
8# A central device syncronizes to the PA after it is synced,
9# it will connect to the peripheral device.
10# The Peripheral will subcribe to PAST using the default PAST Params
11# After connection is established the Central send a Periodic Sync Transfer (PAST)
12# to the peripheral, which then synchronizes to the PA.
13simulation_id="past_basic_default_params"
14verbosity_level=2
15
16cd ${BSIM_OUT_PATH}/bin
17
18Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_ll_bis_prj_past_conf \
19  -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=receive_past_default_param
20
21Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_ll_bis_prj_past_conf \
22  -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=broadcast_pa
23
24Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_ll_bis_prj_past_conf \
25  -v=${verbosity_level} -s=${simulation_id} -d=2 -testid=send_past
26
27Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \
28  -D=3 -sim_length=60e6 $@
29
30wait_for_background_jobs
31