diff --git a/tests/bluetooth/tester/src/audio/btp_ccp.c b/tests/bluetooth/tester/src/audio/btp_ccp.c index 5bd9a28458f82c8..e2f5b55afba8a96 100644 --- a/tests/bluetooth/tester/src/audio/btp_ccp.c +++ b/tests/bluetooth/tester/src/audio/btp_ccp.c @@ -11,7 +11,9 @@ #include <../../subsys/bluetooth/audio/tbs_internal.h> +#include #include + #define LOG_MODULE_NAME bttester_ccp LOG_MODULE_REGISTER(LOG_MODULE_NAME, CONFIG_BTTESTER_LOG_LEVEL); @@ -1162,11 +1164,46 @@ static const struct btp_handler tbs_handlers[] = { uint8_t tester_init_tbs(void) { + const struct bt_tbs_register_param gtbs_param = { + .provider_name = "Generic TBS", + .uci = "un000", + .uri_schemes_supported = "tel,skype", + .gtbs = true, + .authorization_required = false, + .technology = BT_TBS_TECHNOLOGY_3G, + .supported_features = CONFIG_BT_TBS_SUPPORTED_FEATURES, + }; + const struct bt_tbs_register_param tbs_param = { + .provider_name = "TBS", + .uci = "un000", + .uri_schemes_supported = "tel,skype", + .gtbs = false, + .authorization_required = false, + /* Set different technologies per bearer */ + .technology = BT_TBS_TECHNOLOGY_4G, + .supported_features = CONFIG_BT_TBS_SUPPORTED_FEATURES, + }; + int err; + bt_tbs_register_cb(&tbs_cbs); tester_register_command_handlers(BTP_SERVICE_ID_TBS, tbs_handlers, ARRAY_SIZE(tbs_handlers)); + err = bt_tbs_register_bearer(>bs_param); + if (err != 0) { + LOG_DBG("Failed to register GTBS: %d", err); + + return BTP_STATUS_FAILED; + } + + err = bt_tbs_register_bearer(&tbs_param); + if (err != 0) { + LOG_DBG("Failed to register TBS: %d", err); + + return BTP_STATUS_FAILED; + } + return BTP_STATUS_SUCCESS; }