Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5630829ybi; Wed, 31 Jul 2019 00:40:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZj/grd3+jD4/kFwRZE1e7iEaBJA9/vr65sX/VH28hYGBF/Q34vs7yYlnLZTeaJxERFhso X-Received: by 2002:a17:90a:22aa:: with SMTP id s39mr1497590pjc.39.1564558858536; Wed, 31 Jul 2019 00:40:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564558858; cv=none; d=google.com; s=arc-20160816; b=D8jHKKXG63FC+++xImAiGvuefrqvD33yFM8sj/t8XNU2FtT8c/UJ6DnkD/ZpZEngBz mzCbYSzf19CXFUjrd1DMEvj6vHqiXJRy6mtUfNYdoDitpQmr/s9Cozik/7VOlkmmwmKx Sk+WI+K3INugPuJZBe9HtOLU1tvNOxfxrVs+HDDW5bJG05ROvS02rI34HdzrE+TQm3Ie jwlLnzIEYbtTH2afd3d5uQZP9hP3yvJGKSFG6v7kLUS4qgAn+j3KDyYlY6BrIXBx7S0F HSCHE7HYITPK2eaTIRxes8pHXBQyW429tXNsxz6PsKTHy0ttLRD3JWY1JuTuU7J1WZff F4zw== 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:to:from :dkim-signature; bh=e30zSybaK0eLO+TfGSnPEXS9ILhDTx4pdKOhP1IwLK8=; b=D6z2KYhWOZOpLRJfz8/SwYv/yrAyUCKmVsgbx7SmXVx0KjeropbStD6yPEsRInThtU bw1FbCQ/p414rsWZOdHg2DywgUW4bNVrlCqrz7YTC0NxvkzKPXLOmgTFRHlz/Ak+PCCu B3X7IBeMAnQB0PmU1tpxygDUC6uaReCOiHijGMnobaG1QpHQmr+0rsZyuttDc2Qwkfho 4IzPvI0Qa+jlHixtM2E5rFXeUAIw2A0pmHM/dlGNJphXLv2CoRApITIsMcahr0+isqVt 4hkYjFeaYa6+Zhk6GJ1rnhrVwutjoV1RBsp5eS2HVL+fOUnUp28IVpXQ8VTvhyJmviBz 4T1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b="gbXf/G56"; 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 p125si31106440pfp.35.2019.07.31.00.40.32; Wed, 31 Jul 2019 00:40:58 -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="gbXf/G56"; 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 S1727125AbfGaHQ5 (ORCPT + 99 others); Wed, 31 Jul 2019 03:16:57 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:37010 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725970AbfGaHQ5 (ORCPT ); Wed, 31 Jul 2019 03:16:57 -0400 Received: by mail-lj1-f193.google.com with SMTP id z28so10316794ljn.4 for ; Wed, 31 Jul 2019 00:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=e30zSybaK0eLO+TfGSnPEXS9ILhDTx4pdKOhP1IwLK8=; b=gbXf/G56f07wMxbty1HlJvLttAmdcc93oEB1AW+jw3c1Z+pooVrk2TLdB2x1DvQk6A j6rMR4mYXHnN6wqfTDBH7b+8DjhsbNflASkddE8F3CT8oE1C8liPcR5n4irTUlBeDoLU 5kn7hlIwi6rKjYGCqziXHTqmV93HRHcZeIzXVWvVwO4/QC78wbtf2MZSkYY3tBkBJf7I YNDUJwBWuK6PEHpx1uvqVW9Ebs9poKNqFukT8r7uTaermhVWm7s7vJx5fT4xbkkehAr1 JM+lrQXh9eB/jJRSAMXLBueSEwRPlJag3Lx/jNgVY7Hkysj1lnEyhk7+Zz6tgLSClThL f7/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=e30zSybaK0eLO+TfGSnPEXS9ILhDTx4pdKOhP1IwLK8=; b=jfvUhNAshnxWcYsMHmbiGKvTt/RlWmjFCYznvcC0TW7NyVZTAbIAvgxSXDEa/ErO3q x7h9opX2XX5XU3ChiNbwwfkQ+OsMElVCjyo9Lz6vOJPFMbpNDJnoqr9I7jmnHX6AQe9x gL6NjgQD7pHuPX6ESSFK6PkCYQbBtaoVR1VDsQQNSD2xCH3CwwF+cmeaAHusSwhtdP5/ 99fLKDho/4sEtZs8MvOkyRlw/gJTaSdVcQsG1AboaQdkS14geyNfBzTWFjyZqVok7AEe B9870npl6Et2WNLXsYF8YsgA++SgXfNBsiSxZK7qQenI4W0uit8ZDD5xpY30V5/bJ/qh bMxA== X-Gm-Message-State: APjAAAUqKh0C1EFfbLEuyXIKkn3YuNiwIuEzlTCxdk0ZPOZ/Iz55VGfy i56F+gWfx3b5gg8SRhI+KAnOlquy27I= X-Received: by 2002:a05:651c:87:: with SMTP id 7mr54282414ljq.184.1564557414947; Wed, 31 Jul 2019 00:16:54 -0700 (PDT) Received: from mlowasrzechonek2133.silvair.lan ([217.153.94.18]) by smtp.gmail.com with ESMTPSA id n10sm11662477lfe.24.2019.07.31.00.16.54 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 31 Jul 2019 00:16:54 -0700 (PDT) From: =?UTF-8?q?Micha=C5=82=20Lowas-Rzechonek?= To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v7 2/3] mesh: Add documentation for Import() D-Bus API Date: Wed, 31 Jul 2019 09:16:46 +0200 Message-Id: <20190731071647.27217-3-michal.lowas-rzechonek@silvair.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190731071647.27217-1-michal.lowas-rzechonek@silvair.com> References: <20190731071647.27217-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 This replaces previously specified ImportLocalNode() call --- doc/mesh-api.txt | 57 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 15 deletions(-) diff --git a/doc/mesh-api.txt b/doc/mesh-api.txt index 7b62c0af4..255104ab6 100644 --- a/doc/mesh-api.txt +++ b/doc/mesh-api.txt @@ -151,16 +151,50 @@ Methods: org.bluez.mesh.Error.InvalidArguments org.bluez.mesh.Error.AlreadyExists, - uint64 token ImportLocalNode(string json_data) + uint64 token Import(object app_root, array{byte}[16] uuid, + array{byte}[16] dev_key, + array{byte}[16] net_key, uint16 net_index, + dict flags, uint32 iv_index, uint16 unicast) 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 uuid parameter is a 16-byte array that contains Device UUID. + This UUID must be unique (at least from the daemon perspective), + therefore attempting to call this function using already + registered UUID results in an error. + + The dev_key parameter is the 16-byte value of the dev key of + the imported mesh node. + + Remaining parameters correspond to provisioning data: + + The net_key and net_index parameters describe the network (or a + subnet, if net_index is not 0) the imported mesh node belongs + to. + + The flags parameter is a dictionary containing provisioning + flags. Supported values are: + + boolean IVUpdate + + When true, indicates that the network is in the + middle of IV Index Update procedure. + + boolean KeyRefresh + + When true, indicates that the specified net key + is in the middle of a key refresh procedure. + + The iv_index parameter is the current IV Index value used by + the network. This value is known by the provisioner. + + The unicast parameter is the primary unicast address of the + imported node. The returned token must be preserved by the application in order to authenticate itself to the mesh daemon and attach to @@ -168,13 +202,10 @@ Methods: permanently remove the identity of the mesh node by calling Leave() method. - It is an error to attempt importing a node with already - registered Device UUID. - 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 @@ -1069,7 +1100,3 @@ Properties: Uniform Resource Identifier points to out-of-band (OOB) information (e.g., a public key) - -Mesh Node Configuration Schema -============================== - -- 2.19.1