@@ -485,3 +485,64 @@ Distributing the broadcast code
485
485
Broadcast reception start completed
486
486
uart:~$ cap_commander distribute_broadcast_code 0 "BroadcastCode"
487
487
Distribute broadcast code completed
488
+
489
+ CAP Handover
490
+ ************
491
+
492
+ The handover procedures allow the user to switch between unicast and broadcast streams. Since
493
+ broadcast streams are always unidirectional, the procedures will only work for streams with audio
494
+ direction from the Initiator to the Acceptor (sink streams).
495
+
496
+ Using the CAP Hanover procedures
497
+ ================================
498
+
499
+ When the Bluetooth stack has been initialized (:code: `bt init `),
500
+ ,one or more remote CAP acceptor devices have been connected,
501
+ and audio streams have been set up,
502
+ the handover procedures can be used to switch between unicast and broadcast.
503
+ Before any of the handover procedures can be used,
504
+ the :code: `bap discover `, :code: `cap_initiator discover `
505
+ and :code: `bap_broadcast_assistant discover ` commands must have been issued and completed.
506
+
507
+ .. code-block :: console
508
+
509
+ cap_handover --help
510
+ cap_handover - Bluetooth CAP handover shell commands
511
+ Subcommands:
512
+ unicast_to_broadcast : Handover current unicast group to broadcast (unicast
513
+ group will be deleted)
514
+ broadcast_to_unicast : Handover current broadcast source to unicast
515
+ (broadcast source will be deleted)
516
+
517
+
518
+
519
+ Handover unicast to broadcast
520
+ -----------------------------
521
+
522
+ This command hands over one or more unicast streams from unicast to broadcast.
523
+
524
+ .. code-block :: console
525
+
526
+ uart:~$ bt init
527
+ uart:~$ bap init
528
+ uart:~$ bt connect <addr>
529
+
530
+ # Discover necessary services
531
+ uart:~$ bap discover
532
+ uart:~$ cap_initiator discover
533
+ uart:~$ bap_broadcast_assistant discover
534
+
535
+ # Setup unicast audio e.g. using the ac_1
536
+ uart:~$ cap_initiator ac_1
537
+
538
+ # Create a non-connectable and non-scannable extended advertising set for broadcast
539
+ uart:~$ bt adv-create nconn-nscan ext-adv
540
+ uart:~$ bt per-adv-param
541
+
542
+ # Perform the handover and update the advertising data to contain the broadcast ID
543
+ uart:~$ cap_handover unicast_to_broadcast
544
+ uart:~$ bt adv-data dev-name discov
545
+ uart:~$ bt per-adv-data
546
+
547
+ # Enable periodic advertising (extended advertising is enabled as part of handover)
548
+ uart:~$ bt per-adv on
0 commit comments