|
11 | 11 |
|
12 | 12 | #include <../../subsys/bluetooth/audio/tbs_internal.h>
|
13 | 13 |
|
| 14 | +#include <zephyr/bluetooth/audio/tbs.h> |
14 | 15 | #include <zephyr/logging/log.h>
|
| 16 | + |
15 | 17 | #define LOG_MODULE_NAME bttester_ccp
|
16 | 18 | LOG_MODULE_REGISTER(LOG_MODULE_NAME, CONFIG_BTTESTER_LOG_LEVEL);
|
17 | 19 |
|
@@ -1162,11 +1164,46 @@ static const struct btp_handler tbs_handlers[] = {
|
1162 | 1164 |
|
1163 | 1165 | uint8_t tester_init_tbs(void)
|
1164 | 1166 | {
|
| 1167 | + const struct bt_tbs_register_param gtbs_param = { |
| 1168 | + .provider_name = "Generic TBS", |
| 1169 | + .uci = "un000", |
| 1170 | + .uri_schemes_supported = "tel,skype", |
| 1171 | + .gtbs = true, |
| 1172 | + .authorization_required = false, |
| 1173 | + .technology = BT_TBS_TECHNOLOGY_3G, |
| 1174 | + .supported_features = CONFIG_BT_TBS_SUPPORTED_FEATURES, |
| 1175 | + }; |
| 1176 | + const struct bt_tbs_register_param tbs_param = { |
| 1177 | + .provider_name = "TBS", |
| 1178 | + .uci = "un000", |
| 1179 | + .uri_schemes_supported = "tel,skype", |
| 1180 | + .gtbs = false, |
| 1181 | + .authorization_required = false, |
| 1182 | + /* Set different technologies per bearer */ |
| 1183 | + .technology = BT_TBS_TECHNOLOGY_4G, |
| 1184 | + .supported_features = CONFIG_BT_TBS_SUPPORTED_FEATURES, |
| 1185 | + }; |
| 1186 | + int err; |
| 1187 | + |
1165 | 1188 | bt_tbs_register_cb(&tbs_cbs);
|
1166 | 1189 |
|
1167 | 1190 | tester_register_command_handlers(BTP_SERVICE_ID_TBS, tbs_handlers,
|
1168 | 1191 | ARRAY_SIZE(tbs_handlers));
|
1169 | 1192 |
|
| 1193 | + err = bt_tbs_register_bearer(>bs_param); |
| 1194 | + if (err < 0) { |
| 1195 | + LOG_DBG("Failed to register GTBS: %d", err); |
| 1196 | + |
| 1197 | + return BTP_STATUS_FAILED; |
| 1198 | + } |
| 1199 | + |
| 1200 | + err = bt_tbs_register_bearer(&tbs_param); |
| 1201 | + if (err < 0) { |
| 1202 | + LOG_DBG("Failed to register TBS: %d", err); |
| 1203 | + |
| 1204 | + return BTP_STATUS_FAILED; |
| 1205 | + } |
| 1206 | + |
1170 | 1207 | return BTP_STATUS_SUCCESS;
|
1171 | 1208 | }
|
1172 | 1209 |
|
|
0 commit comments