All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v1 07/12] client: add BAP endpoint registration scripts
Date: Wed,  9 Sep 2026 15:23:03 -0400	[thread overview]
Message-ID: <20260909192308.1306567-8-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20260909192308.1306567-1-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Add scripts registering a local PAC Source and a local PAC Sink
endpoint with LC3, to set up the two sides of a BAP unicast stream:

  bluetoothctl --init-script client/scripts/bap-source-lc3.bt

The locations and contexts match the ones bluetoothctl uses when
registering the endpoints itself, so that the metadata of a stream is
not rejected.

Assisted-by: opencode:claude-opus-5
---
 client/scripts/bap-sink-lc3.bt   | 32 ++++++++++++++++++++++++++++++
 client/scripts/bap-source-lc3.bt | 34 ++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+)
 create mode 100644 client/scripts/bap-sink-lc3.bt
 create mode 100644 client/scripts/bap-source-lc3.bt

diff --git a/client/scripts/bap-sink-lc3.bt b/client/scripts/bap-sink-lc3.bt
new file mode 100644
index 000000000000..4c3cdc51e785
--- /dev/null
+++ b/client/scripts/bap-sink-lc3.bt
@@ -0,0 +1,32 @@
+power on
+#
+#
+# Register a PAC Sink endpoint with LC3, to act as the acceptor
+# receiving audio, e.g. a headset.
+#
+endpoint.register 00002bc9-0000-1000-8000-00805f9b34fb 0x06
+# Auto Accept: accept the configuration chosen by the peer
+y
+# Max Transports: no limit
+a
+# Locations: Front Left and Front Right
+3
+# Supported Context: same as the contexts bluetoothctl registers with
+0x0fff
+# Context
+0x0fff
+# CIG: assigned automatically
+a
+# CIS: assigned automatically
+a
+#
+#
+# With narrower Supported Contexts the Enable is rejected with Invalid
+# Metadata, as the metadata of a stream carries the Unspecified
+# context.
+#
+# Advertise and wait for the initiator to connect and configure the
+# streams. The transports do not have to be acquired for the CIS to be
+# established, as bluetoothd sets up the ISO listener on its own:
+#
+# advertise on
diff --git a/client/scripts/bap-source-lc3.bt b/client/scripts/bap-source-lc3.bt
new file mode 100644
index 000000000000..8bd03044af6c
--- /dev/null
+++ b/client/scripts/bap-source-lc3.bt
@@ -0,0 +1,34 @@
+power on
+#
+#
+# Register a PAC Source endpoint with LC3, to act as the initiator
+# sending audio, e.g. a phone.
+#
+endpoint.register 00002bcb-0000-1000-8000-00805f9b34fb 0x06
+# Auto Accept: accept the configuration chosen by the peer
+y
+# Max Transports: no limit
+a
+# Locations: Front Left and Front Right
+3
+# Supported Context: same as the contexts bluetoothctl registers with
+0x000f
+# Context
+0x000f
+# CIG: assigned automatically
+a
+# CIS: assigned automatically
+a
+#
+#
+# After pairing, configure a remote PAC Sink endpoint with a preset:
+#
+# endpoint.config /org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx/pac_sink0 \
+#	/local/endpoint/ep0 16_2_1
+#
+# A stream is created per audio location, each with its own CIS in the
+# same CIG, and all of the transports have to be acquired, as the CIS
+# are only created once every CIS of the CIG is ready:
+#
+# transport.acquire /org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx/pac_sink0/fd0 \
+#	/org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx/pac_sink0/fd1
-- 
2.55.0


  parent reply	other threads:[~2026-09-09 19:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09 19:22 [PATCH BlueZ v1 00/12] Add functional tests for A2DP and BAP Luiz Augusto von Dentz
2026-09-09 19:22 ` [PATCH BlueZ v1 01/12] build: add doc/test-functional.rst to EXTRA_DIST Luiz Augusto von Dentz
2026-09-10 18:28   ` Add functional tests for A2DP and BAP bluez.test.bot
2026-09-09 19:22 ` [PATCH BlueZ v1 02/12] doc: describe the functional test cases Luiz Augusto von Dentz
2026-09-09 19:22 ` [PATCH BlueZ v1 03/12] client: do not prompt for LE Audio settings on A2DP endpoints Luiz Augusto von Dentz
2026-09-09 19:23 ` [PATCH BlueZ v1 04/12] client: add A2DP endpoint registration scripts Luiz Augusto von Dentz
2026-09-09 19:23 ` [PATCH BlueZ v1 05/12] test: functional: add A2DP tests Luiz Augusto von Dentz
2026-09-09 19:23 ` [PATCH BlueZ v1 06/12] client: rename media endpoint scripts to include the codec Luiz Augusto von Dentz
2026-09-09 19:23 ` Luiz Augusto von Dentz [this message]
2026-09-09 19:23 ` [PATCH BlueZ v1 08/12] doc: bluetoothctl: document init script option and scripts Luiz Augusto von Dentz
2026-09-09 19:23 ` [PATCH BlueZ v1 09/12] test: functional: add BAP unicast tests Luiz Augusto von Dentz
2026-09-09 19:23 ` [PATCH BlueZ v1 10/12] test: functional: add BAP broadcast tests Luiz Augusto von Dentz
2026-09-09 19:23 ` [PATCH BlueZ v1 11/12] test: functional: add BAP broadcast assistant test Luiz Augusto von Dentz
2026-09-09 19:23 ` [PATCH BlueZ v1 12/12] bap: reuse the PA sync established to discover a Broadcast Source Luiz Augusto von Dentz
2026-09-10 20:50 ` [PATCH BlueZ v1 00/12] Add functional tests for A2DP and BAP patchwork-bot+bluetooth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260909192308.1306567-8-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.