Linux-Bluetooth Archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/1] Add command to create local endpoint in bluetoolct
@ 2024-02-29 16:21 Silviu Florian Barbulescu
  2024-02-29 16:21 ` [PATCH BlueZ 1/1] " Silviu Florian Barbulescu
  0 siblings, 1 reply; 3+ messages in thread
From: Silviu Florian Barbulescu @ 2024-02-29 16:21 UTC (permalink / raw
  To: linux-bluetooth
  Cc: mihai-octavian.urzica, silviu.barbulescu, vlad.pruteanu,
	andrei.istodorescu, luiz.dentz, iulia.tanasescu

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.config /org/bluez/hci0/pac_bcast0 /local/endpoint/ep0 48_4_1
endpoint.config /org/bluez/hci0/pac_bcast0 /local/endpoint/ep0 48_4_1

Silviu Florian Barbulescu (1):
  Add new command to create loal endpoint in bluetoolct

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


base-commit: 92f3ed1879042b43033241049b334404229df88d
-- 
2.39.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH BlueZ 1/1] Add command to create local endpoint in bluetoolct
  2024-02-29 16:21 [PATCH BlueZ 0/1] Add command to create local endpoint in bluetoolct Silviu Florian Barbulescu
@ 2024-02-29 16:21 ` Silviu Florian Barbulescu
  2024-02-29 17:31   ` bluez.test.bot
  0 siblings, 1 reply; 3+ messages in thread
From: Silviu Florian Barbulescu @ 2024-02-29 16:21 UTC (permalink / raw
  To: linux-bluetooth
  Cc: mihai-octavian.urzica, silviu.barbulescu, vlad.pruteanu,
	andrei.istodorescu, luiz.dentz, iulia.tanasescu

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.config /org/bluez/hci0/pac_bcast0 /local/endpoint/ep0 48_4_1
endpoint.config /org/bluez/hci0/pac_bcast0 /local/endpoint/ep0 48_4_1

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

diff --git a/client/player.c b/client/player.c
index a40bf66e3..e6041b4d0 100644
--- a/client/player.c
+++ b/client/player.c
@@ -3582,6 +3582,26 @@ static void cmd_register_endpoint(int argc, char *argv[])
 	}
 }
 
+static void cmd_new_local_endpoint(int argc, char *argv[])
+{
+	struct endpoint *ep;
+	char *endptr = NULL;
+
+	ep = g_new0(struct endpoint, 1);
+	ep->uuid = g_strdup(argv[1]);
+	ep->codec = strtol(argv[2], &endptr, 0);
+	ep->cid = 0x0000;
+	ep->vid = 0x0000;
+	ep->path = g_strdup_printf("%s/ep%u", BLUEZ_MEDIA_ENDPOINT_PATH,
+					g_list_length(local_endpoints));
+	local_endpoints = g_list_append(local_endpoints, ep);
+
+	ep->broadcast = true;
+	ep->auto_accept = true;
+	ep->preset = find_presets_name(ep->uuid, argv[2]);
+	bt_shell_printf("Endpoint %s registered\n", ep->path);
+}
+
 static void unregister_endpoint_setup(DBusMessageIter *iter, void *user_data)
 {
 	struct endpoint *ep = user_data;
@@ -4287,6 +4307,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 },
 	{} },
 };
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: Add command to create local endpoint in bluetoolct
  2024-02-29 16:21 ` [PATCH BlueZ 1/1] " Silviu Florian Barbulescu
@ 2024-02-29 17:31   ` bluez.test.bot
  0 siblings, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2024-02-29 17:31 UTC (permalink / raw
  To: linux-bluetooth, silviu.barbulescu

[-- Attachment #1: Type: text/plain, Size: 1906 bytes --]

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=831169

---Test result---

Test Summary:
CheckPatch                    FAIL      0.68 seconds
GitLint                       PASS      0.31 seconds
BuildEll                      PASS      23.97 seconds
BluezMake                     PASS      728.66 seconds
MakeCheck                     PASS      11.96 seconds
MakeDistcheck                 PASS      165.23 seconds
CheckValgrind                 PASS      228.23 seconds
CheckSmatch                   PASS      333.51 seconds
bluezmakeextell               PASS      110.62 seconds
IncrementalBuild              PASS      687.16 seconds
ScanBuild                     PASS      961.37 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,1/1] Add command to create local endpoint in bluetoolct
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#113: 
to configure the broadcast streams, but no local broadcast endpoint is defined

/github/workspace/src/src/13577335.patch total: 0 errors, 1 warnings, 36 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13577335.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.




---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-29 17:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-29 16:21 [PATCH BlueZ 0/1] Add command to create local endpoint in bluetoolct Silviu Florian Barbulescu
2024-02-29 16:21 ` [PATCH BlueZ 1/1] " Silviu Florian Barbulescu
2024-02-29 17:31   ` bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).