1#!/usr/bin/env bash 2# Copyright 2024 Nordic Semiconductor 3# SPDX-License-Identifier: Apache-2.0 4 5source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh 6 7# The test checks that both advertisers, the legacy and the extended, behave identically. 8# In particular: 9# - `bt_mesh_send_cb.end` callback with error code `0` is called for the advertisement that the 10# advertiser already pushed to the ble host (called `bt_mesh_send_cb.start`), 11# - `bt_mesh_send_cb.start` callback with error `-ENODEV` is called for every advertisement that 12# was pushed to the mesh advertiser using `bt_mesh_adv_send` function, 13# - `bt_mesh_adv_create` returns NULL when attempting to create a new advertisement while the stack 14# is suspended. 15# 16# Tx device procedure: 17# 1. Tx device creates `CONFIG_BT_MESH_ADV_BUF_COUNT` advertisements, setting the first byte of the 18# PDU to 0xAA and the second byte of the PDU to the advertisement order number 19# 2. Tx devices pushes all created advs to the pool by calling `bt_mesh_adv_send` function 20# 3. When the `bt_mesh_send_cb.start` callback is called for the first adv, the tx device submits 21# a work item which suspends the advertiser by calling `bt_mesh_adv_disable`. 22# 4. Tx device checks that for the first adv the `bt_mesh_send_cb.end` callback is called with the 23# error code `0`. 24# 5. Tx device checks that for the consecutive advs the `bt_mesh_send_cb.start` is called with error 25# `-ENODEV`. 26# 6. Tx device checks that no more advs can be created using `bt_mesh_adv_create` function. 27# 7. Tx device resumes the advertiser and repeats steps 1 and 2. 28# 8. Tx device expects that all advs are sent. 29# 30# Rx device procedure: 31# 1. Rx devices listens all the time while tx device sends advs and ensure that no new advs were 32# sent after the advertiser was suspended. 33 34RunTest mesh_adv_disable adv_tx_disable adv_rx_disable 35 36# Low latency overlay uses legacy advertiser 37overlay=overlay_low_lat_conf 38RunTest mesh_adv_disable adv_tx_disable adv_rx_disable 39 40overlay=overlay_workq_sys_conf 41RunTest mesh_adv_disable_workq adv_tx_disable adv_rx_disable 42