Add a selection of interval values that are suitable for BAP,
which will allow better coexistence between ISO and ACL,
for both broadcast and unicast. Some of these are defined
by the BAP spec, and some are defined by Zephyr, since they
do have a suggested value from BAP.
Samples and tests have been updated to use these new values.
Peripheral samples have also been updated with
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS so that the connection
parameters from the centrals aren't updated to something else
shortly after.
The shell has also been updated to use the LE Audio (BAP) values
if audio is enabled, and the audio.conf file has disabled automatic
updating of the connection parameters as the peripheral, as we rarely
(if ever) want to do that.
Due to the connection interval change, CI hit an issue
with test_bass_broadcast_code in test_main_client_sync, where
the reading of the long receive state did not finish before we
attempted to do another procedure, so the function was updated to have
a retry.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
- Make ext_adv and per_adv into arrays for multiple BIGs
- Create bap_broadcast-source_setup_v2 command
- Handles broadcast_id as an input
Signed-off-by: Graham Wacey <graham.wacey@nordicsemi.no>
Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
- Add semaphore to make sure source is stopped before proceeding
- This ensures source can be released after this command is finished
Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
Increase value of `CONFIG_BTTESTER_BTP_CMD_THREAD_STACK_SIZE` for
nrf54L15 board to avoid stack overflow.
Remove the config in the Mesh overlay as it's was also added for nrf54L15.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY disables all but legacy OOB
pairing (including LE SC) and is not intended for enabling/disabling
support for legacy OOB pairing. bt_le_oob_set_legacy_tk() depends on
CONFIG_BT_SMP_SC_PAIR_ONLY so just use same check here.
For BT_CONN_OOB_LE_SC only supported way to disable LE SC OOB is
to force BT_SMP_OOB_LEGACY_PAIR_ONLY which disables all pairing
except legacy OOB support.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Takes in use IS_ENABLED as preferred way of guarding Kconfig option for
enabling periodic advertising api, CONFIG_BT_PER_ADV. It enables compiling
guarded code get warning/errors and not link it if not used.
Signed-off-by: Evgenii Kosenko <Evgenii.Kosenko@silabs.com>
Takes in use IS_ENABLED as preferred way of guarding Kconfig option for
enabling legacy LE secure pairing, CONFIG_BT_SMP_SC_PAIR_ONLY. It enables
compiling guarded code get warning/errors and not link it if not used.
Signed-off-by: Evgenii Kosenko <Evgenii.Kosenko@silabs.com>
Disabling extended advertising, CONFIG_BT_EXT_ADV, fails to compile cause
references not guarded ext_adv variable when tester_gap_create_adv_instance
is called. Fixes by taking in use IS_ENABLED as preferred way of guarding
Kconfig option. It enables compiling guarded code to get warning/errors and
not to link if not used.
Signed-off-by: Evgenii Kosenko <Evgenii.Kosenko@silabs.com>
Takes in use IS_ENABLED as preferred way of guarding Kconfig option for
enabling privacy, CONFIG_BT_PRIVACY. It enables compiling guarded code get
warning/errors and not link it if not used.
Signed-off-by: Evgenii Kosenko <Evgenii.Kosenko@silabs.com>
Takes in use IS_ENABLED as preferred way of guarding Kconfig option for
forcing OOB legacy, CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY. It enables
compiling guarded code get warning/errors and not link it if not used. If
def macro is left in btp_handler structure to reduce code size when the
config is not present.
Signed-off-by: Evgenii Kosenko <Evgenii.Kosenko@silabs.com>
The unicast server does not need GATT caching and it was likely
incorrectly added earlier as a dependency.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Increase CONFIG_BT_BUF_CMD_TX_COUNT to avoid deadlock when running out
of buffers. See #77241 for the reference.
This fixes Mesh Provisioning Service tests (MESH/NODE/MPS).
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Different test layers need different stack sizes for BTP CMD thread
and also AutoPTS might need to overwrite this config based on test
case.
Increase the stack size for mesh tests.
Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
Since the PACS service is not part of the bt_bap API it should
not use the bt_bap prefix, and instead just be bt_pacs like the
rest of the PACS API.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Implements the PBP commands of the BTP specs, in order to support
testing the PBP through autopts. This PR is in conjunction with the
following PR in AutoPTS: https://github.com/auto-pts/auto-pts/pull/1356
Signed-off-by: Frode van der Meeren <frode.vandermeeren@nordicsemi.no>
This adds the configuration used when running PTS tests with hci_ipc to
the testcase.yaml, so they are built on integration by CI, avoiding
regression.
Signed-off-by: Ludvig Jordet <ludvig.jordet@nordicsemi.no>
Make sure MTU is validated to avoid reading pass command buffer.
Also make more explicit check in response length validation.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
This may cause some compiler warnings due to flexible array being
used in btp_hdr. Simply avoid it and do explicit pointer type cast
where needed.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Remove the HCI command & event emulation layer for ECDH commands and
events. This means that we always do the necessary operations in the host.
The existing BT_ECC Kconfig option stays, but now gets automatically
enabled when necessary (e.g. based on the BT_SMP option), which is why this
commit removes so many explicit assignments in prj.conf files.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
MESH PTS tests require different number of keys, as an example; only
one netkey requires 8 key slots and there are test cases that use at
least two netkeys which consume the default 16 slots, so it is better
to have enough slots all times. Setting slot count to 32.
Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
Both the TMAP kconfig file and public header file defined
which roles were supported.
The Kconfig file options were recently added and were more
up to date (and correct), and allows for other Kconfig files
to use these values, thus allowing for more flexibility when
implementing applications.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The CCP API for the Call Control Profile works on top of the
TBS API, and will eventually replace parts of the TBS API.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add additional data to the logs and only send the event once we have
receive a successful SDU.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The range of BT_BAP_BROADCAST_SNK_SUBGROUP_COUNT should be relative to
BT_BAP_BASS_MAX_SUBGROUPS. The broadcast sink depends on the scan
delegator, and thus it does not make sense for the broadcast sink
to support more subgroups than what the scan delegator supports.
Since this no longer relates to the number of streams, there
may be new runtime errors if applications attempt
to sync to more subgroups than the number of ISO channels
supported.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Since now Mbed TLS automatically selects ENTROPY_GENERATOR (or the
test generator, depending on the platform) we can remove this dependency
from all BT related tests and samples.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Instead of relying on the bap_send_cmd and a ring buffer,
the tester will now automatically start transmitting on
streams can that transmit once they enter the streaming state,
and stop again once once they leave the streaming state.
This ensures that we are always sending, which help pass
the PTS tests that require us to send, without having the
autopts client constant telling the tester to send.
This also ensures that we actually send SDUs of the right size
by not relying on a ring buffer, but using a separate thread
that sends data from a predefined array of ISO mock data.
This is easily expandable to multiple streams (including a mix
of unicast and broadcast) using different SDU sizes and easy to
expand to also use one or more software codecs.
The design is based on the TX thread for the BAP Unicast
Client sample and the audio babblesim tests.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the extended and periodic interval to be values that
are more suited for audio as they are multiple
of the expected resulting ISO interval.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
[Description]
PTS case: VCS/SR/SGGIT/CHA/BV-03-C fail.
[Root Cause]
VCS/SR/SGGIT/CHA/BV-03-C require Volume Flags Characteristic properties
(Read/Notify), but tester volume flags notify is disabled by default.
[Fix]
add CONFIG_BT_VCP_VOL_REND_VOL_FLAGS_NOTIFIABLE=y in
tests/bluetooth/tester/overlay-le-audio.conf
[Testing]
After modified, VCS/SR/SGGIT/CHA/BV-03-C pass with log:
Test Case Ended VCS/SR/SGGIT/CHA/BV-03-C PASS 24 00:00:01.010000
12/9/2024 11:31:55.027000 AM
Signed-off-by: Chang An <chang.an_1@nxp.com>
Combine BLE and 802.15.4 monolithic build under a single config to make
it less error prone.
The choice between a BLE/802.15.4 combo firmware and a BLE only firmware
is done depending on the Soc (like RW610 vs RW612).
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
ENTROPY_GENERATOR is now automatically enabled if the board
has "zephyr,entropy" chosen property set, so there is no need
to manually select it.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
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>
- 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>
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>
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>
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>
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>
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>
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>