Commit 5bd46b91 authored by Henrik Eriksen's avatar Henrik Eriksen Committed by Fabio Baltieri
Browse files

bluetooth: tester: Added support for testing CSIS.



- Initialisation of Coordinated Set Identification Service.
- Set and clear member lock.
- Get member RSI.

Signed-off-by: default avatarHenrik Eriksen <heri@demant.com>
parent 3f8d33ee
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -39,3 +39,7 @@ endif()
if(CONFIG_BT_HAS)
    target_sources(app PRIVATE src/btp_has.c)
endif()

if (CONFIG_BT_CSIP_SET_MEMBER)
    target_sources(app PRIVATE src/btp_csis.c)
endif()
+3 −0
Original line number Diff line number Diff line
@@ -48,3 +48,6 @@ CONFIG_BT_IAS_CLIENT=y
CONFIG_BT_HAS=y
CONFIG_BT_HAS_PRESET_COUNT=5
CONFIG_BT_HAS_PRESET_NAME_DYNAMIC=y

# CSIS
CONFIG_BT_CSIP_SET_MEMBER=y
+3 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include "btp_ascs.h"
#include "btp_bap.h"
#include "btp_has.h"
#include "btp_csis.h"

#define BTP_MTU 1024
#define BTP_DATA_MAX_SIZE (BTP_MTU - sizeof(struct btp_hdr))
@@ -47,8 +48,9 @@
#define BTP_SERVICE_ID_ASCS	13
#define BTP_SERVICE_ID_BAP	14
#define BTP_SERVICE_ID_HAS	15
#define BTP_SERVICE_ID_CSIS	17

#define BTP_SERVICE_ID_MAX	BTP_SERVICE_ID_HAS
#define BTP_SERVICE_ID_MAX	BTP_SERVICE_ID_CSIS

#define BTP_STATUS_SUCCESS	0x00
#define BTP_STATUS_FAILED	0x01
+30 −0
Original line number Diff line number Diff line
/* btp_csis.h - Bluetooth tester headers */

/*
 * Copyright (c) 2023 Oticon
 *
 * SPDX-License-Identifier: Apache-2.0
 */
#include <zephyr/bluetooth/audio/csip.h>

/* CSIS commands */
#define BTP_CSIS_READ_SUPPORTED_COMMANDS	0x01
struct btp_csis_read_supported_commands_rp {
	uint8_t data[0];
} __packed;

#define BTP_CSIS_SET_MEMBER_LOCK		0x02
struct btp_csis_set_member_lock_cmd {
	bt_addr_le_t address;
	uint8_t lock;
	uint8_t force;
} __packed;

#define BTP_CSIS_GET_MEMBER_RSI			0x03
struct btp_csis_get_member_rsi_cmd {
	bt_addr_le_t address;
} __packed;

struct btp_csis_get_member_rsi_rp {
	uint8_t rsi[BT_CSIP_RSI_SIZE];
} __packed;
+3 −0
Original line number Diff line number Diff line
@@ -89,3 +89,6 @@ uint8_t tester_unregister_bap(void);

uint8_t tester_init_has(void);
uint8_t tester_unregister_has(void);

uint8_t tester_init_csis(void);
uint8_t tester_unregister_csis(void);
Loading