When in the BAP unicast server role, at least PAC sink
or PAC source shall be set.
In order to fulfill this new requirement, a few other Kconfig
options had to be changed to a `depends on` from `select` to
avoid recursive Kconfig requirements. This change may require
some applications to update their configurations according
to the migration guide.
The change from `select` to `depends on` is ideal anyhow
as that is the recommended way to add dependencies.
This can checked via the combined BT_PACS Kconfig value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Test that the Host give back the correct error when we try to set too
big advertising data. And ensure that long advertising data are
correctly transmitted.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
In most cases these were defined as 1. Saving one byte for the rest
doesn't really justify the added complexity that comes with these
options. Removing them also simplifies the interface between HCI
transports/drivers and the host stack, which in turn helps pave the way
for having HCI as a proper Zephyr driver API.
Fixes#71907
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
We can (and do) open multiple channels with a single L2CAP command. If the
remote doesn't support dynamic channels at all, then it sends back a
REJECT_RSP.
We only destroyed the first channel that matched the command PDU
identifier. Fix that and remove all channels that match.
Also add a test that verifies the patch.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Commit adds optimization of blob and dfu models bsim tests.
1. Makes general transfer size and block size smaller for blob.
2. Makes waiting time shorter for some blob bsim tests.
3. Splits long dfu srv persistence test suite into two.
4. Reduces retransmission for unicast messages till zero
for blob and dfu tests.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Add support in bsim compile script to accept EXTRA_CONF_FILE
so that overlay conf files can be supplied at compile time.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The advertiser options to automatically add the name in the scan
response and the advertising data will be deprecated.
Update the tests that were relying on those options. A lot of test were
actually not using the name, for those the name have simply been
removed. For the others that were using the name, add it in the
advertising data or the scan response data.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
43de309b3e made a buffer leak.
It was not detected by this test.
Add another configuration, where the final buffer is sent without
fragments in order to exercise the leaky code path.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
When using sysbuild,
set the primary MCU index to be the app core
only when we are building the test app in the app core.
Otherwise, if the test app is build in the net core,
the test command line parameters won't be sent by default
to it, and tests will fail.
Luckily, these tests are only built in CI using sysbuild
when we target the 5340bsim app core, and in all but 2,
even if sysbuild was used, this setting was propagated
to the zephyr build if we had separate net and app core
images.
The issue was introduced during the transition to
hwmv2.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix regression in BT_RX_STACK_SIZE use due to
commit b91728619c ("Bluetooth: host: remove
`CONFIG_BT_RECV_BLOCKING`").
Profiling of Controller Rx thread has been mentioned in
commit 586ba9fd13 ("Bluetooth: Controller: Increase
BT_RX_STACK_SIZE for BT_HCI_RAW enabled").
Also, move the TX_STACK_SIZE value as default in Kconfig
from the explicit value being set in hci_ipc sample.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Generic node_rx_hdr struct contains data not used for done event, so this
pdu specific data is moved to node_rx_pdu to minimize memory usage for
MFIFO_done alloc.
This however calls for a considerable write-through replacing the generic
node_rx_hdr with node_rx_pdu when relevant and needed.
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
It's needless complexity, and the terminology clashes with
Bluetooth (HCI frags).
It has one user, IPSP, that is going away soon.
Removing frag support will allow a future optimization, removing the
need for HCI and L2CAP fragment buffer pools, saving memory.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This test is intended to teach the conventions and best practices to a
potential contributor that wants to add a test, for say a new feature.
It is liberally commented on purpose, so new contributors don't have to
spend two weeks understanding the intricacies of the simulator, the bsim
test framework, the native builds, backchannels, etc..
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This code can be found (kinda) duplicated all over
`tests/bsim/bluetooth`.
Put it in a common place.
Refactoring the current tests will be done in a future commit.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Improve function which guesses the test name so the calling
script can be invoked from any folder, not just Zephyr's
base.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The commit adds dependency on Kconfig FLASH_PAGE_LAYOUT to subsystems
that really require it:
FCB, NVS, LittleFS
and removes direct selection from '*.conf' files where no longer
needed.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Remove explicit timeouts which are either the same as the
default one or smaller.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Let's increase the timeout for a few tests whose
timeout is less than 3x a typical execution time in CI.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This test keeps its own partial way of running tests.
Let's have it kill stuck processes in the same way as
the rest (sending another kill 5 seconds after, and printing
a message about what happened)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
To give an idea of which tests are taking
too long either on CI or locally.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Create the folder for the results if it does not exist.
Fixes these warnings in CI:
```
touch: cannot touch '/__w/zephyr/zephyr/./bsim_bt/
53_bsim_results.xml': No such file or directory
realpath: /__w/zephyr/zephyr/./bsim_bt/
53_bsim_results.xml: No such file or directory
```
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The setting is deprecated so change the code to either use the
native zsock_* API or enable POSIX_API to use the BSD socket API.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This test is an attempt at formalizing at least part of the behavior
described in commit 6a79c3deae.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This config selects a variant of the HCI driver interface that spills
out host internals unto the drivers and even the Zephyr controller. It
will now be removed in favor of driver interfaces that hide the
internals of the host.
The new default is `CONFIG_BT_RECV_WORKQ_BT`.
Any references to the removed kconfig are refactored out.
Any out-of-tree driver using the removed interface can be easily adapted
by copying the following implementations into the driver as private
functions:
- `hci_driver.h:BT_HCI_EVT_FLAG_RECV_PRIO`
- `hci_driver.h:BT_HCI_EVT_FLAG_RECV`
- `hci_driver.h:bt_hci_evt_get_flags`
- `hci_raw.c:bt_recv_prio`
In combination these symbols function as a interface adapter. These
symbols will be removed in this PR in subsequent commits.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
The host refuses to connect to a peer with an address that is also used
by a connection object in disconnected state.
Add a guard to prevent `-EINVAL` from `bt_conn_le_create`.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Using the old hwmv1 board names is not supported anymore.
So we don't need to handle them specially in the sysbuild
files.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Remove the boilerplate which is not necessary beacuse
it is already provided by the common scripts
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Provide a common check for BSIM_COMPONENTS_PATH
and a default WORK_DIR
So we avoid boilerplate in other scripts
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
In all scripts, where we were using the BOARD variable
let's use BOARD_TS which is the full BOARD target string
with "/" replaced with "_"
This is neccessary to support hwmv2 board names
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use the common functions instead of
replicating functionality and do a minor cleanup
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use the common functions instead of
replicating functionality and do a minor cleanup
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use the common scripts to perform common functions
and do a cleanup.
Do not set variables to their defaults, set things
closer to were they are needed;
Do not perform unnecesary checks;
And in general avoid unnecessary complexity.
Some of the _compile scripts were rotten => Fix them.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Ensure we call the common source script before using
the BOARD variable;
Use the common scripts to perform common functions
and do a cleanup.
Do not set variables to their defaults, set things
closer to were they are needed;
Do not perform unnecesary checks;
And in general avoid unnecessary complexity.
And for the 2 parts of the peripheral rpa sharing
test, use different sim_ids, so the traces for each
part can be checked.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Ensure we call the common source script before using
the BOARD variable;
Use the common scripts to perform common functions
and do a cleanup.
Do not set variables to their defaults, set things
closer to were they are needed;
Do not perform unnecesary checks;
And in general avoid unnecessary complexity.
And return !=0 on error.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use the common scripts to perform common functions
and do a cleanup.
Do not set variables to their defaults, set things
closer to were they are needed;
Do not perform unnecesary checks;
And in general avoid unnecessary complexity.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Ensure we call the common source script before using
the BOARD variable, and let's not set things
which are already set to the same by default
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Use the common scripts so we have a consitent way of
running the tests, report failures in the same way,
can stop them with ctrl+C, properly wait for
all processes to exit..
Let's also place the test scripts in the test_scripts/
folder as it is convention.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
(f) ests/bsim bt att: Use common s
Ensure we call the common source script before using
the BOARD variable;
Use the common scripts to perform common functions
and do a cleanup.
Do not set variables to their defaults, set things
closer to were they are needed;
Do not perform unnecesary checks;
And in general avoid unnecessary complexity.
Also, remove all timeouts which were unnecessarily too short
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Some developers want to programmatically get the
test name instead of hardcoding it.
So let's have a common function for this.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
As now, with hwmv2, boards can have "/" in their name,
and the board name is not anymore the complete target
name, let's set a new variable with the
whole board target name, but converted into the format
which can be used in paths.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This test was way too verbose (produced a log over 65000 lines
long).
Let's mute it a bit. If the test fails, developers
can raise the log level as needed.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>