There is a unittest to verify that the distribute broadcast code procedure
is not called with the same peer twice. This test requires a minimum
of two connections, so we disable this test when only 1 connection
can be made
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
Some of the unittests had an incorrect project name in the
CMakeList.txt file
This is corrected here
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
The new `host_config_variants` goal is to be able to test specific set
of configurations when building the Host without the need of having a
specific application for it.
The first test check that the Host build correctly with
`CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY` enabled.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Sets CONFIG_LOG_BACKEND_RTT_MESSAGE_SIZE=256 as some log
messages are longer than 128 (default) and may be truncated
with the existing configuration and implementation.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
These callbacks are trigger for changes that affect the entire
broadcast source, such as the BIG started and terminated events.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
These callbacks are trigger for changes that affect the entire
broadcast source, such as the BIG started and terminated events.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
- Add NULL checks for broadcast_source_stop
- Add NULL checks for broadcast_source_release
- Return -ESRCH if trying to stop ext_adv before creation
Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
Added support for BAP 1.0.2, CSIS 1.01, PACS 1.0.2, PBP 1.0.1
Enabled support for extended adv in the LL (mandatory requirement)
Enabled support for multiple BIGs support in the LL.
Due to a bug in the BT qualification tool, the following
features are values in the .bqw file are manually added
<Feature>BAP 4/1</Feature>
<Feature>BAP 26/1</Feature>
<Feature>BAP 49/1</Feature>
<Feature>BAP 62/1</Feature>
<Feature>BAP 77/1</Feature>
<Feature>BAP 83/1</Feature>
<Feature>CSIP 3/1</Feature>
<Feature>CSIP 8/1</Feature>
<Feature>PBP 10/1</Feature>
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Default the Minimum encryption key size to 16.
Key with reduced size is easier to brut force.
Disable LE legacy pairing by default since it's not secure.
These defaults should suite majority of newly developed applications.
It's better to use sensible more secure defaults,
so applications that really need less secure option consciously change it,
not the other way around.
This may help to prevent downgrade attacks.
Signed-off-by: Sergey Korotkov <sergey.korotkov@nordicsemi.no>
Moving the blob client, dfd server and dfu server to their own
elements and increasing the CONFIG_BT_MESH_TX_SEG_MAX to 8 to fit
new composition data into composition data page status message.
Standalone mesh blob client and DFU distributor/update server models
requires one element and those elements only contain the main models
and the models they extend to.
Referring to MshMBT_v1.0 Section 6.1:
The BLOB Transfer Client model defines the messages listed in Table 6.1
, and requires one element: the BLOB Transfer Client Main element. The
BLOB Transfer Client Main element contains the BLOB Transfer Client
main model.
And referring to MshDFU_v1.0 Sections 6.1.1 and 6.2.1:
6.1.1
The Firmware Update Server model adds the state instances listed in
Table 6.1 and Table 6.2 and the messages listed in Table 6.3 to the
model it extends, and requires one element: the Firmware Update Main
element. The Firmware Update Main element contains the Firmware Update
Server main model and all the models that the main model extends.
6.2.1
The Firmware Distribution Server model adds the state instances listed
in Table 6.7 and Table 6.8 and the messages listed in Table 6.9 to the
model it extends, and requires one element: the Firmware Distribution
Main element. The Firmware Distribution Main element contains the
Firmware Distribution Server main model and all the models that the
main model extends.
Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
Deprecate BT_CTLR, and add a new HAS_BT_CTLR as a virtual option which
specific users (like BT_LL_SW_SPLIT) select. This also means that we can
remove all places that were forcefully enabling the BT_CTLR option, and
instead we now depend on devicetree to get some local LL HCI driver
enabled which in turn also enables the HAS_BT_CTLR option.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Increase test and main stack sizes for the qemu_cortex_m3 platform
in order to be able to successfully run the test.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Moving from TinyCrypt to PSA Crypto API caused an entropy source
to be always required, so this commit adds it in tests where
necessary.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Include Mbed TLS headers to the build system. This is required
because these tests do not follow the "standard build pattern"
of Mbed TLS in Zephyr, otherwise include files would be already
available after the library has been linked. In these examples
some BT source files and Kconfigs are manually added to the
CmakeLists.txt file bypassing the standard library build pattern,
so Mbed TLS headers must also be added manually.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Since the TinyCrypt library is being deprecated in Zephyr, this
commit set TinyCrypt usage in BT mesh as deprecated and it sets
Mbed TLS PSA Crypto API as the default option (when TF-M is not
available).
Tests are also updated in this commit.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit sets PSA Crypto API as the default library to perform
ECC-DH in HCI, replacing TinyCrypt (which is being deprecated).
Therefore the symbol BT_TINYCRYPT_ECC is renamed as BT_SEND_ECC_EMULATION.
References in samples/tests are also fixed.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
CONFIG_BT_USE_PSA_API was used in BT crypto/host modules to select
PSA crypto API over TinyCrypt (which was the default until now).
Since TinyCrypt is being deprecated and PSA crypto API is the new
standard library for crypto operations, CONFIG_BT_USE_PSA_API is
no more needed.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Because the number of ACL RX buffers must be at least the number of
maximum connections plus one, increasing `CONFIG_BT_MAX_CONN` could
inadvertently lead to a build failure if the number of ACL RX buffers is
not also increased. This dependency may not be obvious to users.
To address this issue, this commit deprecates the
`CONFIG_BT_BUF_RX_COUNT` Kconfig symbol and computes the value in
`buf.h` using the new `BT_BUF_RX_COUNT` define. Note that the default
value and the minimum range value have been changed to 0 to "disable"
the option.
Additionally, to allow users to increase the number of ACL RX buffers,
this commit introduces the new `CONFIG_BT_BUF_RX_COUNT_EXTRA` Kconfig
symbol. The value of this symbol will be added to the computed value of
`BT_BUF_RX_COUNT`.
The configurations of tests and samples have been updated to reflect
these changes.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
nrf5340_hci_ipc.conf and nrf5340_hci_ipc_cpunet.conf were board specific
rename them for generic multi-core board support
Signed-off-by: Aytürk Düzen <ayturk.duzen@nordicsemi.no>
Without this PTS tests do not pass. These values are copied from a
commit aimed at unifying the prj.conf files in this directory. I do not
know which of these are strictly necessary to make the tests pass.
Copying them all poses no harm since the unification will be done later
anyway.
Co-authored-by: Szymon Janc <szymon.janc@codecoup.pl>
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
This API gives better control on L2CAP COC credits and suits better
for Upper Tester implementation.
Co-authored-by: Szymon Janc <szymon.janc@codecoup.pl>
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
The ASCS unit tests had various errors after adding support for
dynamic registration.
Several tests did not properly clean up after failure, causing other
tests to fail when they shouldn't.
Moved the register tests to their own file as they should not
do the register in the "before" function.
The test_ascs_unregister_with_ases_in_config_state test was also
removed, as it had both issues and the state that it wants to test
cannot be reached with the current API - It is not possible to
put an ASE in the configured state without callbacks,
and registered callbacks prevents us from calling
bt_bap_unicast_server_unregister to trigger the case as that can
only be done if callbacks are unregistered. Since unregistering
callbacks also puts all ASEs to the idle state, it is not possible
to call bt_bap_unicast_server_unregister for a non-idle ASE.
The testcase.yaml was also missing some Kconfig options to
properly enable the client tests.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Reducing the heap requirement for the hci_ipc sample from
8KiB to 4KiB. It has been tested in various configurations to
work with 2300, but 4KiB was used to provide some leeway for
future updates.
The heap requirement is not documented, and it is unclear why
values lower than 2300 (not exact number) won't boot, and should
be investigated further.
Memory has become a very scarce resource for especially the ISO
builds for the nRF5340, which is why this is getting reduced.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Updates and aligns the project config file to enable usage of multiple
keys so that users are not required to manually update the project
config file for testing most common mesh scenarios requiring multiple
netkeys and appkeys.
Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
Change the select of BT_PER_ADV_SYNC and BT_EXT_ADV to
depends on. This is an effort to reduce the use of
select for Kconfig options.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify ASCS and BAP Broadcast sink to depend on the PAC options
instead of selecting them.
Since Kconfig does not support "depends on X if Y",
a select for PAC_{SRC,SNK} is used depending on
ASCS_ASE_{SRC,SNK}.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The BAP Kconfigs option now depends on
BT_ISO_BROADCASTER instead of selecting it.
This is an effort to reduce the use of select in LE Audio.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The BAP_BROADCAST_SOURCE Kconfig option now depends on
BT_ISO_BROADCASTER instead of selecting it.
This is an effort to reduce the use of select in LE Audio.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the Kconfig options to depend on the GATT
features rather than selecting them.
This is part of an effort to reduce the amount of
selects we use in LE Audio.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added a flag parameter so that it is possible
to use the bt_cap_initiator_unicast_audio_stop to perform
disable+stop without releasing the streams by setting the
RELEASE flag.
This allows us to use the bt_cap_initiator_unicast_audio_stop
function to just disable streams without releasing them,
as that is requested by some PTS tests such as
CAP/INI/UST/BV-40-C.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Increase the conn interval from 30 to 60 for more stability
in test with multiple lower testers (up to 3).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
bt_conn_le_create logs an error if the provided conn is
not NULL. This small change cleans up the log a bit to
avoid the warning.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Everything else is defined as hex, so it makes sense to
be consistent. This will also make it easier to find the
service IDs in the logs that primarily already log
commands and events as hex.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Since the values are defined as hex, e.g. 0x82, it is easier
to compare with the log if they also log them as such.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
To ensure payloads are delivered in time for the first subevent
in framed BIS, ISOAL now enforces a (configurable) margin of
the calculated time offset
Without this margin, it has been observed that a broadcaster
can end up consistently missing the first subevent in every third
event in a 7.5 ms ISO with a 10 ms SDU interval
The margin is a conservative 2 ms by default, but can likely be
set a lot lower for most implementations and HWs
Signed-off-by: Troels Nilsson <trnn@demant.com>
Log the address and the err/reason values in the connected
and disconnect callbacks.
Since these values are not part of the BTP events it is
difficult to follow the order and reason why disconnects
happen when debugging.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add conversion macros from milliseconds to various units.
The purpose of these macros is to make it more clear/easier
for users to set and read values using milliseconds rather
than the various BT units which may be in 0.625, 1.25 or 10ms
units.
This is especially useful when comparing related values using
different units, such as advertising interval (0.625ms units)
and periodic advertising interval units (1.25ms units).
Users will have to be aware that these macros can provide slightly
different values than what is provided, if the provided values
do not match the units.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fix compilation error by specifying usart1 to be used for uart-pipe.
Add a board-specific configuration file to disable the console,
so, the usart1 will be used only for bluetooth and to specify
the BT_HCI_TX_STACK_SIZE.
Signed-off-by: Nidhal BEN OTHMEN <nidhal.benothmen@st.com>
Workaround failing autopts weekly run due to tester
application having Bus Fault in the nRF53 NET core hci_ipc
firmware at startup.
Having atleast 32 bytes free in nRF53x hci_ipc sample to
avoid Bus Fault when Zephyr Kernel does SYSINIT calls.
Reduce supported ISO Broadcaster instance and ISO TX buffer
counts in the Controller hci_ipc firmware.
Add sysbuild support for tester application so that the
build is CI verified.
sysbuild commandline for LE audio PTS testing:
# west build --sysbuild -b nrf5340_audio_dk/nrf5340/cpuapp
-d build/tester tests/bluetooth/tester
-DEXTRA_CONF_FILE="overlay-le-audio.conf"
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
GAP PAST (and BAP) tests were also enabled since controller support is
under review.
This also adds bqw file which is exported draft project from
Qualification Workspace.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
The CAP tests used u_group->cig->index but the u_group->cig may
have been deleted when the stream is released, which meant
that u_group->cig == NULL when e.g. unicast_stop_complete_cb
was called and that could cause failing tests as the index
would just be a uninitialized value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add log statements for each command, event and response
for debugging purposes.
Tests do not send enough of these to clutter the IUT logs
and it is useful for debugging to more easily determine
what command triggered a function call or when the
responses and events are sent to the AutoPTS client.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>