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>
This make is easier to verify if proper use of BTP is maintained.
tester_rsp and tester_rsp_full will be removed eventually when
BTP is fully async.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
We always have 0 index (and occasional NONE index) so there is no
point in validating those in each handler.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
bt_addr_le_t matches BTP convention for addresses and it makes it
so much better to handle those directly from command structures.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
This changes the way of BTP commmand handlers are called. Instead of
calling functions to handle service we now provide API for registering
callbacks per command. This allows to keep common checks (size etc)
in single place for (most) commands. Also provide common buffer for
reponses forcing callbacks to handle replay in common way.
In this commit only Core and GAP services are converted. This leaves
rest of services unfuntional (but code stil compiles correctly).
Other services are converted in following commits.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Rename the bt_audio_audio_server API to bt_bap_unicast_server
and move API to bap.h.
This also adds the _bap_ infix for bt_unicast_server.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add support for:
- SAR Configuration Client and Server models
- Transport SAR configuration states
- Using SAR Transmitter/Receiver states in segmentation
and reassembly process.
Bsim tests fixes:
- Fix failing replay attack test. The replay attack test doesn't
consider retransmission attempts at the transport layer. When
retransmission happens, SeqNums get increased and the test logic
doesn't work anymore. The simplest fix would be to disable
retransmissions at the transport layer.
- Add device synchronization API to synchronize transport va test.
Device configuration may take different time on transmitter and
receiver. Add synchronisation barrier between devices.
- Fix msg_frnd test. Timing in transport sar behavior has been
changed, which affected test_friend_msg test. Now acknowledgments
are sent much faster and this needs to be considered in the test.
- Fix unicast_low_lat test. Increase number of retransmission
attempts when long segmented message is sent.
- Reduce timeout in kr_old_key test.
- Relax SAR RX state configuration in DFU and BLOB tests.
Co-authored-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Co-authored-by: Anders Storrø <anders.storro@nordicsemi.no>
Co-authored-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Default config should have all bells and whistles enabled to minimize
number of overlays needed in autopts.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Some tests may be unstable because of missing data from BTP frames.
Enabling Flow Control fixes the issue, but seems to work reliably
only along with UARTE.
Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
This commit introduces Volume Control Profile and
Immediate Alert Service into btp.
VCP includes:
Audio Input Control Service
Volume Control Service
Volume Offset Control Service
Signed-off-by: Szymon Czapracki <szymon.czapracki@codecoup.pl>
Specification states that: "Only one Client Characteristic Configuration
declaration shall exist in a characteristic definition." This was
wrongly understood as "Ony one CCC can exist in GATT Server". When we
add next characteristic `ccc_added` flag is cleared so next CC can be
added (for this characteristic).
Added array for CCC values so it's no longer shared between CCCs.
Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
This commits extracts mesh, gat, gap, l2cap from
bttester.h into corresponding header files for
better readability.
Signed-off-by: Szymon Czapracki <szymon.czapracki@codecoup.pl>