This adds sample bluetoothctl scripts for the Broadcast Assistant/Scan Delegator scenarios. A test setup can be created using these 2 scripts and the broadcast-source.bt script: The Broadcast Assistant connects to the Scan Delegator and sends information about a broadcast stream. --- client/scripts/broadcast-assistant.bt | 38 +++++++++++++++++++++++++++ client/scripts/scan-delegator.bt | 28 ++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 client/scripts/broadcast-assistant.bt create mode 100644 client/scripts/scan-delegator.bt diff --git a/client/scripts/broadcast-assistant.bt b/client/scripts/broadcast-assistant.bt new file mode 100644 index 000000000..15e9d0980 --- /dev/null +++ b/client/scripts/broadcast-assistant.bt @@ -0,0 +1,38 @@ +power on +# +# +# Start scanning to discover the Scan Delegator +# +scan on +# +# +# After the Scan Delegator device is created, stop scanning +# and connect to the address. +# +# scan off +# connect xx:xx:xx:xx:xx:xx +# +# +# After the connection has been established, restart scanning +# to detect Broadcast Sources. +# +# scan on +# +# +# As Broadcast Sources are scanned, MediaAssistant objects are +# created for all BISes that match the audio capabilities of the +# Scan Delegator. Select a stream to send to the Scan Delegator +# using the "push" command from the assistant submenu. When asked +# to enter stream metadata, the "auto" option will keep the LTV +# values advertised by the Broadcast Source. By entering new LTV +# values, the default metadata will be overwritten. +# +# assistant.push /org/bluez/hci0/src_yy_yy_yy_yy_yy_yy/dev_xx_xx_xx_xx_xx_xx/bis_n +# [Assistant] Enter Metadata (auto/value): a +# +# +# Wait for the MediaAssistant object to transition to "active" +# state, to validate that the Scan Delegator has successfully +# acquired the stream. +# +# [CHG] Assistant /org/bluez/hci0/src_yy_yy_yy_yy_yy_yy/dev_xx_xx_xx_xx_xx_xx/bis_n State: active \ No newline at end of file diff --git a/client/scripts/scan-delegator.bt b/client/scripts/scan-delegator.bt new file mode 100644 index 000000000..68c7fb498 --- /dev/null +++ b/client/scripts/scan-delegator.bt @@ -0,0 +1,28 @@ +power on +# +# +# Register Broadcast Sink endpoint +# +endpoint.register 00001851-0000-1000-8000-00805f9b34fb 0x06 +y +a +3 +4 +# +# Start advertising and wait for a Broadcast Assistant +# to connect. +# +advertise on +# +# +# After the connection has been established, transports will +# be created for streams added by the Bradcast Assistant that +# match the audio capabilities chosen at endpoint register. +# Acquire the desired transport to start receiving audio. +# +# transport.acquire /org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx/bis_n/fd_m +# +# +# Check that the transport has transitioned to "active" state +# +# [CHG] Transport /org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx/bis_n/fd_m State: active \ No newline at end of file -- 2.43.0