Skip to content

Commit 5391279

Browse files
Thalleycarlescufi
authored andcommitted
Bluetooth: Audio: Shell: Update BAP shell documentation
Update the BAP shell documentation to be more up to date. There are still several BAP commands that do not have examples of further documentation, but that is still a TODO. Signed-off-by: Emil Gydesen <[email protected]>
1 parent a02a1c1 commit 5391279

File tree

1 file changed

+56
-70
lines changed
  • doc/connectivity/bluetooth/api/shell

1 file changed

+56
-70
lines changed

doc/connectivity/bluetooth/api/shell/bap.rst

Lines changed: 56 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,36 @@ Commands
1818
Subcommands:
1919
init
2020
select_broadcast :<stream>
21-
create_broadcast :[codec] [preset]
21+
create_broadcast :[preset <preset_name>] [enc <broadcast_code>]
2222
start_broadcast :
2323
stop_broadcast :
2424
delete_broadcast :
2525
broadcast_scan :<on, off>
2626
accept_broadcast :0x<broadcast_id>
27-
sync_broadcast :0x<bis_bitfield>
27+
sync_broadcast :0x<bis_index> [[[0x<bis_index>] 0x<bis_index>] ...]
2828
stop_broadcast_sink :Stops broadcast sink
2929
term_broadcast_sink :
30-
discover :[type: sink, source]
31-
preset :[preset]
32-
config :<direction: sink, source> <index> [codec] [preset]
33-
qos :[preset] [interval] [framing] [latency] [pd] [sdu] [phy]
34-
[rtn]
35-
enable
30+
discover :[dir: sink, source]
31+
config :<direction: sink, source> <index> [preset]
32+
stream_qos :interval [framing] [latency] [pd] [sdu] [phy] [rtn]
33+
qos :Send QoS configure for Unicast Group
34+
enable :[context]
35+
stop
36+
print_ase_info :Print ASE info for default connection
3637
metadata :[context]
3738
start
3839
disable
39-
stop
4040
release
4141
list
42-
connect :<direction: sink, source> <index> [codec] [preset]
4342
select_unicast :<stream>
43+
preset :<sink, source, broadcast> [preset]
4444
send :Send to Audio Stream [data]
45+
start_sine :Start sending a LC3 encoded sine wave
46+
stop_sine :Stop sending a LC3 encoded sine wave
47+
set_location :<direction: sink, source> <location bitmask>
48+
set_context :<direction: sink, source><context bitmask> <type:
49+
supported, available>
50+
4551
4652
.. csv-table:: State Machine Transitions
4753
:header: "Command", "Depends", "Allowed States", "Next States"
@@ -237,19 +243,33 @@ any stream previously configured.
237243

