All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stotland, Inga" <inga.stotland@intel.com>
To: "sbrown@cortland.com" <sbrown@cortland.com>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>
Cc: "johan.hedberg@gmail.com" <johan.hedberg@gmail.com>
Subject: Re: [PATCH BlueZ]mesh: meshctl add Node Identity option to connect command
Date: Mon, 4 Dec 2017 19:20:21 +0000	[thread overview]
Message-ID: <1512415219.8154.5.camel@intel.com> (raw)
In-Reply-To: <1512404933.29399.10.camel@ewol.com>

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

Hi Steve,

On Mon, 2017-12-04 at 09:28 -0700, Steve Brown wrote:
> This adds the option to connect via either Node Identity or Network
> ID
> advertisements. Adding the node unicast address selects Node
> Identity.
> 
> See Mesh Profile Specification 7.2.2.2 for further details.
> 
> ---
> 
> diff --git a/mesh/main.c b/mesh/main.c
> index d7e45e56b..e19b7f413 100644
> --- a/mesh/main.c
> +++ b/mesh/main.c
> @@ -1773,6 +1774,8 @@ static void cmd_connect(const char *arg)
>  			rl_printf("Invalid network index %s\n",
> arg);
>  			return;
>  		}
> +
> +		connection.unicast = strtol(end, NULL, 16);
>  	}
>  
>  	if (discovering)
> @@ -1782,11 +1785,17 @@ static void cmd_connect(const char *arg)
>  	set_scan_filter_uuids(MESH_PROXY_SVC_UUID);
>  	discover_mesh = true;
>  
> -	connection.type = CONN_TYPE_NETWORK;
> -
> +	if (connection.unicast == UNASSIGNED_ADDRESS) {
> +		connection.type = CONN_TYPE_NETWORK;
> +		rl_printf("Looking for mesh network with net index
> %4.4x\n",
> +				connection.net_idx);
> +	} else {
> +		connection.type = CONN_TYPE_IDENTITY;
> +		rl_printf("Looking for node id %4.4x"
> +				" on network with net index
> %4.4x\n",
> +				connection.unicast,
> connection.net_idx);
> +	}
>  
> -	rl_printf("Looking for mesh network with net index %4.4x\n",
> -							connection.n
> et_idx);
>  
>  	if (g_dbus_proxy_method_call(default_ctrl->proxy,
>  			"StartDiscovery", NULL,
> start_discovery_reply,
> @@ -2005,7 +2014,8 @@ static const struct menu_entry
> meshctl_cmd_table[] = {
>  	{ "security",     "[0(low)/1(medium)/2(high)]",
> cmd_security,
>  				"Display or change provision
> security level"},
>  	{ "info",         "[dev]",    cmd_info, "Device
> information"},
> -	{ "connect",      "[net_idx]",cmd_connect, "Connect to mesh
> network"},
> +	{ "connect",      "[net_idx] [dst]",cmd_connect,
> +				"Connect to mesh network or node on
> network"},
>  	{ "discover-unprovisioned", "<on/off>",
> cmd_scan_unprovisioned_devices,
>  					"Look for devices to
> provision" },
>  	{ "provision",    "<uuid>",   cmd_start_prov, "Initiate
> provisioning"},
> --
> To unsubscribe from this list: send the line "unsubscribe linux-
> bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

This is a valid extension. The patch looks good.

Thanks,

Inga

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3266 bytes --]

  reply	other threads:[~2017-12-04 19:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04 16:28 [PATCH BlueZ]mesh: meshctl add Node Identity option to connect command Steve Brown
2017-12-04 19:20 ` Stotland, Inga [this message]
2017-12-04 19:47 ` Johan Hedberg

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=1512415219.8154.5.camel@intel.com \
    --to=inga.stotland@intel.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=sbrown@cortland.com \
    /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.