Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3484812ybi; Mon, 29 Jul 2019 07:22:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqygWHBps+6gFDtT5/576DxxeY3e3UOLN/glzHt4DH3jXWWnR6FM9k+cqlQ6mjXmEPYH+cb1 X-Received: by 2002:aa7:8b51:: with SMTP id i17mr37446917pfd.33.1564410127359; Mon, 29 Jul 2019 07:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564410127; cv=none; d=google.com; s=arc-20160816; b=xF1Dd52Dfb4tNjR2/A7QqHFLf4vaGEvM8gqI+kYozDOOyMwgO2lyD6ykeKh97X7O72 eCG4L2Uv51CB4QxS2P2Oua+qCnoJ0ZSsPkIRRwXI9A79prXQgoj4E+LySIaujaOJKvCI 144ot7o1Q2ebE8QpzO7lWKHYgOIfLNJ9g3YJabR/eIr95nPu0gklLLJ361DhK+MOzDxu sZLoVVbCMEm8HMgtMJO3smU8Catsr/EpYwt8GyL8nIbTICLPETLHzxuv7fM513e2GDrq aM/x89GarjpjLl9J4IWgW+0XQ4+rZNK8HF/NT58JF9ukI4tEKdSGgU4/IkgMCkxVb3d5 +6pg== 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=NzFKAFeFGNdx3izi43ccsZhdtA3eZhc5kTEkprmre3b89oSIqnm4spb6q3ku118F2d vZBWYfHhBoTZqRKDavRyY2CPxmVc9y607PFNv+Pd0zNRGVNH6Ra+7/Xdanm6YLG1VQwD r/UTi/mvatFRok7uqViK70sXC5It+HUwBnuT1u6SIg5kkmSdlddxTz1nQhzDzZWWNDL7 fTv7iudBNbF1SGOu+gRZxxtjP2GiKbwX+OiHPkYZ3Ncsv1Me3MRkPJs3ZEVKMcJPD/rG agDXPBJ6ew1UorpldQxFMjm6mxvf31SjQvcYpBnKFwb96OwjsHOXAWke/LZVOkZxB1uV bZog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=vfIrmTbM; 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 co12si25061611plb.197.2019.07.29.07.21.52; Mon, 29 Jul 2019 07:22:07 -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=vfIrmTbM; 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 S1727031AbfG2Nk6 (ORCPT + 99 others); Mon, 29 Jul 2019 09:40:58 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:46744 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726627AbfG2Nk5 (ORCPT ); Mon, 29 Jul 2019 09:40:57 -0400 Received: by mail-lj1-f196.google.com with SMTP id v24so58750782ljg.13 for ; Mon, 29 Jul 2019 06:40:56 -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=vfIrmTbMcp354ntRxG5IlYAO0gmudCWO3afH6S/6mHRGcmQLQb+MbliG8njLLSGddD GdccBy+KTzCAXlu+DpmZvT7YvSr3bEZbCGASoVwauwec20pFNX4oPVoPx8xxDdfaKuA0 WlV7ZuSKXMf1X4y98j9/iYg0bNiURxiu4pw7p9PPxRf/evLVit+LVhnBDyOYp8fjaUc1 YgaSsh3FIO/CWQRoQnb9xPAij8ha2jOGR5q2IlT/Ci0S1Qz6CjlSPg0HYJ6FOvUEuBdS s1w5oJC08LU2ENoMfMB4gxijP6QSMkMBQtINOc+NHJucVhYZc2ppFdNXuAhjN5fNInxD g+8g== 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=goUzYdN+hg4TB8+LyUNWu160ZOe7OI3SB81JgSeLS/Ae3PvsBWQw6EyKiPqP+NbMXJ sNnFzZkHzYTYXgoL8h5w5ul7uKesDu+7lryQm1I76maW8cpmkfbypreAmXOEyh0I93gy QZ8/CUdHC+2CTo+hg7QaSr647arSDTknxJAZtq0+d2ZHZxXW37O3k+kStpDlwqGriOYu pmDVXetXIBymkRntgXaOyzQflTHeAge86LvqaWo6H8HR5DkKBrcvvU3RMTSQXM/uCyIX 1KViWJ0lbtghXx+OJ7BXbMyuCUFCT0sQTYkvhRireI1yTUx4jMLdkB0MBjhpeWGNQAFu oGtw== X-Gm-Message-State: APjAAAWMrAkOEKYW0/OakNiOzt23af/wfRxtT5Z7LU1mf9OR0mV8Rmzm VUs3Vn+XtTjqtA9wT1MwBxgKq9O6oSI= X-Received: by 2002:a2e:3a01:: with SMTP id h1mr1038221lja.132.1564407655693; Mon, 29 Jul 2019 06:40:55 -0700 (PDT) Received: from mlowasrzechonek2133.silvair.lan ([217.153.94.18]) by smtp.gmail.com with ESMTPSA id h84sm12762220ljf.42.2019.07.29.06.40.54 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 06:40:55 -0700 (PDT) From: =?UTF-8?q?Micha=C5=82=20Lowas-Rzechonek?= To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v6 2/3] mesh: Add documentation for Import() D-Bus API Date: Mon, 29 Jul 2019 15:40:46 +0200 Message-Id: <20190729134047.21033-3-michal.lowas-rzechonek@silvair.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190729134047.21033-1-michal.lowas-rzechonek@silvair.com> References: <20190729134047.21033-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