Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1898415pxa; Sun, 23 Aug 2020 21:47:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBg26cCUWCWrrKrsIhsY738XfZ+3z8E6zIEV3SfmGC/GjxZ4vrnmLVFZpMX7ORHCT/QE9V X-Received: by 2002:a05:6402:b26:: with SMTP id bo6mr3811593edb.104.1598244437302; Sun, 23 Aug 2020 21:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598244437; cv=none; d=google.com; s=arc-20160816; b=DNoYyZ2Xm3uAOjXrgiMI1Nnx6GsCsq8/7dWhUe3yM6TytCLFUH8f9mjRajRi+iuETb p9L1qnbQVCWqGU9fnbISl/OdkT1Q/wTq4yIUWqL6Thyr0AsmpLIT9iIvvgXl6KNYLfhr VlEA4GBSc6u4zqU9SqFBck+tVWBpmJQEwX+HHdjbkkoB6JgtiOVd+U2gGgYxFVqzrTb8 fXiL1tYK7PzqyBhhggEOP8jG3cWH6ekrjLk+K1sERmIQilRcYP4FSAidj6UU2PKjl8wz 8GbEUXFhcE3igmc7bPwwm4xBueZqE1ULd/iD9ZP7DpRu9UULEhcNh1d0lc/BRUDzGcaG TrWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=LYd47gOpYQWOi7Pj7RfDwYxxmDxgTtnG0NsGQIUuQIg=; b=cky4w3K2w+WAg6MQaUIdI1S08iHuDXGbHOsRePI6DAO7qD04UmafrkFLQLutSf/pBS zuUKgKiZS++iud2Abb6qBHLYaCNmH4jOh1L6XTnSRM2/QR/YSX0Fz8sYUVA9aYCMa1Br v17gCGfjGO+wAjgFYD3AoBR/GX1dkNjQMW57PKVLgNw/PxQ88J0nWqdbkQ6TDUV6lsKR /zi33Nhncc9DgHzmLtJtgHRhAJP9jCF9hF4qRA4QoetSrrAYYppXt3XJVghUe1/dYNQh uZqFLZacTFdho0+Az3MaUA62yxY0sseuJJkDHFH8wm5XGWSVU8R5Eyk8NbJonx0WaP9R QFJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y5si5992829ejm.213.2020.08.23.21.46.27; Sun, 23 Aug 2020 21:47:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728018AbgHXDyS (ORCPT + 99 others); Sun, 23 Aug 2020 23:54:18 -0400 Received: from mga07.intel.com ([134.134.136.100]:64620 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727912AbgHXDyS (ORCPT ); Sun, 23 Aug 2020 23:54:18 -0400 IronPort-SDR: /7pBq2we/vMlkaBRYaw1KfRkYQeC7OHLUX/QgcgJ1j0U7wdbllPG7F7nZZ3plZ1hEVhN9dyI4c cVzpCPl1mAtA== X-IronPort-AV: E=McAfee;i="6000,8403,9722"; a="220106399" X-IronPort-AV: E=Sophos;i="5.76,347,1592895600"; d="scan'208";a="220106399" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Aug 2020 20:54:17 -0700 IronPort-SDR: MDvRtTIEoZHxEv7KLDj4NPwV1ZZCvbhnjmgapV58RKb4wKfvDmnxK5nsVrH/dH0HiuJt9HlArb qN3nv/+Q4WbA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,347,1592895600"; d="scan'208";a="322017090" Received: from jlpajela-mobl.amr.corp.intel.com (HELO ingas-nuc1.intel.com) ([10.252.134.16]) by fmsmga004.fm.intel.com with ESMTP; 23 Aug 2020 20:54:17 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ 1/4] doc/mesh-api: Add "options" dictionary to Send/Publish Date: Sun, 23 Aug 2020 20:54:12 -0700 Message-Id: <20200824035415.13420-2-inga.stotland@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200824035415.13420-1-inga.stotland@intel.com> References: <20200824035415.13420-1-inga.stotland@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This modifies Send, DevKeySend, Publish & VendorPublish methods on mesh.Node interface to include additional argument "options". This new argument is a dictionary that currently has only one new key word defined: "ForceSegmented" - to force small payloads to be sent as one-segment messages Other key words may be defined in future to accommodate evolving requirements of Mesh Profile specification. --- doc/mesh-api.txt | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/doc/mesh-api.txt b/doc/mesh-api.txt index 495f95b0b..f836142a7 100644 --- a/doc/mesh-api.txt +++ b/doc/mesh-api.txt @@ -229,7 +229,7 @@ Object path /org/bluez/mesh/node Methods: void Send(object element_path, uint16 destination, uint16 key_index, - array{byte} data) + dict options, array{byte} data) This method is used to send a message originated by a local model. @@ -248,6 +248,14 @@ Methods: this element. Otherwise, org.bluez.mesh.Error.NotAuthorized will be returned. + The options parameter is a dictionary with the following keys + defined: + + bool ForceSegmented + Specifies whether to force sending of a short + message as one-segment payload. If not present, + the default setting is "false". + The data parameter is an outgoing message to be encypted by the bluetooth-meshd daemon and sent on. @@ -257,7 +265,7 @@ Methods: org.bluez.mesh.Error.NotFound void DevKeySend(object element_path, uint16 destination, boolean remote, - uint16 net_index, array{byte} data) + uint16 net_index, dict options, array{byte} data) This method is used to send a message originated by a local model encoded with the device key of the remote node. @@ -279,6 +287,14 @@ Methods: The net_index parameter is the subnet index of the network on which the message is to be sent. + The options parameter is a dictionary with the following keys + defined: + + bool ForceSegmented + Specifies whether to force sending of a short + message as one-segment payload. If not present, + the default setting is "false". + The data parameter is an outgoing message to be encypted by the meshd daemon and sent on. @@ -344,7 +360,8 @@ Methods: org.bluez.mesh.Error.InvalidArguments org.bluez.mesh.Error.NotFound - void Publish(object element_path, uint16 model, array{byte} data) + void Publish(object element_path, uint16 model, dict options, + array{byte} data) This method is used to send a publication originated by a local model. If the model does not exist, or it has no publication @@ -358,6 +375,17 @@ Methods: The model parameter contains a model ID, as defined by the Bluetooth SIG. + The options parameter is a dictionary with the following keys + defined: + + bool ForceSegmented + Specifies whether to force sending of a short + message as one-segment payload. If not present, + the default setting is "false". + + The data parameter is an outgoing message to be encypted by the + meshd daemon and sent on. + Since only one Publish record may exist per element-model, the destination and key_index are obtained from the Publication record cached by the daemon. @@ -367,7 +395,7 @@ Methods: org.bluez.mesh.Error.InvalidArguments void VendorPublish(object element_path, uint16 vendor, uint16 model_id, - array{byte} data) + dict options, array{byte} data) This method is used to send a publication originated by a local vendor model. If the model does not exist, or it has no @@ -383,6 +411,17 @@ Methods: The model_id parameter is a 16-bit vendor-assigned Model Identifier. + The options parameter is a dictionary with the following keys + defined: + + bool ForceSegmented + Specifies whether to force sending of a short + message as one-segment payload. If not present, + the default setting is "false". + + The data parameter is an outgoing message to be encypted by the + meshd daemon and sent on. + Since only one Publish record may exist per element-model, the destination and key_index are obtained from the Publication record cached by the daemon. -- 2.26.2