Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3498836ybi; Fri, 5 Jul 2019 08:23:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCDaLfB4jfF6j+hva2LMsUtjkiKAKot4JHJeqEEIFQrAbqnsGsbodkdMdVINT5hcduEu8J X-Received: by 2002:a17:902:1004:: with SMTP id b4mr6354890pla.325.1562340200025; Fri, 05 Jul 2019 08:23:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562340200; cv=none; d=google.com; s=arc-20160816; b=TuK6Dq3CRJVdt/Ja4twUUccmAq2qU4tas5m4pHpuN1+jGv7IyECFg+rQGcfS6hPXNj 1UPYrMJ76zihYZPzcO3sRX8ZHlZ+4LLVFmtJbGeHYa5hDamTOjVTZFoCEQ4QYMKRhE/X YU3oYInQUyLNLOEbmvSUf1m/s6tiLOoCwbJiC1EXkw+phI/dNT6EAgv5OXE6bKh9eSrP S+xG6GHT/d6dtYa+kX1Zmb7ojSfa6PDV2tG9d6afwiRpG8cEzIHNxI96M3zpLzy5DTyi qBT5ZLc8Ds1sEybApdeD931U2iqpGOwtGwxwHDpzuxFqGJzGY+ZTVg+KRKQ5c0rZl+la U2LA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=LoE8UHfQYiqhNCRstz/3Bc+5W41p/0drFVl1Xc2ZXkA=; b=QjvQSOVRORSv/DM3k7H301y2aZPrfliBCRHJnp/GuOIMjGtBKPYxeVOK6Fl/a8zuUD d5n1FWTDiJ2t3tDbPzbfyYzHTEtwyUO//qA4hOD92uAJz294qCYZvnCTpvThm83RdzuX Ul19ZmaIczE/SGAtpWW7IusDj72J7lPl6tuP+gBOG47FcOIVcy5cqefNkFXdmnKN2UUd f7RLuTiXUWCjN/ICfkCrsxWorwwWJsQ41FyxFCUx7U5hFbwwIeu6CUw9poz0HutLlhtE bLda1/OSE+gMjuzW1zRCOBq9diZ1Larkb+xo062IdsbzMc0nBuGAW43MH2H5Zt+OMgcu LSEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b="y4rObZu/"; 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 e6si9727090pfl.254.2019.07.05.08.22.51; Fri, 05 Jul 2019 08:23:20 -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="y4rObZu/"; 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 S1726302AbfGEPW0 (ORCPT + 99 others); Fri, 5 Jul 2019 11:22:26 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:33799 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725497AbfGEPW0 (ORCPT ); Fri, 5 Jul 2019 11:22:26 -0400 Received: by mail-lf1-f66.google.com with SMTP id b29so6610522lfq.1 for ; Fri, 05 Jul 2019 08:22:24 -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:mime-version :content-transfer-encoding; bh=LoE8UHfQYiqhNCRstz/3Bc+5W41p/0drFVl1Xc2ZXkA=; b=y4rObZu/+rv+2zyN8+ezKgjoA8DOTybBB8J2S6j9iD5JAnqrxj1z2Pb2uehJDKbBve JcQcpEJInN86N5/g2gbz/6aeDUQO4BmGNM2Q0Rs0oaAvgBr+Di3SIrNAI5ZjWFLvPaB0 sP1ZLkwL9cq1HcAhrhDGzYw7NqUneUcb7pIhcDPAhfeDdxLYdCRqtVGvE6V9JPsDlWd6 7EgwnnIMQ0VXgLksDuz7hR/+RA3xR+kKlxHs3kOQJKZfl6g/KQ6i1BtGHYuSaW/gIUFu vkADuN7d1Navy+aZPmfo/3Qp0gYx13b78553eFuFpFGYI3g0Z4dY8eC3RUlX9aYjnwUs S21A== 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:mime-version :content-transfer-encoding; bh=LoE8UHfQYiqhNCRstz/3Bc+5W41p/0drFVl1Xc2ZXkA=; b=ec1HVDgTr9di7aUzTKr8//PL+uhQX0mzSG7eRXYmhDGQaIEZwPAcyfzrPvok7vF7r0 fqu631u++cn4xMKLmQuWVL2n/Xoz/SdIkCCJgdnfpN5DZNR/x+0fT6/jIzycy+zOawtN +nfX5dGqXaMus6VNA06r5R3bsqp09UBuKJQinRiLzuRXuZnJJVRBWLkSkGFIQ77RJap6 ZofqyKEThSVRHfa5ERkCBpyU713uDMq9EgFR83s+NwE3m6dHFn3gRhYOMs8ezmuJUNOp v8NaDBhiiIPizcuyiEgXUk72KrHEgvsx4yM6pPcNNIYIRjAKLGukxtmGL7LzV0Zvir+1 M+TA== X-Gm-Message-State: APjAAAVKWXjQxvll0ozRtnKDqi+nz33wY1J8QHLxG/6C+xQywvuIes8B TzVuEMYv9N2d082c0JMmfGiFCeTd5QMUyw== X-Received: by 2002:ac2:47fa:: with SMTP id b26mr2260745lfp.82.1562340143536; Fri, 05 Jul 2019 08:22:23 -0700 (PDT) Received: from localhost.localdomain ([217.153.94.18]) by smtp.gmail.com with ESMTPSA id u22sm2016989ljd.18.2019.07.05.08.22.22 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 05 Jul 2019 08:22:22 -0700 (PDT) From: Jakub Witowski To: linux-bluetooth@vger.kernel.org Cc: Inga Stotland Subject: [PATCH BlueZ v3 1/3] mesh: Add ImportLocalNode api documentation Date: Fri, 5 Jul 2019 17:22:14 +0200 Message-Id: <20190705152216.27766-1-jakub.witowski@silvair.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org This updates the mesh-api.txt with new ImportLocalNode() API. --- doc/mesh-api.txt | 104 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 93 insertions(+), 11 deletions(-) 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, - 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, and a org.bluez.mesh.Provisioner1 interface. + + The data_type parameter defines the import_data type. Supported + data_type parameters: + - “json” + + 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. 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: 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 @@ -1061,6 +1081,68 @@ Properties: Uniform Resource Identifier points to out-of-band (OOB) information (e.g., a public key) -Mesh Node Configuration Schema -============================== - +Mesh Node Configuration Examples +================================ +Example of Json format for ImportLocalNode(): + + Import simplified node operation: + { + "IVindex":0, + "IVupdate":0, + "unicastAddress":"0012", + "deviceKey":"7daa45cd1e9e11a4b86eeef7d01efa11", + "sequenceNumber":15 + "netKeys":[ + { + "index":"0000", + "key":"2ddfef86d67144c394428ea3078f86f9", + "keyRefresh":0 + }], + } + + Import full node operation: + { + "cid":"fee5", + "pid":"0042", + "vid":"0001", + "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", + "token":"bba7c60afaa85fc1", + "deviceKey":"56325fd145f3d5eee1b82136dc3e1454", + "netKeys":[ + { + "index":"0000", + "key":"2ddfef86d67144c394428ea3078f86f9", + "keyRefresh":0 + }], + "appKeys":[ + { + "index":"0000", + "boundNetKey":"0000", + "key":"43886b02ca4343beaae26dc4b6773ba4" + }], + "sequenceNumber":15 + } -- 2.20.1