Bluetooth: BAP: Shell: Add endpoint state info

The bap list command now also shows the states of each endpoint.

Fixes #70838

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
This commit is contained in:
Jens Rehhoff Thomsen 2024-05-31 11:09:27 +02:00 committed by Henrik Brix Andersen
commit 06bb9f258a

View file

@ -1649,7 +1649,13 @@ static void conn_list_eps(struct bt_conn *conn, void *data)
const struct bt_bap_ep *ep = snks[conn_index][i];
if (ep != NULL) {
shell_print(sh, " #%u: ep %p", i, ep);
struct bt_bap_ep_info ep_info;
int err;
err = bt_bap_ep_get_info(ep, &ep_info);
if (err == 0) {
shell_print(sh, " #%u: ep %p (state: %d)", i, ep, ep_info.state);
}
}
}
#endif /* CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT > 0 */
@ -1661,7 +1667,13 @@ static void conn_list_eps(struct bt_conn *conn, void *data)
const struct bt_bap_ep *ep = srcs[conn_index][i];
if (ep != NULL) {
shell_print(sh, " #%u: ep %p", i, ep);
struct bt_bap_ep_info ep_info;
int err;
err = bt_bap_ep_get_info(ep, &ep_info);
if (err == 0) {
shell_print(sh, " #%u: ep %p (state: %d)", i, ep, ep_info.state);
}
}
}
#endif /* CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT > 0 */