In order to have clean, self-contained HCI headers that do not have any
dependencies towards the Host or any other part of the system (except
types), reorganize the headers in the following way:
- Split out the macros and structs from hci.h to a new hci_types.h
- Merge the existing hci_err.h into the new hci_types.h
Fixes#58214.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Typically the client is the first device in our babblesim tests, so
reordered the initiator and acceptor for the CAP tests to conform to
that.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add test of the unicast audio cancel that can cancel any pending
procedures. This is done by adding a new blocking behavior in the
cap acceptor.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Split the cap_initiator_test.c to two new files
cap_initiator_broadcast_test.c and
cap_initiator_unicast_test.c as the two barely had any
common functionality, and the file was getting too large.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fix BIS test for ISO Tx Buffers in Controller to be 2 for
ISO TX MTU size of 502 bytes.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Check that if a bonded peer subscribed to a CCC, a non-bonded peer with
the same address cannot update the CCC.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Remove usage of Kconfig symbol `CONFIG_BT_DEBUG_LOG` from tests. It has
been deprecated since this PR:
https://github.com/zephyrproject-rtos/zephyr/pull/56183
The Kconfig symbols has been replaced by `CONFIG_LOG=y` on most of the
cases. Or it has been removed when not needed anymore.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Update `ccc_store` bsim test to remove the 'expected failure'. The issue
being fixed in the following commit.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
The first test check that if a bonded peer subscribe to a CCC, this
change is correctly stored to flash.
The second test, which is currently failing, is included to reproduce a
bug that occur when CCC or CF store on write is disabled and the other
one is enabled, leading to the delayed store being enabled. Causing the
value of the corresponding `n` selected option to not be stored at all.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
Add iterations to test_cap_initiator_unicast so that
we test starting again after stopping, as well as recreating
the group.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This set tests if Private Beacons are advertised properly, with address
changed for every beacon and Random value changing appropriately
regarding the scenario (IV Update, Key Refresh, advertisements on device
with friendship support) and Random Interval state.
All tests contain two devices: tx advertises Private Beacon (has Private
Beacon Server in composition) and rx sets Private Beacon state on tx
device (has Private Beacon Client). On rx device, scan callback is
registered to monitor Private Beacon advertisements.
Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
Added Kconfig options to make HAS characteristics that has notify as
optional property selectable and thus optional. These settings are
global, meaning that a chosen notify property will be used for all
registered has instances.
Signed-off-by: Fredrik Danebjer <frdn@demant.com>
Add support for long notifications ASE notifications
by doing a long read if the notification has length of
the maximum MTU.
This behavior is currently not defined by the BAP spec,
so may not work with all devices.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add support for long writes for the unicast client and server.
This reuses the ATT buffer for long reads.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
After removing the high default for MCS, it was discovered that
the TBS client requires a significant amount of buffers to work
properly as well. Added the requirement as a build assert that
depends on which optional TBS client features are enabled.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
A recent change in MCS significantly reduced the requirement
of L2CAP_TX_BUF_COUNT and should now work with any value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Test timeout of Remote Provisioning procedure when provisioned device
is unresponsive. Test covers two cases: unresponsive unprovisioned
device, which causes timeout on RPR Server and unresponsive RPR Server,
which causes RPR timeout on RPR Client.
Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
Split the CAP initiator broadcast start API into a create
and a start. This will allow users to create the broadcast source
without starting it immediately, making it possible to get the
BASE etc. without an active advertising set.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This is an alternative API for the L2CAP receive functionality. It
allows an application the receive L2CAP segments directly and manage
credits explictly. The API is guarded by an experimental kconfig option.
Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/57485
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Add implementation of the Telephony and Media Audio Service, as well as
two sample applications.
tmap_central reflects a smartphone implementing the Unicast Media Sender
and Call Gateway TMAP roles.
tmap_peripheral reflects an earbud implementing the Unicast Media
Receiver and Call Terminal TMAP roles.
Upon connection, tmap_central starts an audio stream using CAP Initiator
APIs.
CCP, MCP and VCP are discovered and used to send example commands.
Future improvements: 2-earbud support, add TMAP Broadcast roles,
update with new CAP Acceptor/Commander APIs as they become available
Signed-off-by: Silviu Petria <silviu.petria@nxp.com>
Add a new endpoint callback that is used to report the found
ASEs during BAP discovery, rather than calling
the discovery callback with optional values.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a new pac_record callback that is used to report the found
PAC records during BAP discovery, rather than calling
the discovery callback with optional values.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Remove the BAP unicast client specific discover parameter struct.
This make the BAP discover work more similar to the other
profiles.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The direction has been moved to a function parameter instead,
and we keep a local copy of the value in the stack instead.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adding a test that confirms ability to perform 20 (re)connections
between simple peripheral and central
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
Using the macro for declaring the callback struct does not make
sense in this construct, where test_connect1/2 are compiled into one
image and specific test functionality is selected via test ID
This reverts change made by #8e1682d which is incorrect for the cases
where the compile happens to include more than one declaration of the
callback struct.
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
Update the ACL group based scheduling with ACL first being
connected to use 4 connections and 4 streams to be
consistent with the test that does ACL the CIS one after
the other.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use defines for scan, create connection, connection and ISO
parameters in the tests.
Also, use same advertising interval for legacy and extended
advertising test.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add check to see if RPA is already generated for adv sets
with same id. If generated use the same address for all adv sets
with same id else create new RPA.
Signed-off-by: Nithin Ramesh Myliattil <niym@demant.com>
Add tests for cases where the rank characteristic, the size
characteristic and the lock characteristics are not set on the
set members.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Split the CSIP tests to multiple scripts to make them
more specific and able to run in parallel.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The set info returned by the Set Coordinator did not contain
information about the lockable state. Furthermore the
set info was not properly initiated, as it was missing the
rank, which was set somewhere else.
This commit adds the lockable state to the set info.
This commit removes the rank from internal structure,
and uses a reference to the set info instead, and only
store the rank there.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This script tried to be too nice with users, and if they forgot
to set the scripts as executable, set it for them.
But this leads to too many testcases commited to main without
executable permissions.
Which then leads to other developers needing to set those
locally and end with dirty workspaces.
Instead let's not have run_parallel set the executable bit,
and have these tests fail in CI, so developers realize and fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Test scripts need to have executable permissions.
Otherwise, run_parallel will change the mode in CI,
and users need to set them locally which results
in a not clean git workspace.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>