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# After connection is established the Central send a Periodic Sync Transfer (PAST)
11# to the peripheral, which then synchronizes to the PA.
12simulation_id="past_basic"
13verbosity_level=2
14
15cd ${BSIM_OUT_PATH}/bin
16
17Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_ll_bis_prj_past_conf \
18  -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=receive_past
19
20Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_ll_bis_prj_past_conf \
21  -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=broadcast_pa
22
23Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_ll_bis_prj_past_conf \
24  -v=${verbosity_level} -s=${simulation_id} -d=2 -testid=send_past
25
26Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \
27  -D=3 -sim_length=60e6 $@
28
29wait_for_background_jobs
30