From faee29c229ff375309debc8ca6f8fb1b1b08f6dc Mon Sep 17 00:00:00 2001 From: Rubin Gerritsen Date: Tue, 29 Aug 2023 09:06:29 +0200 Subject: [PATCH] Bluetooth: Shell: Only print valid ISO data The application gets notified about both valid and invalid data. As data arrives every SDU interval, we would like to only print the valid data to avoid the shell being flooded with logs. Signed-off-by: Rubin Gerritsen --- subsys/bluetooth/shell/iso.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/shell/iso.c b/subsys/bluetooth/shell/iso.c index 4487deaa198..dcfdcfa9cb7 100644 --- a/subsys/bluetooth/shell/iso.c +++ b/subsys/bluetooth/shell/iso.c @@ -63,8 +63,10 @@ static uint32_t get_next_sn(uint32_t last_sn, int64_t *last_ticks, static void iso_recv(struct bt_iso_chan *chan, const struct bt_iso_recv_info *info, struct net_buf *buf) { - shell_print(ctx_shell, "Incoming data channel %p len %u, seq: %d, ts: %d", - chan, buf->len, info->seq_num, info->ts); + if (info->flags & BT_ISO_FLAGS_VALID) { + shell_print(ctx_shell, "Incoming data channel %p len %u, seq: %d, ts: %d", + chan, buf->len, info->seq_num, info->ts); + } } static void iso_connected(struct bt_iso_chan *chan)