238244
.. code-block:: console
239245
240-
uart:~$ bap preset [preset]
241-
uart:~$ bap preset
246+
uart:~$ bap preset <sink, source, broadcast> [preset]
247+
uart:~$ bap preset sink
242248
16_2_1
243-
codec 0x06 cid 0x0000 vid 0x0000 count 3
249+
codec 0x06 cid 0x0000 vid 0x0000 count 4
244250
data #0: type 0x01 len 1
245-
00000000: 02 |. |
246251
data #1: type 0x02 len 1
247-
00000000: 01 |. |
248-
data #2: type 0x04 len 2
249-
00000000: 28 00 |(. |
252+
data #2: type 0x03 len 4
253+
00000000: 01 00 00 |... |
254+
data #3: type 0x04 len 2
255+
00000000: 28 |( |
250256
meta #0: type 0x02 len 2
251-
00000000: 02 00 |.. |
252-
QoS: dir 0x02 interval 10000 framing 0x00 phy 0x02 sdu 40 rtn 2 latency 10 pd 40000
257+
00000000: 06 |. |
258+
QoS: interval 10000 framing 0x00 phy 0x02 sdu 40 rtn 2 latency 10 pd 40000
259+
260+
uart:~$ bap preset sink 32_2_1
261+
32_2_1
262+
codec 0x06 cid 0x0000 vid 0x0000 count 4
263+
data #0: type 0x01 len 1
264+
data #1: type 0x02 len 1
265+
data #2: type 0x03 len 4
266+
00000000: 01 00 00 |... |
267+
data #3: type 0x04 len 2
268+
00000000: 50 |P |
269+
meta #0: type 0x02 len 2
270+
00000000: 06 |. |
271+
QoS: interval 10000 framing 0x00 phy 0x02 sdu 80 rtn 2 latency 10 pd 40000
272+
253273
254274
Configure Codec
255275
***************
@@ -266,7 +286,7 @@ or in case it is omitted the default preset is used.
266286

267287
.. code-block:: console
268288
269-
uart:~$ bap config <direction: sink, source> <index> [codec] [preset]
289+
uart:~$ bap config <direction: sink, source> <index> [preset]
270290
uart:~$ bap config sink 0
271291
ASE Codec Config: conn 0x8173800 ep 0x81754e0 cap 0x816a360
272292
codec 0x06 cid 0x0000 vid 0x0000 count 3
@@ -282,6 +302,16 @@ or in case it is omitted the default preset is used.
282302
Default ase: 1
283303
ASE config: preset 16_2_1
284304
305+
Configure Stream QoS
306+
********************
307+
308+
The :code:`stream_qos` Sets a new stream QoS.
309+
310+
.. code-block:: console
311+
312+
uart:~$ bap stream_qos <interval> [framing] [latency] [pd] [sdu] [phy] [rtn]
313+
uart:~$ bap stream_qos 10
314+
285315
Configure QoS
286316
*************
287317

@@ -297,9 +327,7 @@ parameters.
297327

298328
.. code-block:: console
299329
300-
uart:~$ bap qos [preset] [interval] [framing] [latency] [pd] [sdu] [phy] [rtn]
301330
uart:~$ bap qos
302-
ASE config: preset 16_2_1
303331
304332
Enable
305333
******
@@ -315,10 +343,11 @@ if the remote peer accepts then the ISO connection procedure is also initiated.
315343

316344
.. code-block:: console
317345
318-
uart:~$ bap enable
346+
uart:~$ bap enable [context]
347+
uart:~$ bap enable Media
319348
320-
Start [sink only]
321-
*****************
349+
Start
350+
*****
322351

323352
The :code:`start` command is only necessary when acting as a sink as it
324353
indicates to the source the stack is ready to start receiving data.
@@ -350,8 +379,8 @@ initiated.
350379
351380
uart:~$ bap disable
352381
353-
Stop [sink only]
354-
****************
382+
Stop
383+
****
355384

356385
The :code:`stop` command is only necessary when acting as a sink as it indicates
357386
to the source the stack is ready to stop receiving data.
@@ -421,49 +450,6 @@ To select a broadcast stream:
421450
uart:~$ bap select 0x01 broadcast
422451
Default stream: 1 (broadcast)
423452
424-
Connect
425-
*******
426-
427-
The :code:`connect` command combines config, qos and enable commands in one so
428-
it can be used to quickly configure and enable a stream.
429-
430-
.. csv-table:: State Machine Transitions
431-
:header: "Depends", "Allowed States", "Next States"
432-
:widths: auto
433-
434-
"discover","idle/codec-configured/qos-configured","streaming"
435-
436-
.. code-block:: console
437-
438-
uart:~$ bap connect <direction: sink, source> <index> [codec] [preset]
439-
uart:~$ bap connect sink 0
440-
ASE Codec Config: conn 0x17ca40 ep 0x17f860 cap 0x19f6a0
441-
codec 0x06 cid 0x0000 vid 0x0000 count 3
442-
data #0: type 0x01 len 1
443-
00000000: 02 |. |
444-
data #1: type 0x02 len 1
445-
00000000: 01 |. |
446-
data #2: type 0x04 len 2
447-
00000000: 28 00 |(. |
448-
meta #0: type 0x02 len 2
449-
00000000: 02 00 |.. |
450-
ASE Codec Config stream 0x1851c0
451-
Default ase: 1
452-
ASE config: preset 16_2_1
453-
ASE Codec Reconfig: stream 0x1851c0 cap 0x19f6a0
454-
codec 0x06 cid 0x0000 vid 0x0000 count 3
455-
data #0: type 0x01 len 1
456-
00000000: 02 |. |
457-
data #1: type 0x02 len 1
458-
00000000: 01 |. |
459-
data #2: type 0x04 len 2
460-
00000000: 28 00 |(. |
461-
meta #0: type 0x02 len 2
462-
00000000: 02 00 |.. |
463-
QoS: stream 0x1851c0
464-
QoS: dir 0x02 interval 10000 framing 0x00 phy 0x02 sdu 40 rtn 2 latency 10 pd 40000
465-
Start: stream 0x1851c0
466-
467453
Send
468454
****
469455

0 commit comments

Comments
 (0)