Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp583221ybi; Wed, 17 Jul 2019 01:37:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWnPQEMav4KR0aPvfSqa9yba4+Ebyew5os4u2YsO+nf5ZKLlSfsG76veJ6Ep3aX/9k83qo X-Received: by 2002:a17:902:f301:: with SMTP id gb1mr40992876plb.292.1563352657176; Wed, 17 Jul 2019 01:37:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563352657; cv=none; d=google.com; s=arc-20160816; b=e/7QLdlbIntNCsThVBDCy6+vnjcRRiROZvmO2OqiOOqr5DD2zUlEWzrMP64MlQ4l21 Atyc/E5AdBl174F/EpJl/wHNm028E32fwfzj4EpKfgylfCh0c1ehk1GF1jmjpFD0+5TJ IIQ5bKx2RLUvN8YzRrbIGvsQzTCnIoylWgfauBkjnzklRTxJQoXfzLeumdGoi+Qsu1ZE yIByqcaEM61qwPuIksnXkV5ugUjWt2bdp+uTsb6vvrOhjiG9cYg0cUfGt8loQVXbxr8k Op8CoY+FEPI7YbQS68HCV4GeMbhN+amaINioKXWooebZieE3HgGDz4bxR6yckZUNGHva iPIw== 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 :dkim-signature; bh=XtKh3VCpQshr2zRQu6MayitOcKfNU9hOZUIfGZRFuYc=; b=rrK0rtnxTIavhB39+6VAkoAAWKuKf9lYN6W1etQKdhb4d1tc/2hA/Y8cTQcDVUQ8bW ni3TlD+pLJwP3XIb5XEA0UybARvmCu+Nn9erlIxmElJVUYvC1b0yw7gOLaUlxxz0WCvE nRaz98jbUnkJ2ugXZP4O0xCqw0KRZHOkeW7aUTMuDYcpaRScYA+SDSmlxPDMIFkJefQS BecHV5eTzCMIXJCLi9/UP+OvtBl9yjtiVQb/9hijXd2hPAGlofi4Drd41ru9bzlfNHRx N5YU1JOMol6VSxBiA8NzowEw3I8b6HdppcbbtUpGCfCO0X1WTIAzJuoBpMyYB4JwvXZX tOEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b="s+uEzeX/"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a21si23640544pfo.249.2019.07.17.01.37.08; Wed, 17 Jul 2019 01:37:37 -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; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b="s+uEzeX/"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726518AbfGQIhE (ORCPT + 99 others); Wed, 17 Jul 2019 04:37:04 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:45616 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725873AbfGQIhE (ORCPT ); Wed, 17 Jul 2019 04:37:04 -0400 Received: by mail-lj1-f193.google.com with SMTP id m23so22710652lje.12 for ; Wed, 17 Jul 2019 01:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XtKh3VCpQshr2zRQu6MayitOcKfNU9hOZUIfGZRFuYc=; b=s+uEzeX/BgWhLkE/S14MnQyR7uhqXbzLo+BRgbVupLmI+kTs7geeado052ZmjpNym4 RSifLqd1sgXAPRGCO9LcaQf0iZhMkPklIjp5+Uwwr6PSg4Mb9KkoF35wvdVD2riA1FdI V9Fh5rjiCubD//ioDVSNbegx9QRK5dH43zn8pRo5E6RRy1Siiv6PtNO9Wg2bIjSO6faG 1XbFhOjUxZVZgGcgxb2Lg4GY+x0DABLJEucUxLzW/QQtZoPXiwbEkE5yXGH9cY8SDgBI T3ksJs6P6qouDTdoftPNRJOE/+xAyCKXp90SaCvxfrpgOrlAjtCz/enGWgLRcxYHZ6Kn CXKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XtKh3VCpQshr2zRQu6MayitOcKfNU9hOZUIfGZRFuYc=; b=HCtxlWQn/aRdJyqVmKuBR7XMo2fAp5qkxb9yCZl1eF9fRvFDxPh4lxn97lYbSVM1W4 d3lZ0zg7bgJhUqjVxe3e+XLvwVyM1q/fNfa8zb6xrL46GzZyfBCHm/lACcB5lUB3Q1HL PGTFnMC+tIumiWkkIxbdYMdcoJfJwd1QBjWd5oXBGAbOF+9wIWdOljsH6hVpEe/8OjtQ J9AhxVBPuAiiuWLeLv+VpRIidwcMhJofEFQvRZCsChdQrcrwimX5lCIqCjBn5aLSh1us MrIw7eWEEygFPx8WiFjXjPN3IBB49c8Ozf6j2KTrD3wuig2h9SN9p7VhdJwxzWgtI0tb X4Hw== X-Gm-Message-State: APjAAAV9XoC3pKKLXouzHFY7tvtaAy23LF6TUtFexjY/ZQ7i6zzbzfIQ WArgqjv9/s2FsifkHkVihtakXJOBGeA= X-Received: by 2002:a2e:8515:: with SMTP id j21mr5385491lji.233.1563352622713; Wed, 17 Jul 2019 01:37:02 -0700 (PDT) Received: from localhost.localdomain ([31.0.84.191]) by smtp.gmail.com with ESMTPSA id v202sm3338708lfa.28.2019.07.17.01.37.01 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 17 Jul 2019 01:37:02 -0700 (PDT) From: =?UTF-8?q?Micha=C5=82=20Lowas-Rzechonek?= To: linux-bluetooth@vger.kernel.org Cc: Jakub Witowski Subject: [PATCH BlueZ v5 1/4] mesh: Add ImportLocalNode API documentation Date: Wed, 17 Jul 2019 10:36:47 +0200 Message-Id: <20190717083650.26346-2-michal.lowas-rzechonek@silvair.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190717083650.26346-1-michal.lowas-rzechonek@silvair.com> References: <20190717083650.26346-1-michal.lowas-rzechonek@silvair.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 From: Jakub Witowski This updates the mesh-api.txt with new ImportLocalNode() API. --- doc/mesh-api.txt | 52 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/doc/mesh-api.txt b/doc/mesh-api.txt index 0ac2fdfd1..7c2a1fafa 100644 --- a/doc/mesh-api.txt +++ b/doc/mesh-api.txt @@ -151,16 +151,31 @@ Methods: org.bluez.mesh.Error.InvalidArguments org.bluez.mesh.Error.AlreadyExists, - uint64 token ImportLocalNode(string json_data) + uint64 token ImportLocalNode(object app_root, array{byte}[16] uuid, + string data_type, array{byte} import_data) This method creates a local mesh node based on node configuration that has been generated outside bluetooth-meshd. - 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. + + The import_data parameter contains a representation of a + provisioned node. Format of this representation depends on + value of data_type parameter. + + Allowed data_type values are: "json". + + When data_type is "json", bluetooth-meshd daemon treats + import_data is a JSON document following schema. See the + examples at the end of this document. + + The import_data parameter can contain either minimal, or + complete representation of a provisioned node. + + When a complete representation is provided, it is validated + against composition data provided by the application. The returned token must be preserved by the application in order to authenticate itself to the mesh daemon and attach to @@ -173,8 +188,8 @@ Methods: 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 Mesh Node Hierarchy @@ -1064,6 +1079,21 @@ Properties: Uniform Resource Identifier points to out-of-band (OOB) information (e.g., a public key) -Mesh Node Configuration Schema -============================== - +Mesh Node Configuration Examples +================================ +Minimal JSON representation for ImportLocalNode(): + +{ + "IVindex":0, + "IVupdate":0, + "unicastAddress":"0012", + "deviceKey":"7daa45cd1e9e11a4b86eeef7d01efa11", + "netKeys":[ + { + "index":"0000", + "key":"2ddfef86d67144c394428ea3078f86f9", + "keyRefresh":0 + } + ], + "sequenceNumber":15 /* optional */ +} -- 2.19.1