Bluetooth: audio: tbs_client: Subscribe to all required notifications
This removes odd `subscribe` parameter from bt_tbs_client_discover function parameters list. As the API user enables specific CONFIG_BT_TBS_CLIENT_* option, the client implementation should subscribe to the characteristic notifications so that the user receives the value updates. Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
parent
c9bf63b197
commit
2b27b4ebe0
6 changed files with 9 additions and 24 deletions
|
@ -27,20 +27,9 @@
|
|||
static int cmd_tbs_client_discover(const struct shell *sh, size_t argc,
|
||||
char *argv[])
|
||||
{
|
||||
bool subscribe = true;
|
||||
int result = 0;
|
||||
|
||||
if (argc > 1) {
|
||||
subscribe = shell_strtobool(argv[1], 0, &result);
|
||||
if (result != 0) {
|
||||
shell_error(sh, "Could not parse subscribe: %d",
|
||||
result);
|
||||
|
||||
return -ENOEXEC;
|
||||
}
|
||||
}
|
||||
|
||||
result = bt_tbs_client_discover(default_conn, (bool)subscribe);
|
||||
result = bt_tbs_client_discover(default_conn);
|
||||
if (result != 0) {
|
||||
shell_print(sh, "Fail: %d", result);
|
||||
}
|
||||
|
@ -1001,8 +990,8 @@ static int cmd_tbs_client(const struct shell *sh, size_t argc, char **argv)
|
|||
|
||||
SHELL_STATIC_SUBCMD_SET_CREATE(tbs_client_cmds,
|
||||
SHELL_CMD_ARG(discover, NULL,
|
||||
"Discover TBS [subscribe]",
|
||||
cmd_tbs_client_discover, 1, 1),
|
||||
"Discover TBS",
|
||||
cmd_tbs_client_discover, 1, 0),
|
||||
|
||||
#if defined(CONFIG_BT_TBS_CLIENT_SET_BEARER_SIGNAL_INTERVAL)
|
||||
SHELL_CMD_ARG(set_signal_reporting_interval, NULL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue