Subject: [PATCH BlueZ v2 0/1] Add command to create local endpoint in bluetoothctl

In the case of using BlueZ with Pipewire to start a BAP broadcast
source, Pipewire will do the register endpoint but bluetoothctl is
still required to configure the broadcast streams, but no local
broadcast endpoint is defined in bluetoothctl.
To resolve this problem I added the new_local_ep that will create
a local endpoint that can be used to configure the Bap broadcast
source\sink.
Example how to configure a BAP broadcast source:

endpoint.new_local_ep 00001852-0000-1000-8000-00805f9b34fb 0x06
Endpoint /local/endpoint/bcaa/lc3 registered
endpoint.config /org/bluez/hci0/pac_bcast0 /local/endpoint/bcaa/lc3 48_4_1

Silviu Florian Barbulescu (1):
Add command to create local endpoint in bluetoothctl

client/player.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)


base-commit: 44d3f67277f83983e1e9697eda7b9aeb40ca231d
--
2.39.2



Subject: [PATCH BlueZ v2 1/1] Add command to create local endpoint in bluetoothctl

Example:
endpoint.new_local_ep 00001852-0000-1000-8000-00805f9b34fb 0x06
Endpoint /local/endpoint/bcaa/lc3 registered

---
client/player.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

diff --git a/client/player.c b/client/player.c
index a40bf66e3..e297bb615 100644
--- a/client/player.c
+++ b/client/player.c
@@ -4263,6 +4263,8 @@ done:
return bt_shell_noninteractive_quit(EXIT_SUCCESS);
}

+static void cmd_new_local_endpoint(int argc, char *argv[]);
+
static const struct bt_shell_menu endpoint_menu = {
.name = "endpoint",
.desc = "Media Endpoint Submenu",
@@ -4287,6 +4289,10 @@ static const struct bt_shell_menu endpoint_menu = {
cmd_presets_endpoint,
"List available presets",
uuid_generator },
+ { "new_local_ep", "<UUID> <codec[:company]>",
+ cmd_new_local_endpoint,
+ "Create local endpoint",
+ uuid_generator },
{} },
};

@@ -4372,6 +4378,27 @@ static void register_endpoints(GDBusProxy *proxy)
}
}

+static void cmd_new_local_endpoint(int argc, char *argv[])
+{
+ struct endpoint *ep = NULL;
+ size_t i;
+ char *uuid = g_strdup(argv[1]);
+
+ for (i = 0; i < ARRAY_SIZE(caps); i++) {
+ const struct capabilities *cap = &caps[i];
+
+ if (strcasecmp(cap->uuid, uuid))
+ continue;
+
+ ep = endpoint_new(cap);
+ endpoint_init_defaults(ep);
+ break;
+ }
+
+ if (ep)
+ bt_shell_printf("Endpoint %s registered\n", ep->path);
+}
+
static void media_added(GDBusProxy *proxy)
{
medias = g_list_append(medias, proxy);
--
2.39.2


2024-03-01 18:13:30

by bluez.test.bot

[permalink] [raw]
Subject: RE: Add command to create local endpoint in bluetoothctl

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=831596

---Test result---

Test Summary:
CheckPatch PASS 0.49 seconds
GitLint PASS 0.32 seconds
BuildEll PASS 25.16 seconds
BluezMake PASS 756.43 seconds
MakeCheck PASS 11.47 seconds
MakeDistcheck PASS 164.18 seconds
CheckValgrind PASS 231.40 seconds
CheckSmatch PASS 341.44 seconds
bluezmakeextell PASS 107.68 seconds
IncrementalBuild PASS 692.60 seconds
ScanBuild PASS 1002.86 seconds



---
Regards,
Linux Bluetooth