Commit graph

39 commits

Author SHA1 Message Date
Valerio Setti 32b792b21f bluetooth: remove BT_TINYCRYPT_ECC in bluetooth mesh tests
Some bluetooth test were using BT_TINYCRYPT_ECC without also
setting BT_ECC. This means that BT_TINYCRYPT_ECC gets disabled
as it depends on BT_ECC.
This commit fix this by removing BT_TINYCRYPT_ECC in all test
for bluetooth mesh.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-06-14 15:41:34 +02:00
Szymon Janc 37f9cb75cc bluetooth: tester: Add support for OTS
This implemnets OTS service and provides OTS instance with two objects
for behavior valid and invalid test cases. Service implementation is
inspired by peripheral_ots sample.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2024-05-02 16:51:42 +02:00
Szymon Janc a2184305f2 bluetooth: tester: Enable Periodic Advertising support
This is required by GAP/PADV/PASM/BV-01-C and GAP/PADV/PAM/BV-01-C
qualification test cases.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2023-12-11 09:50:48 +01:00
Szymon Janc 4c269d0d61 tests: bluetooth: tester: Increase BT RX thread stack
Default stack size if not enought and was causing MPU faults.
This was affecting GATT/SR/GAW/BV-14-C qualification test case.

<dbg> bttester_gatt: gatt_db_add: handle 0x0000
<err> os: ***** MPU FAULT *****
<err> os:   Stacking error (context area might be not valid)
<err> os:   Data Access Violation
<err> os:   MMFAR Address: 0x2000aa38
<err> os: r0/a1:  0x00000000  r1/a2:  0x00000000  r2/a3:  0x00000000
<err> os: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x00000000
<err> os:  xpsr:  0x00000000
<err> os: Faulting instruction address (r15/pc): 0x00000000
<err> os: >>> ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0
<err> os: Current thread: 0x20002d28 (BT RX)
<err> os: Halting system

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2023-10-10 11:18:11 +02:00
Szymon Janc 5dbc069e3d bluetooth: tester: Bump supported GATT Prepare Writes to 12
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>
2023-05-16 18:19:50 +02:00
Szymon Janc aa861727e8 bluetooth: tester: Use fixed value for BT_BUF_ACL_RX_SIZE
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>
2023-03-31 14:00:48 +02:00
Szymon Janc 06c6a9cb1c bluetooth: tester: Enable extended advertising
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>
2023-03-30 13:48:30 +02:00
Szymon Janc 577d4b004f bluetooth: tester: Add MESH and LE Audio overlays
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>
2023-03-27 09:50:09 +02:00
Emil Gydesen eeae1f096a Bluetooth: Audio: Rename bt_audio_unicast_server to bt_bap_...
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>
2023-03-07 16:21:44 +01:00
Szymon Janc 56436e5172 bluetooth: tester: Disable GATT auto-retry on security error
This is causing races with PTS WIDs. Lets explicitly handle security
elevation when asked by PTS.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2023-03-07 11:12:03 +01:00
Michał Narajowski dd59a45c65 Bluetooth: Mesh: Transport SAR Configuration
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>
2023-03-06 13:52:15 +01:00
Szymon Janc e8e66c85ef bluetooth: tester: Enable unicast server by default
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>
2023-03-06 13:51:55 +01:00
Magdalena Kasenberg 69a6ead783 bluetooth: tester: Add PACS test handling
Add support for testing Published Audio Capabilities Service server
with PTS.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2023-02-20 11:19:42 +01:00
Szymon Czapracki 7941a88121 bluetooth: tester: Add VCP & IAS test handling
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>
2023-01-20 16:12:15 +01:00
Krzysztof Kopyściński aa0c52f212 tests: bluetooth: tester: Improve stability of MESH/NODE/TNPT/BV-05-C
IUT is requested to send 2 multi-segmented model messages. In mean time,
third may be sent from Config Model Publication Status may be sent,
which is also segmented. One of the 3 messages will fail to be sent,
but test is passing if it is Status one. Let's increase number of
possible concurrent transmissions to allow all three messages to be
sent.

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2022-10-13 09:56:38 +02:00
Anders Storrø 36e34fce41 Bluetooth: Mesh: Add CDB depend on to prov Kconfig
The current implementation of provisioning features is dependent on CDB
to compile, which is reflected poorly in the Kconfig options for mesh.

