Skip to content

Commit

Permalink
fixup! tests: Bluetooth: ISO: BIS: Use controller buffer size as SDU …
Browse files Browse the repository at this point in the history
…size

Modify the test to use the controller buffer size as the maximum
SDU size, so per default we can send up to the maximum size
the controller supports. This ensures that the tests will
never do fragmentation over HCI.

This also adds verification of the received data on the
ISO sync receiver.

Signed-off-by: Emil Gydesen <[email protected]>
  • Loading branch information
Thalley authored and cvinayak committed Nov 27, 2024
1 parent f1c1bee commit c7b1269
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
2 changes: 1 addition & 1 deletion tests/bsim/bluetooth/host/iso/bis/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CONFIG_BT_ISO_SYNC_RECEIVER=y
CONFIG_BT_ISO_MAX_CHAN=4

CONFIG_BT_ISO_TX_BUF_COUNT=4
CONFIG_BT_ISO_TX_MTU=200
CONFIG_BT_ISO_TX_MTU=180

CONFIG_BT_ISO_RX_BUF_COUNT=4
# The broadcaster may send 3 x CONFIG_BT_ISO_TX_MTU in a single SDU
Expand Down
20 changes: 6 additions & 14 deletions tests/bsim/bluetooth/host/iso/bis/src/bis_broadcaster.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,19 +241,6 @@ static void terminate_big(struct bt_iso_big *big)
big = NULL;
}

static void reset_bluetooth(void)
{
int err;

LOG_INF("Resetting Bluetooth");

err = bt_disable();
TEST_ASSERT(err == 0, "Failed to disable: %d", err);

err = bt_enable(NULL);
TEST_ASSERT(err == 0, "Failed to re-enable: %d", err);
}

static void test_main(void)
{
struct bt_le_ext_adv *adv;
Expand All @@ -280,6 +267,7 @@ static void test_main_disable(void)
{
struct bt_le_ext_adv *adv;
struct bt_iso_big *big;
int err;

init();

Expand All @@ -288,12 +276,16 @@ static void test_main_disable(void)
create_big(adv, ARRAY_SIZE(iso_chans), &big);

/* Reset BT to see if we can set it up again */
reset_bluetooth();
LOG_INF("Resetting Bluetooth");
err = bt_disable();
TEST_ASSERT(err == 0, "Failed to disable: %d", err);

/* After a disable, all advertising sets and BIGs are removed */
big = NULL;
adv = NULL;

init();

/* Set everything up again to see if everything still works as expected */
create_ext_adv(&adv);
create_big(adv, ARRAY_SIZE(iso_chans), &big);
Expand Down

0 comments on commit c7b1269

Please sign in to comment.