Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8865106ybi; Wed, 10 Jul 2019 00:39:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxNCL0Uj8pyO6U2r2WdQ/eDE4RHG8hKqiw9yHju22iIRAycWrGrkYBKG4/T1xX0y2YGPsqF X-Received: by 2002:a17:90a:208d:: with SMTP id f13mr5157203pjg.68.1562744375799; Wed, 10 Jul 2019 00:39:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562744375; cv=none; d=google.com; s=arc-20160816; b=lKFfib/+P9tjydsUmcATseiD68eOPnNMgp8SZ2kr4DKfpO1+e5TKxLOOHRT/anmk7j EKHNa8udnkYLDpT6nLR1YMornJ9FvVxwzsVOZrwda0nQx+OAdhqUoRiY+6xoIyPd3mCL OWb5jRq7lkl8juZ+cFWW8VFGY7s8bZfAKfUjnkDY/vltbal2iAoY0TdlS9qSycCHwMCO Ht4CGofdnQsgDrBqPC80jO5bz6gz5/tI7rdhZrvMZwcLPf7Tf18REdILh/2RDW6zPMoc TTooeg205bFgddSD56ZX1+3jG0Lyz3Z655/KsElrdTCaWkgfgOm0argUg21lZlykU5qV Yqrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=f/eK0a9SJwfY80NWOQ8mg1skz0nJ4GNOXFXjKIjV6wk=; b=1D0gTq2CkiPZJh7/LUSiDzrmnNrfRYO4Q3macHp9aQE9X6ZsiIM4ZQ8ktl2J0RnnEY 6qKNB3deTUGRWdbknqSh9F1ftPUsowXG9xgYbBfTKk86S+ozQXS4z9avu4cDvyRT1eje rQX0uxQ+l5zCbVsNfGHxCFuatQMPaVEUBynELtbhJCDDSOo/AwzjbChgfSKKm4/O3pqw o7RZosp9At074FfbU/ehYHrENGOQmUnbljZK+P2CtOUCqM3OggYo4vE/SNcw+6OS043j jPln0L7xRGAhEtDqWJYnDNs1bVDcjcw/k9Q2rnbutF0OZujRMj/AQOQJA3CziKa2UV/7 I3vg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id s132si1494352pfc.244.2019.07.10.00.39.06; Wed, 10 Jul 2019 00:39:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 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 S1726246AbfGJHiM (ORCPT + 99 others); Wed, 10 Jul 2019 03:38:12 -0400 Received: from mga09.intel.com ([134.134.136.24]:55103 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726203AbfGJHiM (ORCPT ); Wed, 10 Jul 2019 03:38:12 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jul 2019 00:38:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,473,1557212400"; d="p7s'?scan'208";a="170835510" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by orsmga006.jf.intel.com with ESMTP; 10 Jul 2019 00:38:11 -0700 Received: from orsmsx103.amr.corp.intel.com ([169.254.5.44]) by ORSMSX110.amr.corp.intel.com ([169.254.10.65]) with mapi id 14.03.0439.000; Wed, 10 Jul 2019 00:38:11 -0700 From: "Stotland, Inga" To: "jakub.witowski@silvair.com" , "linux-bluetooth@vger.kernel.org" CC: "michal.lowas-rzechonek@silvair.com" , "Gix, Brian" Subject: Re: [PATCH BlueZ v4 1/4] mesh: Add ImportLocalNode api documentation Thread-Topic: [PATCH BlueZ v4 1/4] mesh: Add ImportLocalNode api documentation Thread-Index: AQHVNj8+AzUm65x0BkK7GV8qht700abD7ayA Date: Wed, 10 Jul 2019 07:38:10 +0000 Message-ID: <3b87bcfc2659702f998ea32c717e0adbd84dafe8.camel@intel.com> References: <20190709101522.10623-1-jakub.witowski@silvair.com> In-Reply-To: <20190709101522.10623-1-jakub.witowski@silvair.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [10.255.91.91] Content-Type: multipart/signed; micalg=sha-1; protocol="application/x-pkcs7-signature"; boundary="=-scIGqsOXa39c1GQOma1V" MIME-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org --=-scIGqsOXa39c1GQOma1V Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Jakub, On Tue, 2019-07-09 at 12:15 +0200, Jakub Witowski wrote: > This updates the mesh-api.txt with new ImportLocalNode() API. > --- > doc/mesh-api.txt | 104 ++++++++++++++++++++++++++++++++++++++++++--- > -- > 1 file changed, 93 insertions(+), 11 deletions(-) >=20 > diff --git a/doc/mesh-api.txt b/doc/mesh-api.txt > index 893a1a6c0..f2ba164a9 100644 > --- a/doc/mesh-api.txt > +++ b/doc/mesh-api.txt > @@ -151,16 +151,36 @@ Methods: > org.bluez.mesh.Error.InvalidArguments > org.bluez.mesh.Error.AlreadyExists, > =20 > - uint64 token ImportLocalNode(string json_data) > + uint64 token ImportLocalNode(object app_root, array{byte}[16] > uuid, > + string > data_type, array{byte} import_data) > =20 > This method creates a local mesh node based on node > configuration that has been generated outside > bluetooth-meshd. > =20 > - The json_data parameter is a full JSON representation > of a node > - configuration file. The format must conform to the > schema > - defined in "Mesh Node Configuration Schema" section. > Any > - included token will be ignored in favor of a locally > generated > - token value. > + The app_root parameter is a D-Bus object root path of > the > + application that implements org.bluez.mesh.Application1 > + interface, and a org.bluez.mesh.Provisioner1 interface. "the application that implements org.bluez.mesh.Application1 interface" I don't think that supporting Provisioner1 interface is a requirement? > + > + The data_type parameter defines the import_data type. > Supported > + data_type parameters: "The following values are supported:" > + - =E2=80=9Cjson=E2=80=9D > + > + The import_data parameter can be either: > + - Simplified representation of node > configuration with > + provisioning data only > + - Full representation of node configuration > with both > + provisioning and composition data > + > + sequenceNumber parameter int the import_data is > optional. > + > + The format must conform to the schema defined in > + "Mesh Node Configuration Examples" section. Any > included token will > + be ignored in favor of a locally generated token value. > If > + import_data contains composition data (determined by > the presence of > + Elements) it is validated against composition data > provided by > + the application. Otherwise, new node is created based > on > + composition data provided by the application using > provisioning data > + from import_data parameter. > =20 The description of import_data parameter needs to be re-written. The above description is too skewed towards JSON format and imo is more detiled than needed. we definitely need to mention that the interpretation of the import_data parameter depends on the value of data_type. Then we can say that "for the case when data_type has value "json", the import_data contains a string that describes node configuration in JSOn notation, following the schema. See the examples at the end of this documents." =20 > The returned token must be preserved by the application > in > order to authenticate itself to the mesh daemon and > attach to > @@ -173,8 +193,8 @@ Methods: > =20 > PossibleErrors: > org.bluez.mesh.Error.InvalidArguments, > - org.bluez.mesh.Error.AlreadyExists > - org.bluez.mesh.Error.NotFound, > + org.bluez.mesh.Error.AlreadyExists, > + org.bluez.mesh.Error.NotSupported, > org.bluez.mesh.Error.Failed > =20 > Mesh Node Hierarchy > @@ -1061,6 +1081,68 @@ Properties: > Uniform Resource Identifier points to out-of-band (OOB) > information (e.g., a public key) > =20 > -Mesh Node Configuration Schema > -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > - Line break > +Mesh Node Configuration Examples > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > +Example of Json format for ImportLocalNode(): Minimum required configuration: > + { > + "IVindex":0, > + "IVupdate":0, > + "unicastAddress":"0012", > + "deviceKey":"7daa45cd1e9e11a4b86eeef7d01efa11", > + "netKeys":[ "sequenceNumber":15 No sequence number > + { > + "index":"0000", > + "key":"2ddfef86d67144c394428ea3078f86f9", > + "keyRefresh":0 > + }] > + } > + > + Import full node operation: > + { > + "cid":"fee5", > + "crpl":"2710", > + "relay":{ > + "mode":"disabled", > + "count":0, > + "interval":0 > + }, > + "lowPower":"unsupported", > + "friend":"unsupported", > + "proxy":"unsupported", > + "beacon":"disabled", > + "defaultTTL":255, > + "elements":[ > + { > + "elementIndex":0, > + "location":"002a", > + "models":[ > + { > + "modelId":"0008", > + "bind":[ > + "0000"] > + }] > + }], > + "IVindex":0, > + "IVupdate":0, > + "unicastAddress":"0010", >=20 "token":"bba7c60afaa85fc1", No token > + "deviceKey":"56325fd145f3d5eee1b82136dc3e1454", > + "netKeys":[ > + { > + "index":"0000", > + "key":"2ddfef86d67144c394428ea3078f86f9", > + "keyRefresh":0 > + }], > + "appKeys":[ > + { > + "index":"0000", > + "boundNetKey":"0000", > + "key":"43886b02ca4343beaae26dc4b6773ba4" > + }], > + "sequenceNumber":15 no sequence number > + } Actually, I don't like the full configuration exmple. It's not realy "full". Better to provide a schema. We'll get to the schema in time. --=-scIGqsOXa39c1GQOma1V Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Disposition: attachment; filename="smime.p7s" Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIKbDCCBOsw ggP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