zephyr/tests/bluetooth/tester
Szymon Janc 256401ed2b tests: Bluetooth: Tester: Add support for PAST
This adds support for BTP commands and events required for running
PAST tests.

struct btp_gap_ev_periodic_transfer_received_ev is also adjusted
to match BTP specification.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2025-06-10 13:28:31 +02:00
..
boards Bluetooth: tester: Support board mimxrt1170_evk@B/mimxrt1176/cm7 2025-04-24 10:38:45 +02:00
src tests: Bluetooth: Tester: Add support for PAST 2025-06-10 13:28:31 +02:00
CMakeLists.txt tests: Bluetooth: Move audio related BTP files 2024-06-07 22:08:59 -05:00
hci_ipc.conf tests: Bluetooth: Tester: Default to use overlay-bt_ll_sw_split.conf 2025-05-07 13:31:20 +02:00
Kconfig tests: bluetooth: tester: Make BTP CMD thread stack size kconfig 2025-02-12 16:04:48 +01:00
Kconfig.sysbuild tests: Bluetooth: Add BT Tester GAP smoke test 2025-04-08 10:49:00 +02:00
overlay-bt_ll_sw_split.conf tests: Bluetooth: Tester: Set controller ACL buffer size 2025-05-09 14:02:10 +02:00
overlay-le-audio.conf Bluetooth: BAP: Add a set of suggested intervals to use with BAP 2025-03-11 08:58:51 +01:00
overlay-mesh.conf tests: bluetooth: tester: fix configuration to use max fwid length 2025-06-05 15:14:35 -05:00
prj.conf tests: Bluetooth: Tester: Add support for PAST 2025-06-10 13:28:31 +02:00
prj_br.conf Bluetooth: tester: Add project configuration for BR 2025-04-24 10:38:45 +02:00
rd_rw612_bga.overlay samples: tests: bluetooth: Add support for rd_rw612_bga 2024-05-25 11:23:04 +03:00
README.rst tests: Bluetooth: tester: Instructions for btsnoop and RTT logging 2025-06-06 08:45:23 +02:00
sysbuild.cmake tests: Bluetooth: Tester: Default to use overlay-bt_ll_sw_split.conf 2025-05-07 13:31:20 +02:00
testcase.yaml tests: Bluetooth: Tester: Default to use overlay-bt_ll_sw_split.conf 2025-05-07 13:31:20 +02:00

Bluetooth Tester application
############################

The Tester application uses binary protocol to control Zephyr stack and is aimed at
automated testing. It requires two serial ports to operate.
The first serial is used by Bluetooth Testing Protocol (BTP) to drive Bluetooth
stack. BTP commands and events are received and buffered for further processing
over the same serial.

BTP specification can be found in auto-pts project repository:
https://github.com/intel/auto-pts
The auto-pts is an automation framework for PTS Bluetooth testing tool provided
by Bluetooth SIG.

See https://docs.zephyrproject.org/latest/guides/bluetooth/index.html for full
documentation about how to use this test.


Supported Profiles and Services
*******************************

Host/Core
=========

* GAP
* GATT
* IAS
* L2CAP
* OTS
* SM

LE Audio
========

* AICS
* ASCS
* BAP
* CAP
* CAS
* CCP
* CSIP
* CSIS
* HAP
* HAS
* MCP
* MCS
* MCIP
* MICS
* PACS
* PBP
* TBS
* TMAP
* VCP
* VCS
* VOCS

Mesh
====

* Mesh Node
* Mesh Model

Building and running on QEMU
****************************

QEMU should have connection with the external host Bluetooth hardware.
The btproxy tool from BlueZ can be used to give access to a Bluetooth controller
attached to the Linux host OS:

$ sudo tools/btproxy -u
Listening on /tmp/bt-server-bredr

/tmp/bt-server-bredr option is already set in Makefile through QEMU_EXTRA_FLAGS.

To build tester application for QEMU use BOARD=qemu_cortex_m3 and
CONF_FILE=qemu.conf. After this qemu can be started through the "run"
build target.

Note: Target board have to support enough UARTs for BTP and controller.
      We recommend using qemu_cortex_m3.

'bt-stack-tester' UNIX socket (previously set in Makefile) can be used for now
to control tester application.

Next, build and flash tester application by employing the "flash" build
target.

Use serial client, e.g. PUTTY to communicate over the serial port
(typically /dev/ttyUSBx) with the tester using BTP.

Building for LE Audio
*********************

The tester application can be built with support for BT LE Audio by applying the
the ``overlay-le-audio.conf`` and ``hci_ipc.conf`` with ``--sysbuild`` for the supported boards,
e.g.:

    west build -b nrf5340dk/nrf5340/cpuapp --sysbuild \
        -- -DEXTRA_CONF_FILE=overlay-le-audio.conf;hci_ipc.conf

Building with support for btsnoop and rtt logs
**********************************************

Add following options in desired configuration file:

CONFIG_LOG=n
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_RTT_BUFFER=1
CONFIG_LOG_BACKEND_RTT_MODE_DROP=n

CONFIG_USE_SEGGER_RTT=y
CONFIG_SEGGER_RTT_SECTION_CUSTOM=y

CONFIG_BT_DEBUG_MONITOR_RTT=y
CONFIG_BT_DEBUG_MONITOR_RTT_BUFFER=2