From 0f3b0d29dac1058d4ed762eebb2de698a23782ad Mon Sep 17 00:00:00 2001 From: Emil Gydesen Date: Tue, 26 Mar 2024 14:15:38 +0100 Subject: [PATCH] Bluetooth: BAP: Shell: Fix documentation for broadcast_code The documentation for the command bap_broadcast_assistant broadcast_code was incorrect and has been fixed. Additionally, and example of the command has been added in the shell documentation. Signed-off-by: Emil Gydesen --- .../bluetooth/api/shell/bap_broadcast_assistant.rst | 12 +++++++++++- .../bluetooth/audio/shell/bap_broadcast_assistant.c | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/connectivity/bluetooth/api/shell/bap_broadcast_assistant.rst b/doc/connectivity/bluetooth/api/shell/bap_broadcast_assistant.rst index 169ee925874..01d2a9f23b6 100644 --- a/doc/connectivity/bluetooth/api/shell/bap_broadcast_assistant.rst +++ b/doc/connectivity/bluetooth/api/shell/bap_broadcast_assistant.rst @@ -41,7 +41,7 @@ subscribe to all notifications. [bis_index [bis_index [bix_index [...]]]]> mod_src : Set sync [] [] [] - broadcast_code : Send a space separated broadcast code of up to 16 bytes + broadcast_code : Send a string-based broadcast code of up to 16 bytes rem_src : Remove a source read_state : Remove a source @@ -115,3 +115,13 @@ Modifying a receive state: BASS recv state: src_id 0, addr 1E:4D:0A:AA:6E:49 (random), sid 0, sync_state 2, encrypt_state 0 [0]: BIS sync 0x0001, metadata_len 4 Metadata length 2, type 2, data: 0100 + +Supplying a broadcast code: +--------------------------- + +.. code-block:: console + + uart:~$ bap_broadcast_assistant broadcast_code 0 secretCode + Sending broadcast code: + 00000000: 73 65 63 72 65 74 43 6f 64 65 00 00 00 00 00 00 |secretCo de....| + uart:~$ BASS broadcast code successful diff --git a/subsys/bluetooth/audio/shell/bap_broadcast_assistant.c b/subsys/bluetooth/audio/shell/bap_broadcast_assistant.c index fad8b150e0a..f5fbde37046 100644 --- a/subsys/bluetooth/audio/shell/bap_broadcast_assistant.c +++ b/subsys/bluetooth/audio/shell/bap_broadcast_assistant.c @@ -1042,7 +1042,7 @@ SHELL_STATIC_SUBCMD_SET_CREATE( "[] []", cmd_bap_broadcast_assistant_mod_src, 3, 2), SHELL_CMD_ARG(broadcast_code, NULL, - "Send a space separated broadcast code of up to 16 bytes " + "Send a string-based broadcast code of up to 16 bytes " " ", cmd_bap_broadcast_assistant_broadcast_code, 3, 0), SHELL_CMD_ARG(rem_src, NULL, "Remove a source ",