Commit fixes bug when corresponding group ID was never
incremented for independent corresponding relationships.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Adds a provision test to check that provisioning bearers are cancelled
when a provisioning link is opened. Modifies the functionality for
receiving unprovisioned beacons to fail the test if a unprovisioned
beacon is received from the current provisionee after a threshold.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Modify stream_rx.c so that the calls to FAIL are guarded
by the newly added valid_rx_cnt.
This helps prevent timing issues, especially with
broadcast, where the first SDU(s) may be delayed from
the application, and thus may be missed/contain errors.
Now it will only treat missing or error SDUs as a FAIL
if we have received a valid SDU. All fails, will still be
logged. We now also log both valid and total count.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Instead of just printing a warning, fail (return != 0 to the shell)
if a test is missing, or a pattern does not match any test.
Also, warn (and return != 0) if no tests are found when SEARCH_PATH
is provided.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
We never got to add any multidevice tests to the UART driver tests.
So let's not try to run that empty set in CI.
(we have some multidevice UART tests for BT).
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
tests/bsim/bluetooth/ll/bis/tests_scripts/broadcast_iso.sh
was split in two in 872b19321f
but for the 54L15 and 5340 it was forgotten in the list of
tests to run.
Let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The set size can now be dynamically set and notified.
The rank is added as a argument in the case that changing
the set size, also affects the device's rank, as ranks
in a coordinated set needs to be continuous.
The set coordinator implementation has been updated
to support receiving the new set size, and providing
this information to the upper layers.
This commit adds a babblesim test for the new API,
as well as a shell command.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The stack will no longer implicitly set the data path
for ISO channel, and the responsibility for doing that is
now for the upper layers/applications.
This provides additional flexibility for the higher layers
as they can better control the values and timing of the data
path, as well as support removing and even reconfiguring the
data path at will.
This also removes some complexity from the stack.
This commit also fixed a inconsistency in the disconnected
handler. CIS for centrals as well as BIS were still valid
bt_iso_chan channels in the disconnected callback,
but CIS for peripherals were completely cleaned up at this
point. This issue is fixed by moving the disconnected callback
handling to before the code to cleanup the channel for
peripherals.
Since there is a difference in how you remove data paths
depending on the GAP role (central/peripheral), the
iso_info struct type has been expanded to be more
concise of which type of CIS it is.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Instead of re-implementing or assuming that POPCOUNT is available
we now use the generic function from Zephyr.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Some CAP BSIM could not be built after some commits were merged.
One CAP test was missing a call to backchannel_sync_send_all
A change in the controller and/or timing seems to have triggered
an old issue on a bunch of tests. Theses tests have been disabled
while the issue is pending investigation.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Renamed BT_CSIP_SET_MEMBER_NOTIFIABLE to
BT_CSIP_SET_MEMBER_SIRK_NOTIFIABLE to be more specific.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The cap_broadcast test has been split into 3 tests:
1) Regular test
2) Regular test with metadata update
3) Test for invalid parameters
This will make it easier to use the regular cap_broadcast test
for other test cases, as it does less now.
It also makes each test run faster seperately and reduce their
scopes.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add TX and RX verification for the audio configuration tests.
This requires modifying some of the underlying structures
used in those tests, as well as initializating and triggering
TX, and with verification of RX as well.
These tests were implemented to ensure that the streams are not
just established, but can send ISO data without issues.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The existing implemented only attempted to send all notifications,
but if host was out of ATT TX buffers the notifications would fail
and the client may miss out on important information, and would be
a spec violation.
This commit refactors notificatios in TBS so that they are always
sent.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
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>
Update Kconfig to not select BT_TICKER_REMAINDER_SUPPORT for nrf54L
Add BSim tests to cover using a ticker without BT_TICKER_REMAINDER_SUPPORT
and expire info enabled
Signed-off-by: Troels Nilsson <trnn@demant.com>
The function supports reading multiple controller-based values.
It is effectively a copy of struct bt_dev_le but in a more
application-oriented definition.
It was chosen to keep the features as an array rather than a
64-bit value, as the comparison macros work on arrays and that
there already exists new bits > 64 in the core spec which is not
yet supported by Zephyr.
It is being smoke tested in a generic GATT client test,
as the individual values may depend on several Kconfig options.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
When running a bsim test where an option's argument is a quoted string,
using $@ to execute the arguments of the Execute function causes
incorrect quote handling.
To correctly pass all arguments, add extra quotes around $@. This
ensures that quoted strings remain intact when passed to the executable.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit adds a stress test to verify that the HCI driver does not
drop any data. Specifically, it tests whether the HCI IPC driver can
reliably pass data between the Host and Controller.
Due to the current HCI IPC driver implementation, this test is
guaranteed to fail if Controller-to-Host HCI ACL data flow control is
disabled.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Fix ISO Tx PDU buffer count required when SDU fragmentation
is used.
Rename BT_CTLR_CONN_ISO_SDU_LEN_MAX to
BT_CTLR_ISO_TX_SDU_LEN_MAX so the value is common to both
Broadcast and Connected ISO transmissions.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix HCI command buffer allocation failure, that can cause
loss of Host Number of Completed Packets command.
Fail by rejecting the HCI Host Buffer Size command if the
required number of HCI command buffers are not allocated in
the Controller implementation.
When Controller to Host data flow control is supported in
the Controller only build, ensure that BT_BUF_CMD_TX_COUNT
is greater than or equal to (BT_BUF_RX_COUNT + Ncmd),
where Ncmd is supported maximum Num_HCI_Command_Packets in
the Controller implementation.
Relates to commit 81614307e9 ("Bluetooth: Add workaround
for no command buffer available")'.
Relates to commit 297f4f481f ("Bluetooth: Split HCI
command & event buffers to two pools").
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
In order to use the device IDs send sending to a specific device,
e.g. backchannel_sync_send(3), then we need to open all backchannels
including the one to ourself, otherwise the ID and count will be
off by one.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Commit removes centralized PSA key ID distribution
in mesh bsim tests since secure storage is
instantiated on every simulated device.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
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>
Adds a deinit step that tests the unicast server callbacks,
unicast server and pacs unregister.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Refactor everything related to RX in the sample.
The existing code will moved to new files with more specific
functionality, so that each file will become cleaner and use
fewer #ifdefs.
The USB part will be refactored a bit to follow the design used
by the LE audio shell, to make it easier to maintain both in
a similar way.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
We need to make sure that within Zephyr different users of the PSA APIs
don't interfere with each other because of using the same numerical IDs
for persistent assets.
This takes care of the PSA key IDs when using persistent keys through
the PSA Crypto API.
See the comments in `<zephyr/psa/key_ids.h>` for more information.
This removes the recently-introduced Kconfig options that allowed changing
the base IDs subsystems were using for their persistent keys.
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Change adds bsim tests with CONFIG_BT_LONG_WQ=n to ensure correct
behavior. Change uses host/gatt/ccc_store test.
Change also switches to using more unique simulation ID in the test
scripts.
Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
Change adds bsim tests with CONFIG_BT_LONG_WQ=n to ensure correct
behavior. Change uses host/security/ccc_update test.
Change also switches to using more unique simulation ID in the test
scripts.
Signed-off-by: Marek Pieta <Marek.Pieta@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>
Commit does the following changes:
* Use functionality from the `babbelkit` library for common functions
related to flags, test progression (failing, passing etc.) and
synchronization between two devices. Locally defined equivalents are
removed.
* Removes the files containing only functionality that is provided
by the `babblekit` library.
* Remove the `test_pre_init_f` and `test_tick_f` functions (commonly
implemented as `test_init` and `test_tick`) from the modified tests.
These functions are not needed as they were only used to fail the test
if a device didn't complete the test within a certain time frame. This
is already handled by the `sim_length` argument used in the test
scripts.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Validate that the connection timeout code path works as expected when
the command buffer pool is under stress.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Update the Central and Peripheral GATT write command sample
to measure throughput across all supported connection PHYs.
Cover the sample in BabbleSIM CI testing to validate the 2M
PHY throughput after all supported PHYs have been changed
once.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The goal of this test is to ensure that setting the device name by
writing to the GAP 'Device Name' characteristic work as expected.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>