1#!/usr/bin/env bash 2# Copyright 2022 Nordic Semiconductor ASA 3# SPDX-License-Identifier: Apache-2.0 4 5# Usage: 6# one script instance per device, e.g. to run gdb on the client: 7# `_notify-debug.sh client debug` 8# `_notify-debug.sh server` 9# `_notify-debug.sh` 10# 11# GDB can be run on the two devices at the same time without issues, just append 12# `debug` when running the script. 13 14source ${ZEPHYR_BASE}/tests/bsim/sh_common.source 15 16simulation_id="notify_multiple" 17verbosity_level=2 18 19cd ${BSIM_OUT_PATH}/bin 20 21if [[ $2 == "debug" ]]; then 22 GDB_P="gdb --args " 23fi 24 25if [[ $1 == "client" ]]; then 26$GDB_P ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_notify_multiple_prj_conf \ 27 -v=${verbosity_level} -s=${simulation_id} -d=0 -testid=gatt_client 28 29elif [[ $1 == "server" ]]; then 30$GDB_P ./bs_${BOARD_TS}_tests_bsim_bluetooth_host_gatt_notify_multiple_prj_conf \ 31 -v=${verbosity_level} -s=${simulation_id} -d=1 -testid=gatt_server 32 33else 34./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ 35 -D=2 -sim_length=60e6 $@ 36 37fi 38