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>
The BLE acronym is not an official description of Bluetooth
LE, and the Bluetooth SIG only ever refers to it as Bluetooth
Low Energy or Bluetooth LE, so Zephyr should as well.
This commit does not change any board or vendor specific
documentation, and the term BLE may still be used in those.
It will be up to the vendors to update it if they want,
since many of them are using the term BLE in their
products.
Signed-off-by: Emil Gydesen <emil.gydesen@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>
Adds a macro returning a string representation of a Bluetooth address.
This allows you to print multiple addresses in a single printk or
LOG... call.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Added a new function, bt_conn_is_type, that returns whether
the provided conn object is of the provided type.
This check is then used to ensure that the conn objects
supplied to other bt_conn function are of the right type.
The right type has also been documented for these functions.
This is an initial commit for a larger change in the BT Host,
as similar checks should be added to the L2CAP, GATT, ISO,
Audio and possibly Mesh APIs.
The type check could have been implemented by using the
bt_conn_get_info function, but that requires additional
function calls as well as memory allocation and copy.
Since bt_conn_is_type is designed to be widely used, it
was suited for its own function.
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>
Fixed the following issues:
1) Missing guard before accessing parameters
2) Fixed bad sizeof when resetting
3) Fixed several bad offsets when removing attributes
Added tests to verify that it works now.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds API for Advertising Coding Selection.
Introduces two new advertising options to configure the advertiser's
requirement concerning coding scheme when LE Coded PHY is configured.
While the Bluetooth v6.0 specification makes a distinction betweeen
preferred and required advertising PHY options, a simplification is
made to only expose the required PHY options. Inline with how LE Coded
PHY is implemented; this API will set both the primary and secondary
advertising PHY's to the same coding scheme.
The support is enabled by CONFIG_BT_EXT_ADV_CODING_SELECTION, and requires
a controller that selects CONFIG_BT_CTLR_ADV_EXT_CODING_SELECTION_SUPPORT.
Signed-off-by: Thomas Deppe <thomas.deppe@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>
Added initial CCP client implementation that simply
does discovery of TBS on a remote CCP server.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Bring the change that was already in place for the qemu_cortex_m3 board
to all the other ones, since also nrf52840 had a similar problem
(see issue #82812).
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
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>
The connection event at the connection update instant was
skipped due to previous ticker node in use that is being
stopped was registering a relative occupied time that
overlapped with the new ticker node being started for
scheduling the connection with new interval.
Added mock interface for ticker_stop_abs() hence needed by
the Controller unit testing.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Instead of having 2 separate and non-equal checks for
capabilities in ASCS and the Broadcast Sink, there is now
a single function in pacs.c that performs the
check.
This reduces code size and makes it easier to maintain.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
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>
Commit:
- adds dependency of the mbedtls psa usage on secure storage
- removes PSA ITS emulator and enables usage of
the secure storage in ble mesh bsim tests
- enables secure storage in all ble mesh and related samples
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@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>
Added a test for disabled logging and for diabled testing
to ensure that the shell builds without error when those
are disbaled.
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>
Convert qspi and hyperflash to variants instead of revisions by popular
demand.
And convert evkb into a revision instead of a different board.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
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>
There is an unused variable, which may result in a compiler warning.
Since we can not guarantee the value of this variable
we can not test for it, so it is removed.
Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
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>
Fix various unit test build warnings, unused variables, set but unused
variables, wrong types etc...
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
These are currently failing CI and don't really have a maintainer or
someone who'd fully understand how they're supposed to work. Let's remove
them for now and longer term work on reintroducing them in a form that's
maintainable and understood by people actively developing the Bluetooth
host stack.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Currently, there are build warnings that are triggered when building
for BT central and legacy OOB pairing only:
CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY=y
CONFIG_BT_CENTRAL=y
There was a PR that handled this issue in the past https://github.com/zephyrproject-rtos/zephyr/pull/74400.
Unfortunately, this PR even though it fixed the warnings it also
broke the BT peripheral and legacy OOB pairing only build:
CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY=y
CONFIG_BT_PERIPHERAL=y
https://github.com/zephyrproject-rtos/zephyr/pull/82552 was merged in
order to fix the issue with the peripheral build configuration.
Unfortunately, this PR reintroduced the warnings for BT central and
legacy OOB pairing.
This commit brings changes to make sure that both the BT central and
peripheral builds with OOB legacy pairing are buildable and
warnings free.
Also in this commit, a new build test case is added for the BT central
and legacy OOB pairing along the existing BT peripheral test case
Signed-off-by: Sebastian Panceac <sebastian.panceac@ext.grandcentrix.net>
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>
This commit adds a unit test that checks the freed buffer callback of
the bluetooth data buffer API.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
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>