Skip to content

Commit 5060277

Browse files
committed
tests: bluetooth: tester: Add AVRCP and AVCTP support
Add Bluetooth Test Protocol (BTP) support for Audio/Video Remote Control Profile (AVRCP) and Audio/Video Control Transport Protocol (AVCTP) testing to enable PTS qualification. AVRCP implementation: - Controller (CT) role with browsing and cover art support - Target (TG) role with browsing and cover art support - Complete BTP command/event interface - Support for all AVRCP PTS test cases AVCTP implementation: - Complete BTP command/event interface - Support for all AVCTP PTS test cases Signed-off-by: Can Wang <[email protected]>
1 parent d3d629e commit 5060277

File tree

9 files changed

+6406
-2
lines changed

9 files changed

+6406
-2
lines changed

tests/bluetooth/tester/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ if(CONFIG_BT_OTS)
3333
target_sources(app PRIVATE src/btp_ots.c)
3434
endif()
3535

36+
if(CONFIG_BT_AVRCP)
37+
target_sources(app PRIVATE src/btp_avrcp.c)
38+
endif()
39+
40+
if(CONFIG_BT_AVCTP)
41+
target_sources(app PRIVATE src/btp_avctp.c)
42+
endif()
43+
3644
zephyr_library_include_directories(src src/btp src/audio/btp)
3745
add_subdirectory_ifdef(CONFIG_BT_AUDIO src/audio)
3846

tests/bluetooth/tester/prj_br.conf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,16 @@ CONFIG_BT_PERIPHERAL=y
44
CONFIG_BT_SMP=y
55
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
66
CONFIG_BT_PAGE_TIMEOUT=0xFFFF
7+
8+
CONFIG_BT_AVRCP=y
9+
CONFIG_BT_AVRCP_CONTROLLER=y
10+
CONFIG_BT_AVRCP_TARGET=y
11+
CONFIG_BT_AVRCP_BROWSING=y
12+
CONFIG_BT_AVRCP_TG_COVER_ART=y
13+
CONFIG_BT_AVRCP_CT_COVER_ART_GET_IMAGE_PROPERTIES=y
14+
CONFIG_BT_AVRCP_CT_COVER_ART_GET_IMAGE=y
15+
CONFIG_BT_AVRCP_CT_COVER_ART_GET_LINKED_THUMBNAIL=y
16+
CONFIG_BT_L2CAP_TX_MTU=255
17+
CONFIG_BT_L2CAP_MPS=255
18+
CONFIG_BT_BUF_ACL_RX_SIZE=264
19+
CONFIG_BT_AVRCP_VD_RX_SIZE=1024

tests/bluetooth/tester/src/btp/btp.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
#include "btp_ots.h"
4343
#include "btp_pbp.h"
4444
#include "btp_sdp.h"
45+
#include "btp_avrcp.h"
46+
#include "btp_avctp.h"
4547

4648
#define BTP_MTU 1024
4749
#define BTP_DATA_MAX_SIZE (BTP_MTU - sizeof(struct btp_hdr))
@@ -83,8 +85,10 @@
8385
#define BTP_SERVICE_ID_OTS 0x1d
8486
#define BTP_SERVICE_ID_PBP 0x1e
8587
#define BTP_SERVICE_ID_SDP 0x1f
88+
#define BTP_SERVICE_ID_AVRCP 0x25
89+
#define BTP_SERVICE_ID_AVCTP 0x26
8690

87-
#define BTP_SERVICE_ID_MAX BTP_SERVICE_ID_SDP
91+
#define BTP_SERVICE_ID_MAX BTP_SERVICE_ID_AVCTP
8892

8993
#define BTP_STATUS_SUCCESS 0x00
9094
#define BTP_STATUS_FAILED 0x01
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* btp_avctp.h - Bluetooth AVCTP Tester */
2+
3+
/*
4+
* Copyright 2025 NXP
5+
*
6+
* SPDX-License-Identifier: Apache-2.0
7+
*/
8+
9+
#include <stdint.h>
10+
11+
#include <zephyr/bluetooth/addr.h>
12+
13+
#define BTP_AVCTP_READ_SUPPORTED_COMMANDS 0x01
14+
struct btp_avctp_read_supported_commands_rp {
15+
uint8_t data[0];
16+
} __packed;

0 commit comments

Comments
 (0)