Refactor the codec_cfg_get_frame_duration function to return the
assigned numbers value, instead of a converted value, but with
support for converting the value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This allow to run the following PTS test:
- DFU/SR/FD/BV-06-C
- DFU/SR/FD/BV-13-C
- DFU/SR/FD/BV-14-C
- DFU/SR/FD/BV-15-C
- DFU/SR/FD/BV-16-C
- DFU/SR/FD/BV-17-C
- DFU/SR/FD/BV-18-C
- DFU/SR/FD/BV-22-C
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Pass only speficied number of handler to read_params for GATT read
multiple. This is to avoid sending invalid (zeros) handles in
ATT_READ_MULTIPLE_REQ.
This was affecting GATT/CL/GAR/BI-18-C and GATT/CL/GAR/BI-19-C
qualification test cases.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
This fixes regression introduced in
https://github.com/zephyrproject-rtos/zephyr/pull/63556
In the PR above `bt_mesh_init()` call was moved to `BTP_MESH_INIT`
command to allow to select alternative composition data when starting
the stack. AutoPTS sends `BTP_MESH_CONFIG_PROVISIONING` command
before `BTP_MESH_INIT` to prepare the provisioning context. But
because `bt_mesh_init()` is now called after
`BTP_MESH_CONFIG_PROVISIONING` command is sent, this configuration is
reset to the default which makes PTS tests to fail.
To solve this, this commit calls introduces a new command,
`BTP_MESH_START`, which will replace the original `BTP_MESH_INIT`
command. `bt_mesh_init()` will stay in `BTP_MESH_INIT` while the stack
will be started in `BTP_MESH_START` command.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
DFU/SR/FD/BV-59-C tests Distributor self-update. Because the actuall
firmware swapping doesn't happen, we need to just simulate the swapping
by setting new Firmware ID sent by LT. We use slot to take firmware id
as by procedure, Fw Update Server doesn't know about it.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Remove this command as composition can only be set in bt_mesh_init call
which is called before settings are loaded.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
In some RPR tests we need to pass alternative composition data when
testing CDP128. When bt_mesh_init is called from mesh service
registration callback, we can't pass any arguments. Therefore we need
to move bt_mesh_init call out from mesh service registration to
BTP_MESH_INIT command.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Update the function name from codec_cfg_get_chan_allocation_val
to just codec_cfg_get_chan_allocation, and add
codec_cfg_set_chan_allocation.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Large composition data response struct should have a
data buffer to store the reponse data to
Signed-off-by: Alperen Şener <alperen.sener@nordicsemi.no>
Refactor the codec_cfg_get_freq function to return the assigned
numbers value, instead of a converted value, but with
support for converting the value.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Support for BAP/BSRC and BAP/BSNK test cases.
Add partial support for GAP/PADV as periodic advertising is needed
for BAP/BSRC tests and they can share common code.
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
Add Models Metadata Page 128 support to tester.
Signed-off-by: Michal Narajowski <michal.narajowski@codecoup.pl>
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This allows to advertise beacons with Private Node Identity on demand,
like was available for regular Node Identity.
Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
- Add entry for client and server in composition data.
- Add Client commands to aggregate and send messages.
MESH/SR/AGG/BV-02-C requires more key slots.
Signed-off-by: Michal Narajowski <michal.narajowski@codecoup.pl>
Adding support for automatic testing BLOB, DFU and DFD models.
Co-authored-by: Agata Ponitka <agata.ponitka@codecoup.pl>
Co-authored-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This enables Remote Provisioning in tester application. Adds basic
setup and required structures/functions.
add BTP API for Remote Provisioning Client
This adds BTP commands for RPR Client API.
Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
- Adds Large Comp Data Server and Client
- Defines some dummy metadata for Health Server
Signed-off-by: Michal Narajowski <michal.narajowski@codecoup.pl>
Some test cases require more control over transmission parameters used
when sending access messages.
Signed-off-by: Michal Narajowski <michal.narajowski@codecoup.pl>
Mesh1d1 uses EHP wth SHA256 algorithm as the main one.
This mandates to use 32 bytes static oob if static oob
has been chosen.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Replace the BT_AUDIO_CODEC_LC3_ID macro with the
BT_HCI_CODING_FORMAT_LC3 as there is no reason to
define and use the LC3 ID different than the other
allowed codec IDs.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This patch amends the existing L2CAP accept callbacks to use the new
accept signature that includes a pointer to the L2CAP server structure.
Signed-off-by: Donatien Garnier <donatien.garnier@blecon.net>
After recent refactors some PACS characteristics have to be enabled
with CONFIG_ variables.
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
Fix a bunch of mismatched CONTAINER_OF, few missing
k_work_delayable_from_work conversions but also many
bt_l2cap_le_chan/bt_l2cap_chan and few others.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Refactor the bt_audio_codec_cfg to use flat arrays to store
metadata and codec specific configurations.
The purpose of this is to make it easier to copy the data
between layers, but also to support non-LTV data for non-LC3
codec configurations.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This extends the list of build variants with native_posix variant to
build the tester application by CI.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This moves the board DT overlays and configurations to /board
directory so that it can be automatically applied in compilation
pipeline.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
As the metadata has to be validated anyway, let the initial vaidation of
metadata to be done in ASCS. The application can still reject the
metadata, but the length validation and supported type validation can be
performed by the stack.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This updates the testcase.yaml to include new configurations for
LeAudio, Mesh and native builds.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
The streams can be deallocated once bt_bap_stream_ops.released callback
is called. Otherwise it may cause memory violation in the stack.
Fixes: ASCS/SR/ACP/BV-31-C
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Extend Codec capabilities of the server.
At Codec Config operation initiated autonomously by server, all ASEs
with lower IDs than the requested one have to be initated first due
to API limitation.
In some BAP/USR (server role) test cases the PTS sends the MMI 202
to configure the Sink ASE to streaming state, in some others it does not.
For now, let's autonomously send Receiver Start Ready at ASE Enabled.
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
There is no reason why the capabilities
should be modified by the stack after registration,
nor any reason why a the unicast client application
needs to modify the reported remote capabilities, so
all have been marked as const.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Refactor the bt_audio_codec_cap to use flat arrays to store
metadata and codec specific capabilities.
The purpose of this is to make it easier to copy the data
between layers, but also to support non-LTV data for non-LC3
codec capabilities.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify audio_send_timeout to use bt_bap_stream_get_tx_sync
instead of bt_iso_chan_get_tx_sync to avoid using an internal
function to get the ISO channel from the BAP stream.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
- Initialisation of Coordinated Set Identification Service.
- Set and clear member lock.
- Get member RSI.
Signed-off-by: Henrik Eriksen <heri@demant.com>
Allow to assing end points to CISes before creating a CIG. Previously
the end points were assinged top-down, so the configuration 7(i) and
other similar were not covered.
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
The BAP stream object should not have a dir field. The
dir field should be stored in the EP only (to avoid having two
fields storing the same value, causing possible issues).
The field was removed, and the places that use it has been updated.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Recently there have been a few name changes in the API that caused
build errors of the tester application when LE Audio overlays applied.
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
Rename the bt_codec struct to bt_audio_codec_conf or
to the new struct bt_audio_codec_cap.
Rename the bt_codec_data to bt_audio_codec_data.
The purpose of this is to split the codec specific configuration
and codec capabilities into seperate structs, as they do not
reflect the same values, or used for the same purpose.
This commit depends on the preset macros workings on either
type of struct (for now), but will be modified in future updates.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This fixes metadata length checks for BT_AUDIO_METADATA_TYPE_EXTENDED
and BT_AUDIO_METADATA_TYPE_VENDOR that should be at least 2 bytes long.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
The CCID list can be empty, as the Assigned Numbers is not strict
regarding it's minimum length.
Fixes: #59666
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
PTS l2cap tests need BT_BUF_ACL_RX_SIZE to be 100.
Signed-off-by: Lang Xie <Lang.Xie@nordicsemi.no>
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
The bt_has_register_param was renamed to bt_has_features_param
recently. Fixes build errors.
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
The host app should increment the sequence number within SDU interval
whether it has any data to send data to the controller or not.
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
ATT attributes can be up to 512 bytes long, so the comparisong needed
fixing.
See spec v5.4, Vol 3, Part F, 3.2.9.
Fixes#57930.
Signed-off-by: Carles Cufi <carles.cufi@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>
This is required by GATT/SR/GAW/BV-14-C where PTS does a lot of small
writes to characteristic of 512 bytes.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
The function bt_codec_cfg_get_chan_allocation_val takes a pointer
to an enum, rather than an uint32_t, but was wrongly defined in
the header files and incorrectly used a few places.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Update BTP_ASCS_CONFIGURE_CODEC to send codec specific configuration
in LTV format.
Update parameters of BTP_ASCS_CONFIGURE_QOS to match the BT spec
defined lengths.
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.
Most of these changes were automated using coccinelle with the following
script:
@@
@@
- void
+ int
main(...) {
...
- return;
+ return 0;
...
}
Approximately 40 files had to be edited by hand as coccinelle was unable to
fix them.
Signed-off-by: Keith Packard <keithp@keithp.com>
Since behavior of CONFIG_LOG_DEFAULT_LEVEL was changed, if set to debug
level, causes stack overflow on nrf52 board.
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
Support for tests that use ASCS operations Codec Config, Config QOS,
Enable, Disable, Update Metadata, Release.
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
Default BT_BUF_ACL_RX_SIZE value varies based on selected host options.
Many buffers size (L2CAP COC MPS in particular) depends on that value
and those may affect qualification test cases steps.
To make core tests more predictable just use fixed values big enough to
comply with all configurations requirements.
This was affecting L2CAP/COS/ECFC/BV-04-C.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
This commit adds new API functions for AICS
Setting automatic/manual only gain modes
Setting mute disabled
Use new functions in btp.vcp
Signed-off-by: Szymon Czapracki <szymon.czapracki@codecoup.pl>
Some peripheral tests are failing if CONFIG_BT_EXT_ADV=n.
That was previously implicitly enabled by MESH but it has
dedicated overlay.
Affected tests:
GAP/BROB/BCST/BV-03-C
GAP/CONN/UCON/BV-06-C
GAP/PRIV/CONN/BV-10-C
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Key size validation was missing on getting local database which
resulted in selecting invalid characteristic by PTS for key size
validation tests.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
This command allows for more predictable GATT database changed tests
and allows to reduce custom test configurations from autopts.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Initially I was hoping we can avoid dedicated overlays and have all
config options enabled but it turned out that built-in services
may affect other tests (especially core related like GAP and GATT).
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Previously tests were passing only because initial value in
database and PTS value used for testing had same length.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Some systems can support only legacy OOB pairing while others only
LE SC OOB pairing.
The existent API function "bt_set_oob_data_flag" was removed.
Two new API functions were added:
* "bt_le_oob_set_legacy_flag" to signal that legacy OOB pairing is used
* "bt_le_oob_set_sc_flag" to signal that LE SC OOB pairing is used
The code will now advertise the presence of OOB flag depending
on the type of pairing method(SC vs legacy)
Signed-off-by: Sebastian Panceac <sebastian.panceac@ext.grandcentrix.net>
Fixes regression introduced in 26cf0b6850
"bluetooth: tester: Add support for missing BTP L2CAP listen param".
Success status was missing resulting in BTP to fail for tests that
require success on connection.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
stuct btp_mesh_cfg_model_sub_add_cmd was used instead of struct
btp_mesh_cfg_model_sub_ovw_cmd for parsing command.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
BTP_L2CAP_CONNECTION_RESPONSE_INSUFF_ENCRYPTION is used to indicate
encryption is required (but not authentication).
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
To apply when the hci_rpmsg controller with overlay
nrf5340_cpunet_iso-bt_ll_sw_split.conf is used on the netcore.
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>