Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2541734pxa; Mon, 24 Aug 2020 17:56:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuduqGD3+fuKwS8uG1rbE6WP15EcqZzfkfyVV6AEPGX2mF5WMFM7UAqZXfB4qv0zYg2cUj X-Received: by 2002:a17:906:e2d5:: with SMTP id gr21mr5385491ejb.438.1598316968789; Mon, 24 Aug 2020 17:56:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598316968; cv=none; d=google.com; s=arc-20160816; b=vHArJW4pUqiHn6JRhXKhFkTca2zSZy593NOz4BGZxIbpWYw7D+Cigj00iDG4Z+yAIf nu2ygu69DArX0T7YHvU/swHH+8FZdIx2iLyuXXdSs+HYeEcgA0MP5TE/WB5ztk5HDIXf +0YNHhJUGSbbkqROMUEpLmW4azS/dyVZIn8NQgphFE5Ue7OC3Z8644dBjO7YZ03wjpiz HAFO6RDR1Llk/BYyOXrj93OU5GWB79U0NFq5Lu0SdlMmohjzs6QiRNelmWCPxMUxtas/ stAP2plGTih5c38HVWsP1OzDrznCtYidd4MrRNBARQ3CAuoQGceMaWXWUkvvmTaw+aPL OlEg== 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=jsAwgx82Ge6keIlNp5/TkiwhwfVft+beRHZVQGSaP6A=; b=p8kU3LVpRRmZ53zbbFS+Qij3jpYAsktbGHEMZq+piSJB0I0Z3KGJCEsZFIvFBz9o6t 9bnbWbXKosABKxoIQxx1PaGGLMoJVqxNYayKoaCe79IdDwcHKTqkv9gffhruO4qy644p Z7uE53XvJkb1NnXZEqEpBdGZnTPWhZt1I+jPI44p6iG4poH06zSPQaW58G6QNgnsMccM RSuY0qx63CcN9/AdwV8JO+2X5rQFfrVMOqSP+SLWlxhqegQGhBcr8BXLScXj2gv340/x QyZhp3O+AzB0/s6GwlftlcJFk+L+vWH5rgqRG4xBkL/EoDzIj/1+LbaZ6dIL4H2Npc7k SQow== 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 ds7si11860032ejc.511.2020.08.24.17.55.24; Mon, 24 Aug 2020 17:56:08 -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 S1728354AbgHYAyl (ORCPT + 99 others); Mon, 24 Aug 2020 20:54:41 -0400 Received: from mga02.intel.com ([134.134.136.20]:44191 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728352AbgHYAyk (ORCPT ); Mon, 24 Aug 2020 20:54:40 -0400 IronPort-SDR: kdCLiXOH0NePraQIvD2KGxE8WS3IkNSrUV8Htw0FKCM6pti+JmYYuwOQ9QE35zai2Eyw72K9UV SFAzqX7Jxavw== X-IronPort-AV: E=McAfee;i="6000,8403,9723"; a="143797442" X-IronPort-AV: E=Sophos;i="5.76,350,1592895600"; d="scan'208";a="143797442" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Aug 2020 17:54:40 -0700 IronPort-SDR: E4rEponhjLdmNFMt3a6mFfNhCoVcA+rTj0dGUtHrv/TQnK8QV5ujoGsnSTVEtgXBmuDJsr1fn3 VjdgS4qhYBRQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,350,1592895600"; d="scan'208";a="474141834" Received: from apaharia-mobl.gar.corp.intel.com (HELO ingas-nuc1.intel.com) ([10.255.231.108]) by orsmga005.jf.intel.com with ESMTP; 24 Aug 2020 17:54:39 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ v2 1/4] doc/mesh-api: Add "options" dictionary to Send/Publish Date: Mon, 24 Aug 2020 17:54:32 -0700 Message-Id: <20200825005435.26566-2-inga.stotland@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200825005435.26566-1-inga.stotland@intel.com> References: <20200825005435.26566-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 and Publish 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 for Send() and DevKeySend(): "ForceSegmented" - to force small payloads to be sent as one-segment messages In case of Publish(), and additional keyword is defined "Vendor" - 16-bit Company ID as defined by the Bluetooth SIG Other key words may be defined in future to accommodate evolving requirements of Mesh Profile specification. Also, the addition of "options" dictionary to Publish allows to eliminate VendorPublish() method (taken care by "Vendor" keyword). --- doc/mesh-api.txt | 57 ++++++++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/doc/mesh-api.txt b/doc/mesh-api.txt index 495f95b0b..cae80d694 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,30 +375,21 @@ Methods: The model parameter contains a model ID, as defined by the Bluetooth SIG. - 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. - - Possible errors: - org.bluez.mesh.Error.DoesNotExist - org.bluez.mesh.Error.InvalidArguments - - void VendorPublish(object element_path, uint16 vendor, uint16 model_id, - 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 - publication record, the method returns - org.bluez.mesh.Error.DoesNotExist error. + The options parameter is a dictionary with the following keys + defined: - The element_path parameter is the object path of an element from - a collection of the application elements (see Mesh Application - Hierarchy section). + bool ForceSegmented + Specifies whether to force sending of a short + message as one-segment payload. If not present, + the default setting is "false". + uint16 Vendor - The vendor parameter is a 16-bit Bluetooth-assigned Company ID. + uint16 Vendor + A 16-bit Company ID as defined by the + Bluetooth SIG - The model_id parameter is a 16-bit vendor-assigned Model - Identifier. + 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 @@ -391,6 +399,7 @@ Methods: org.bluez.mesh.Error.DoesNotExist org.bluez.mesh.Error.InvalidArguments + Properties: dict Features [read-only] -- 2.26.2