From e9f7c58f747b1a874ea4d3d7f1b77c08e7132782 Mon Sep 17 00:00:00 2001 From: Frode van der Meeren Date: Thu, 9 Jan 2025 15:43:53 +0100 Subject: [PATCH] temporarely run with more logging --- tests/bluetooth/tester/src/audio/btp_pbp.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/bluetooth/tester/src/audio/btp_pbp.c b/tests/bluetooth/tester/src/audio/btp_pbp.c index 9b58e030c10..12c29843744 100644 --- a/tests/bluetooth/tester/src/audio/btp_pbp.c +++ b/tests/bluetooth/tester/src/audio/btp_pbp.c @@ -97,6 +97,8 @@ static uint8_t pbp_read_supported_commands(const void *cmd, uint16_t cmd_len, { struct btp_pbp_read_supported_commands_rp *rp = rsp; + LOG_DBG("Reading supported PBP commands..."); + tester_set_bit(rp->data, BTP_PBP_READ_SUPPORTED_COMMANDS); tester_set_bit(rp->data, BTP_PBP_SET_PUBLIC_BROADCAST_ANNOUNCEMENT); tester_set_bit(rp->data, BTP_PBP_SET_BROADCAST_NAME); @@ -121,6 +123,8 @@ static int pbp_broadcast_source_adv_setup(void) int err = bt_rand(&broadcast_id, BT_AUDIO_BROADCAST_ID_SIZE); + LOG_DBG("Setting up extended advertisement for PBP..."); + if (err) { LOG_ERR("Unable to generate broadcast ID: %d\n", err); return -EINVAL; @@ -161,6 +165,8 @@ static uint8_t pbp_set_public_broadcast_announcement(const void *cmd, uint16_t c const struct btp_pbp_set_public_broadcast_announcement_cmd *cp = cmd; int err = -EINVAL; + LOG_DBG("setting public broadcast anouncement..."); + if (cp->metadata_len <= PBP_EXT_ADV_METADATA_LEN_MAX) { pbp_name_cached_len = cp->metadata_len; memcpy(pbp_metadata_cached, cp->metadata, cp->metadata_len); @@ -179,6 +185,8 @@ static uint8_t pbp_set_broadcast_name(const void *cmd, uint16_t cmd_len, const struct btp_pbp_set_broadcast_name_cmd *cp = cmd; int err = -EINVAL; + LOG_DBG("setting broadcast name..."); + if (cp->name_len <= BT_AUDIO_BROADCAST_NAME_LEN_MAX) { pbp_metadata_cached_len = cp->name_len; memcpy(pbp_broadcast_name_cached, cp->name, cp->name_len); @@ -258,6 +266,9 @@ uint8_t tester_init_pbp(void) { pbp_metadata_cached_len = 0; pbp_name_cached_len = 0; + + LOG_DBG("Init PBP..."); + tester_register_command_handlers(BTP_SERVICE_ID_PBP, pbp_handlers, ARRAY_SIZE(pbp_handlers)); @@ -268,5 +279,7 @@ uint8_t tester_init_pbp(void) uint8_t tester_unregister_pbp(void) { + LOG_DBG("Unregister PBP..."); + return BTP_STATUS_SUCCESS; }