Added check if ccc_values[i].attr != NULL,
before accessing to ccc_values[i].attr structure:
(handle == ccc_values[i].attr->handle)
On 20829 platform it's causing hard fault, not sure about
another platforms (in GAP testing).
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
This API converts a HCI error code to a string.
This can be useful if application developers want to print them
in the applications.
Later we can also use them in the host to improve debuggability.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This commit adds CONFIG_BT_USE_PSA_API to allow the end
user to prefer PSA APIs over TinyCrypt for crypto operations
in bluetooth. Of course, this is possible only if
a PSA provider is available on the system, i.e.
CONFIG_PSA_CRYPTO_CLIENT is set.
This commit also extends
tests/bluetooth/mesh/basic/bluetooth.mesh.gatt adding a specific
case using PSA.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Some bluetooth test were using BT_TINYCRYPT_ECC without also
setting BT_ECC. This means that BT_TINYCRYPT_ECC gets disabled
as it depends on BT_ECC.
This commit fix this by removing BT_TINYCRYPT_ECC in all test
for bluetooth mesh.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
By enabling CONFIG_BT_USE_PSA_API the user can specify to use
PSA APIs instead of TinyCrypt for crypto operations in bluetooth
host module.
This commit also extends tests/bluetooth/gatt in order to
add a PSA test.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit adds CONFIG_BT_USE_PSA_API to allow the end
user to prefer PSA APIs over TinyCrypt for crypto operations
in bluetooth. Of course, this is possible only if
a PSA provider is available on the system, i.e.
CONFIG_PSA_CRYPTO_CLIENT is set.
This commit also extends tests/bluetooth/bt_crypto adding
a test case for PSA.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Implement unit tests for the broadcast reception start procedure,
both with proper and with improper parameters.
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
bt_audio_codec_cfg_get_chan_allocation() now takes an
extra parameter.
Let's set it to the value which keeps the old behaviour.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
When creating a BAP broadcast source with bt_bap_broadcast_source_create
only the subgroup information is stored in the streams and the remaining
BIS specific information is not stored in the stream->codec_cfg,
which it should.
Fix is to store bis specific information also in stream codec config.
Updated broadcast source BSIM test to verify above usecase.
Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
These test only test the basic functionality of
bt_cap_initiator_unicast_discover so far, but will be expanded.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added a fallback parameter to
bt_audio_codec_cfg_meta_get_pref_context
as absence of pref context in BAP implicitly means a unspecified
for LC3.
In the case that it is absent BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED
is the returned value.
While the metadata for codec cfg and codec cap are similar,
this only applies for codec cfg as per BAP.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added a fallback parameter to
bt_audio_codec_cap_get_max_codec_frames_per_sdu
as absence of max codec frames per SDU in BAP implicitly
means a single frame for LC3.
In the case that it is absent 1 is the returned value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added a fallback parameter to
bt_audio_codec_cap_get_supported_audio_chan_counts
as absence of channel count in BAP implicitly means a single channel
for Lc3.
In the case that it is absent 1 is the returned value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Added a fallback parameter to
bt_audio_codec_cfg_get_chan_allocation as absence of
channel allocation in BAP implicitly means Mono.
In the case that it is absent,
BT_AUDIO_LOCATION_MONO_AUDIO is the returned value.
This commit also fixes the implementation of
bt_audio_codec_cfg_get_frame_blocks_per_sdu as it only applies to
LC3 (as per the BAP spec). It also adds additional testing of it
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The 3-byte value suits the assigned number much better,
and also allows for less memory copies when getting and
setting the values.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Remove the "stream" part of the value and functions to
better fit with the name in the assigned numbers document.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Update references to devicetree chosen properties and how devicetree nodes
should be defined in order to enable the new HCI drivers.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Convert all Bluetooth tests that define dummy HCI driver instances to use
the new HCI driver API. This requires both a custom DTS binding as well
as an app-specific overlay file.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
ull_adv_sync_pdu_set_clear does pretty much everything, causing
it to be very complex and awkward to use. In addition, it only handles
a single PDU, meaning callers have to handle the chain.
It has been replaced with simpler, more complete functions for handling
the relevant operations
Fixed issues include:
- Fragmentation of adv data over HCI is now decoupled from PDU
fragmentation, fixing HCI/DDI/BI-13-C, LL/DDI/ADV/BV-26-C and
LL/DDI/ADV/BV-55-C
- Adding BigInfo now preserves the PDU chain
- Enabling periodic advertising with ADI on would sometimes fail
due to insufficient space in a single PDU to add ADI
Signed-off-by: Troels Nilsson <trnn@demant.com>
Adding bt_tester support.
Adding bt_tester app build
with Twister for frdm_rw612 board
Fix failing tests/samples due to unsufficent MPU ressources
by releasing unnecessary MPU regions.
Twister builds added on peripheral/central ht and
enabled Power manager on those examples to cover
the CI builds with PM enabled.
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
Move the audio related files to a new subdirectory called
audio.
The purpose of this is to clean up the file structure a bit,
and also allow for better filtering of the files.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add unit tests to cover explicit LLCP error code check and
cover the same in the Controller implementation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This change removes the BT_LE_PER_ADV_OPT_USE_TX_POWER option for
extended advertisement in BLE Audio PTS tests.
The Broadcaster setup options was hardcoded to include the
BT_LE_PER_ADV_OPT_USE_TX_POWER option. This causes incompabilities
for any controller not support it, and since the option is not
required for the audio tests it should not be used here.
signed-off-by: Frode van der Meeren <frode.vandermeeren@nordicsemi.no>
Monolithic build is enabled by default and it
requires the presence of the binary blobs.
CI will fail since it doesn't fetch them
to the environment. To avoid this
monolithic for BT app is disabled.
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
Make `struct arch_esf` compulsory for all architectures by
declaring it in the `arch_interface.h` header.
After this commit, the named struct `z_arch_esf_t` is only used
internally to generate offsets, and is slated to be removed
from the `arch_interface.h` header in the future.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
The flash_area_erase is replaced with flash_area_flatten that
is also able to erase/scramble devices that do not require
explicit call to erase procedure before write.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Removes the CIS connection establishment from bt_bap_stream_start
and move the behavior to a new funciton bt_bap_stream_connect.
This has 2 advantages:
1) The behavior of bt_bap_stream_start is much more clear and more aligned
with the spec's behavior for the receiver start ready opcode.
2) It is possible to connect streams in both the enabling
and the QoS configured state with bt_bap_stream_connect as
per the spec. This allows us to pass additional PTS test cases.
To implement this new behavior, samples and tests have been updated.
The CAP Initiator implementation has also been updated
to accomodate for the change in BAP, but the CAP
initiator implementation should work the same for application, except
that it's now possible to do unicast start on ASEs in any order
(https://github.com/zephyrproject-rtos/zephyr/issues/72138).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Removes the requirement that CAS is found on the remove
device for ad-hoc sets. This makes the CAP API more
versatile as it allows applications to use it with
remote non-CAP devices.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Changes twister tests and nrf samples from using legacy adv to ext adv
since this is the default for Mesh. Legacy adv is still tested in bsim.
Removes redundant test configuration testing ext adv.
Removes redundant config for ext_adv in `multi_ext_adv.conf`.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
The function is useful for application to lookup set
members from bt_conn pointers, e.g. when iterating on
connected devices.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fix missing validation of Connection Update Ind PDU. Ignore
invalid connection update parameters and force a silent
local connection termination.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Refactor CSIP btp commands by removing the 'count' parameter from
set_coordinator_lock and set_coordinator_release functions.
If we want to support lock/release procedure on subset of set members
in the future, 'count' param doesn't indicate a specific set member.
Instead, introduce 'address_count' and 'addr' array params, although their
usage is not yet implemented.
Signed-off-by: Piotr Narajowski <piotr.narajowski@codecoup.pl>
Namespaced the generated headers with `zephyr` to prevent
potential conflict with other headers.
Introduce a temporary Kconfig `LEGACY_GENERATED_INCLUDE_PATH`
that is enabled by default. This allows the developers to
continue the use of the old include paths for the time being
until it is deprecated and eventually removed. The Kconfig will
generate a build-time warning message, similar to the
`CONFIG_TIMER_RANDOM_GENERATOR`.
Updated the includes path of in-tree sources accordingly.
Most of the changes here are scripted, check the PR for more
info.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Add missing configuration files for the nRF5340DK
and missing configuration values for the unicast
samples w.r.t. buffer sizes and encryption.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adding bt_tester support.
Adding bt_tester app build
with Twister for rd_rw612_bga board
Fix failing tests/samples due to unsufficent MPU ressources
by releasing unnecessary MPU regions.
Disable twister build on samples that are not meant to
be supported on this board, so exclude it from the test cases.
Update peripheral/central ht sample.yaml files
to test build for rd_rw612_bga.
Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
MCS OTS support doesn't implement OTS checksum and if this is globally
enabled assert is triggered.
[00:00:03.409,484] <dbg> bttester_gap: set_io_cap: io_cap: 0
ASSERTION FAIL [ots_init->cb->obj_cal_checksum]
@ WEST_TOPDIR/zephyr/subsys/bluetooth/services/ots/ots.c:476
Callback for object calculate checksum is not set
This should be reverted when Zephyr issue #72471 is fixed.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Added build time coverage for added new Controller
optimization related Kconfigs.
New Kconfigs are either covered in samples.yaml or in the
tests/bluetooth/init conf files.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The bt_csip_set_coordinator_csis_member_by_conn function
was seemingly missing, causing the CAP unit tests to not build.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Since the CSIP API expects a set member struct for nearly all
functionality, the reference to the full set member (along with
the CAS specific CSIS) should be given to the application.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When CONFIG_USB_DEVICE_STACK=n then the sine wave
generator was enabled, which caused build errors.
This commit fixes those errors and also adds the
nRF5340 as a build target for the USB tests.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The callback is only ever called when we received a
notification from the BASS server that the receive state is
removed, which cannot contain an error code.
Thus it does not make sense for the callback to have an
error code.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>