Commit cbae5d5f authored by Vinayak Kariappa Chettimada's avatar Vinayak Kariappa Chettimada Committed by Fabio Baltieri
Browse files

tests: bsim: Bluetooth: Deferred ACL Tx transmission setup

Added test to verify deferred ACL Tx transmission setup,
such that GATT discovery completes with least latency and
GATT notifications can be received earliest after connection
establishment.

Signed-off-by: default avatarVinayak Kariappa Chettimada <vich@nordicsemi.no>
parent 2ab1671a
Loading
Loading
Loading
Loading
+1 −0
Changes for tests/bsim/bluetooth/ll/compile.sh: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ app=tests/bsim/bluetooth/ll/advx \
  conf_overlay=overlay-ticker_expire_info.conf compile

app=tests/bsim/bluetooth/ll/conn conf_file=prj_split.conf compile
app=tests/bsim/bluetooth/ll/conn conf_file=prj_split_tx_defer.conf compile
app=tests/bsim/bluetooth/ll/conn conf_file=prj_split_privacy.conf compile
app=tests/bsim/bluetooth/ll/conn conf_file=prj_split_low_lat.conf compile
app=tests/bsim/bluetooth/ll/conn conf_file=prj_split_single_timer.conf compile
+19 −0
Changes for tests/bsim/bluetooth/ll/conn/prj_split_tx_defer.conf: 19 added lines, 0 removed lines.
Original line number Diff line number Diff line
CONFIG_BT=y
CONFIG_LOG=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_PRIVACY=y
CONFIG_BT_SMP=y
CONFIG_BT_SIGNING=y
CONFIG_BT_BAS=y
CONFIG_BT_HRS=y
CONFIG_BT_ATT_PREPARE_COUNT=2
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_BT_DEVICE_NAME="bsim_test_split"
CONFIG_BT_L2CAP_TX_BUF_COUNT=6

CONFIG_BT_CTLR_PRIVACY=n

CONFIG_BT_CTLR_ADVANCED_FEATURES=y
CONFIG_BT_CTLR_TX_DEFER=y
+5 −0
Changes for tests/bsim/bluetooth/ll/conn/src/test_connect1.c: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ static uint8_t connected_signal;
 */

#define WAIT_TIME 6 /*seconds*/
#define WAIT_TIME_TX_DEFER 800 /* milliseconds */
#define WAIT_TIME_REPEAT 22 /*seconds*/
extern enum bst_result_t bst_result;

@@ -77,7 +78,11 @@ extern enum bst_result_t bst_result;

static void test_con1_init(void)
{
	if (IS_ENABLED(CONFIG_BT_CTLR_TX_DEFER)) {
		bst_ticker_set_next_tick_absolute(WAIT_TIME_TX_DEFER*1e3);
	} else {
		bst_ticker_set_next_tick_absolute(WAIT_TIME*1e6);
	}
	bst_result = In_progress;
}

+4 −0
Changes for tests/bsim/bluetooth/ll/conn/src/test_connect2.c: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -209,7 +209,11 @@ static void test_con2_main(void)
	 * of starting delayed work so we do it here
	 */
	while (1) {
		if (IS_ENABLED(CONFIG_BT_CTLR_TX_DEFER)) {
			k_sleep(K_MSEC(1));
		} else {
			k_sleep(K_SECONDS(1));
		}

		/* Heartrate measurements simulation */
		hrs_notify();
+25 −0
Changes for tests/bsim/bluetooth/ll/conn/tests_scripts/basic_conn_split_tx_defer.sh: 25 added lines, 0 removed lines.
Original line number Diff line number Diff line
#!/usr/bin/env bash
# Copyright 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

source ${ZEPHYR_BASE}/tests/bsim/sh_common.source

# Basic connection test: a central connects to a peripheral and expects a
# notification, using the split controller (ULL LLL)
simulation_id="basic_conn_split_tx_defer"
verbosity_level=2

cd ${BSIM_OUT_PATH}/bin

Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_ll_conn_prj_split_tx_defer_conf \
  -v=${verbosity_level} -s=${simulation_id} -d=0 -RealEncryption=0 \
  -testid=peripheral -rs=23

Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_ll_conn_prj_split_tx_defer_conf\
  -v=${verbosity_level} -s=${simulation_id} -d=1 -RealEncryption=0 \
  -testid=central -rs=6

Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \
  -D=2 -sim_length=20e6 $@

wait_for_background_jobs