This commit alters the Kconfig options for provisioning to be dependent
on the CDB option to compile.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2022-09-06 12:35:48 +02:00
Krzysztof Kopyściński f71741cea0 tests: bluetooth: tester: add support for testing Multiple Notifications
Enabled Multiple Notifications and added command for
bt_gatt_notify_multiple().

Increased possible number of connections to execute GATT/SR/GAN/BV-02-C

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2022-08-05 13:01:46 +02:00
Alperen Sener 12e57d414c tests/bluetooth/tester: Set mesh message cache size to 10
MESH/NODE/RLY/BI-02-C case requires cache size of 10

Signed-off-by: Alperen Sener <alperen.sener@nordicsemi.no>
2022-06-05 14:45:24 +02:00
Szymon Janc 218225b17a tests/bluetooth/tester: Disable EATT autoconnect
Don't autoconnect EATT as this was confusing PTS and resulted in
multiple tests failures. When needed PTS will connect EATT bearer.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2022-04-07 19:06:41 +02:00
Szymon Janc 573c0d59e0 tests/bluetooth/tester: Add support for auto connection establishment
autopts was updated to properly require support for Accept Filter List
in Auto Connection Establishment Procedure related tests. This patch
enabled support for it and adds required BTP support.

This was affecting following qualification test cases:
GAP/CONN/ACEP/BV-03-C
GAP/CONN/ACEP/BV-04-C

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2022-03-24 10:45:49 +01:00
Szymon Janc d7b37d8cc8 tests: bluetooth: tester: Increase ATT prepare write buffers count
GATT/SR/GAW/BV-10-C requires more buffers as it tests nested long
writes.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2021-10-22 16:37:38 +02:00
Michał Narajowski 5d0f2fbc1d tests: bluetooth: tester: Adjust Segment Retransmit Count
In test cases MESH/NODE/TNPT/BV-04-C and MESH/NODE/TNPT/BI-01-C
the PTS is sending incomplete Seg Ack 3 times and in some cases we run
out of retransmit attempts before PTS sends complete Seg Ack. As a
workaround, increase Segment Retransmit Count to improve stability of
these tests.

Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
2021-10-07 15:45:22 -04:00
Agata Ponitka bd8b9ee830 Bluetooth: Tester: Add the OOB Authentication method
Adding support for automatic testing OOB Authentication method.

Signed-off-by: Agata Ponitka <agata.ponitka@codecoup.pl>
2021-09-28 11:44:33 +02:00
Krzysztof Kopyściński c94e53c9f5 Tests: bluetooth: tester: increase CONFIG_BT_ATT_PREPARE_COUNT
This is required for GATT/SR/GAW/BV-14-C

signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2021-08-21 21:34:08 -04:00
Krzysztof Kopyściński c8a196c65b Tests: Bluetooth: Tester: enable EATT by default
Since Zephyr supports EATT, which is reflected in ICS GATT_2_3
(Enhanced ATT bearer Attribute Protocol Supported (L2CAP fixed EATT PSM
supported) and GATT_2_3a (Enhanced ATT bearer supported over LE)
in GATT tests preamble 4.2.1.4 (Setup EATT Bearer over LE) is used
instead of 4.2.1.2 (Setup ATT Bearer over LE). Let's enable
EATT by default, allowing to run almost all GATT tests without
additional overlay.

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2021-08-03 13:56:41 +02:00
Michał Narajowski 0bca465cab Bluetooth: tester: Add Bond Lost API
In GAP/SEC/AUT/BV-22-C the IUT needs to inform the Upper Tester about a
lost bond.

Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
2021-07-23 14:43:01 +03:00
Agata Ponitka 1dbfc40705 Bluetooth: tester: Add provisioner support
Add provisioning procedure for automatic testing.

Signed-off-by: Agata Ponitka <agata.ponitka@codecoup.pl>
2021-07-22 22:41:32 +03:00
Michał Narajowski d4247b3503 Bluetooth: tester: Set LPN Poll timeout to smaller value
Smaller poll timeout means shorter test time.

Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
2021-01-15 11:14:24 -05:00
Michał Narajowski 7c06f3c38e mesh: Adjust config values to pass Transport test cases
These values were derived experimentally by running PTS test cases.

Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
2020-07-02 16:30:01 +03:00
Carles Cufi 4a59e8da59 Bluetooth: tester: Disable forcing of MITM
Since some tests require MITM to be off, disable the option that forces
the MITM flag at all times.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-23 21:46:22 +02:00
Carles Cufi 6f8dd90a83 Bluetooth: tester: Ensure the app is bondable by default
Ensure the bondable Kconfig option is set unconditionally.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-23 21:46:22 +02:00
Carles Cufi 6de5c4b7b3 tests: bluetooth: tester: Clean up configuration
- Use the built-in mechanism for configuration overlays
  (having a boards/ folder with <board>.conf fragments)
- Clean up variables that were giving warnings

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-02-20 21:37:33 +02:00
Mariusz Skamra 79b5e7e6fa Bluetooth: tester: Rename config files
This removes redundant prj_* prefix from configuration file name.

Change-Id: I9867fa345791e68b64f83bb0cd75634cf1cde887
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-11-04 22:06:07 +02:00
Grzegorz Kolodziejczyk 81e10314ef Bluetooth: tester: Add L2CAP init method
This adds method which initialize data pool for L2CAP data.

Change-Id: I2b170489aa4b2afc3c1f962591f377e23d147161
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-09-07 09:08:47 +00:00
Mariusz Skamra 997765def2 Bluetooth: tester: Increase prepare write buffers pool for qemu and nble
Buffers pool has to be increased for all configurations.

Change-Id: Id24caced5043c1672ca5f753d1e86d9a72c728ea
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
2016-07-01 14:57:02 +02:00
Luiz Augusto von Dentz d7e0294227 Bluetooth: ATT: Add incoming buffer pool
This adds a buffer for incoming prepare writes which can be
tunned using BLUETOOTH_ATT_PREPARE_COUNT, these buffers are then used in
execute write to commit the data thus making flush callback obsolete:

[bt] [DBG] bt_att_recv: (0x001159c0)Received ATT code 0x16 len 50
[bt] [DBG] att_prepare_write_req: (0x001159c0)handle 0x0022 offset 0
[bt] [DBG] prep_write_cb: (0x001159c0)handle 0x0022 offset 0
[bt] [DBG] bt_att_recv: (0x001159c0)Received ATT code 0x16 len 34
[bt] [DBG] att_prepare_write_req: (0x001159c0)handle 0x0022 offset 45
[bt] [DBG] prep_write_cb: (0x001159c0)handle 0x0022 offset 45
[bt] [DBG] bt_att_recv: (0x001159c0)Received ATT code 0x18 len 2
[bt] [DBG] att_exec_write_req: (0x001159c0)flags 0x01
[bt] [DBG] write_cb: (0x001159c0)handle 0x0022 offset 0
[bt] [DBG] write_cb: (0x001159c0)handle 0x0022 offset 45

Change-Id: Iae071d7b4b5b042285952da57e3f7a853cf58afb
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-06 12:28:11 +00:00
Luiz Augusto von Dentz f6dd1e4144 Bluetooth: Add support for using SYS_LOG
This add CONFIG_BLUETOOTH_DEBUG_LOG which depends on SYS_LOG since the
later can actually use either CONFIG_PRINTK or CONFIG_STDOUT_CONSOLE.

Change-Id: Ib2974d1331f6c91d119a218ec95e8bf01069377b
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-06-01 05:04:10 +00:00
Johan Hedberg 560956c54d Bluetooth: Kconfig: Split debug selection into a choice
This prepares for adding other debug types besides the printf-style
logging to the console.

Change-Id: Ic2ed305192491734da991c4f61fdaace03fd60f2
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-20 17:46:09 +03:00
Anas Nashif 2e4de760be tests: move bluetooth tests to tests/
Move all bluetooth testcases to tests/ and change Makefiles
accordingly where applicable.

Also fix Makefile to make some variables overridable and reduce
level of whitelisting in testcase.ini.

Change-Id: Ia71ee1fbbb238c45280b1e3c4747ca2f748f5263
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 18:00:35 +00:00
Renamed from samples/bluetooth/tester/prj.conf (Browse further)