public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v2] tools/obexctl: Add support to connect using PSM port
@ 2024-10-14 17:10 Frédéric Danis
  2024-10-14 18:38 ` [BlueZ,v2] " bluez.test.bot
  2024-10-18 14:10 ` [PATCH BlueZ v2] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Frédéric Danis @ 2024-10-14 17:10 UTC (permalink / raw)
  To: linux-bluetooth

Since commit 5d7d3ac25bd5 ("obexd: Add PSM support to session create")
obexd supports to connect the session using a L2CAP PSM.
---
 tools/obexctl.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/tools/obexctl.c b/tools/obexctl.c
index 56a76915c..c3db11b67 100644
--- a/tools/obexctl.c
+++ b/tools/obexctl.c
@@ -114,7 +114,7 @@ static void connect_reply(DBusMessage *message, void *user_data)
 struct connect_args {
 	char *dev;
 	char *target;
-	uint8_t channel;
+	uint16_t channel;
 };
 
 static void connect_args_free(void *data)
@@ -144,9 +144,14 @@ static void connect_setup(DBusMessageIter *iter, void *user_data)
 		g_dbus_dict_append_entry(&dict, "Target",
 					DBUS_TYPE_STRING, &args->target);
 
-	if (args->channel)
-		g_dbus_dict_append_entry(&dict, "Channel",
+	if (args->channel) {
+		if (args->channel > 31)
+			g_dbus_dict_append_entry(&dict, "PSM",
+					DBUS_TYPE_UINT16, &args->channel);
+		else
+			g_dbus_dict_append_entry(&dict, "Channel",
 					DBUS_TYPE_BYTE, &args->channel);
+	}
 
 	dbus_message_iter_close_container(iter, &dict);
 }
@@ -169,8 +174,8 @@ static void cmd_connect(int argc, char *argv[])
 		char *endptr = NULL;
 
 		channel = strtol(argv[3], &endptr, 0);
-		if (!endptr || *endptr != '\0' || channel > UINT8_MAX) {
-			bt_shell_printf("Invalid channel\n");
+		if (!endptr || *endptr != '\0' || channel > UINT16_MAX) {
+			bt_shell_printf("Invalid channel or PSM\n");
 			return bt_shell_noninteractive_quit(EXIT_FAILURE);
 		}
 	}
@@ -1846,7 +1851,7 @@ static void cmd_mkdir(int argc, char *argv[])
 static const struct bt_shell_menu main_menu = {
 	.name = "main",
 	.entries = {
-	{ "connect",      "<dev> [uuid] [channel]", cmd_connect,
+	{ "connect",      "<dev> [uuid] [channel|PSM]", cmd_connect,
 						"Connect session" },
 	{ "disconnect",   "[session]", cmd_disconnect, "Disconnect session",
 						session_generator },
-- 
2.34.1


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

* RE: [BlueZ,v2] tools/obexctl: Add support to connect using PSM port
  2024-10-14 17:10 [PATCH BlueZ v2] tools/obexctl: Add support to connect using PSM port Frédéric Danis
@ 2024-10-14 18:38 ` bluez.test.bot
  2024-10-18 14:10 ` [PATCH BlueZ v2] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2024-10-14 18:38 UTC (permalink / raw)
  To: linux-bluetooth, frederic.danis

[-- Attachment #1: Type: text/plain, Size: 1886 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=899000

---Test result---

Test Summary:
CheckPatch                    FAIL      0.57 seconds
GitLint                       PASS      0.18 seconds
BuildEll                      PASS      24.55 seconds
BluezMake                     PASS      1596.25 seconds
MakeCheck                     PASS      13.23 seconds
MakeDistcheck                 PASS      178.98 seconds
CheckValgrind                 PASS      254.85 seconds
CheckSmatch                   PASS      357.12 seconds
bluezmakeextell               PASS      120.50 seconds
IncrementalBuild              PASS      1418.40 seconds
ScanBuild                     PASS      1019.71 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,v2] tools/obexctl: Add support to connect using PSM port
WARNING:UNKNOWN_COMMIT_ID: Unknown commit id '5d7d3ac25bd5', maybe rebased or not pulled?
#68: 
Since commit 5d7d3ac25bd5 ("obexd: Add PSM support to session create")

/github/workspace/src/src/13835327.patch total: 0 errors, 1 warnings, 42 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/13835327.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

* Re: [PATCH BlueZ v2] tools/obexctl: Add support to connect using PSM port
  2024-10-14 17:10 [PATCH BlueZ v2] tools/obexctl: Add support to connect using PSM port Frédéric Danis
  2024-10-14 18:38 ` [BlueZ,v2] " bluez.test.bot
@ 2024-10-18 14:10 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2024-10-18 14:10 UTC (permalink / raw)
  To: =?utf-8?b?RnLDqWTDqXJpYyBEYW5pcyA8ZnJlZGVyaWMuZGFuaXNAY29sbGFib3JhLmNvbT4=?=
  Cc: linux-bluetooth

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Mon, 14 Oct 2024 19:10:58 +0200 you wrote:
> Since commit 5d7d3ac25bd5 ("obexd: Add PSM support to session create")
> obexd supports to connect the session using a L2CAP PSM.
> ---
>  tools/obexctl.c | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)

Here is the summary with links:
  - [BlueZ,v2] tools/obexctl: Add support to connect using PSM port
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=b30b1eddb4b3

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2024-10-18 14:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-14 17:10 [PATCH BlueZ v2] tools/obexctl: Add support to connect using PSM port Frédéric Danis
2024-10-14 18:38 ` [BlueZ,v2] " bluez.test.bot
2024-10-18 14:10 ` [PATCH BlueZ v2] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox