Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp832443ybx; Fri, 1 Nov 2019 11:58:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxm6l4L1RUxgDu+YrvLJM/joPAmkEcAhgItBAdgDHxm5gAdy0ZMNo6BUn/1YThw9FNYzUQ X-Received: by 2002:aa7:c7c1:: with SMTP id o1mr14376767eds.123.1572634697585; Fri, 01 Nov 2019 11:58:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572634697; cv=none; d=google.com; s=arc-20160816; b=uLgM4cT0vlFgR+tLtvDHzh4f683o55t9YjsHJQzvT88mgbzcn6ZnjMiPeLSi5xdz4Y bWaZJDLTZ7t0bATTQOe8+ZrjfB9uBfh6qjf+YGTjTvnnv1YLDiR7h74Awfup3I5Zw3PB Fogq5igZatxwww/pcPaoN90zQ6OuNToNwMMaUSnXT9B0n19hxD5jy1BVtv3A5iBAej7+ ZppyZUsN3s5ySiI0/E3IEtlJse9GykgMksvhUfX8RVGCujOynk9lqo7yllggwRbMe5v+ 9kZazM1RfNMFUMQOCrKrakopNhgA8ZegUNvEwMZ6zA23qNythKRjTsz9juVGdts5yzRV DR5g== 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; bh=wkgaDQ9ZAWs3uhiguZMXU0yLAsa0ozdObx8ikaG0mGY=; b=qK5oO2Io63MIjyv58A8/w8texWcS2/K9spgQ9Nsjw9Lp4vEXZMXGQjSToUpBJ7Xi3I S0yS14Q9hfozMmR1yEahBVNc0Thtf2f+1ixLfmyTJ2bMmzCnenZECkxUbvi1/R4e6Yta YFBuDPWRdho4JxEFAlUKX0Qys3YgqnO2HVu4wA0eqWJ5UZi+4WQhANhSOVWruLO+7oiI EyaPpF1JctYgQiDWgjK+3+IsOKMmoFlVDzdY5g6SjmFWvTVNcOempb20HNfmXwjro3Qh y11ww9qyMxfLm5JwTt0dRXRD5NvTFFb535yNmI/sq2bfai1AvJEnir8t7YqyV5cxUMqW R8mQ== 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 b15si6600211ejd.66.2019.11.01.11.57.34; Fri, 01 Nov 2019 11:58:17 -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 S1727473AbfKAS5c (ORCPT + 99 others); Fri, 1 Nov 2019 14:57:32 -0400 Received: from mga05.intel.com ([192.55.52.43]:29978 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727325AbfKAS5c (ORCPT ); Fri, 1 Nov 2019 14:57:32 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Nov 2019 11:57:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,256,1569308400"; d="scan'208";a="211833697" Received: from ingas-nuc1.sea.intel.com ([10.255.230.110]) by fmsmga001.fm.intel.com with ESMTP; 01 Nov 2019 11:57:30 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, Inga Stotland Subject: [PATCH BlueZ 00/10 v2] Mesh provisioning and configuration tool Date: Fri, 1 Nov 2019 11:57:19 -0700 Message-Id: <20191101185729.31661-1-inga.stotland@intel.com> X-Mailer: git-send-email 2.21.0 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 v2: 1. Adjust for changed l_dbus_object_manager_enable parameters 2. Fix AppKey delete and Add Model bindings commands (tools/mesh/cfgli.c) 3. ADjust JSON storage format and add support for NetKey AppKey deletion. ********************* This patch set adds a mesh-cfgclient tool that allows to create mesh networks operating over advertising (PB-ADV) provisioning bearer. The toolimplements support for: - creating of the inital "pcrovisioner" node with the initial network key - adding/removing network and application keys to the network - provisioning remote devices into mesh network - configuring of the provisioned nodes (Config Model Client operations) Network configuration is saved in JSON format file. Disclaimer: the storage is work in progress and is not fully implemented. Also, some functionality overlaps with meshctl tool (GATT based mesh network provisioning and configuration tool). For the time being, these two tools are separate and coexist side by side. Eventually, additional work needs to be done to eleiminate overlapping areas and potentially merge the tools. Currently, meshctl supplemenal files are moved to tools/mesh-gatt Inga Stotland (10): tools/mesh: Remove extra dependencies from agent.c tools/mesh: Move meshctl specific files to mesh-gatt tools: Add mesh-cfgclient tool tools/mesh: move remote node processing to a separate file tools/mesh-cfgclient: Commands for Management iface methods tools/mesh-cfgclient: Add config menu key commands tools/mesh-cfgclient: Add timeout for expected response tools/mesh-cfgclient: Command line option for config tools/mesh: add initial support for config storage tools/mesh-cfgclient: Add README file .gitignore | 1 + Makefile.tools | 46 +- tools/mesh-cfgclient.c | 1861 +++++++++++++++++++++ tools/mesh-gatt/README | 43 + tools/{mesh => mesh-gatt}/config-client.c | 14 +- tools/{mesh => mesh-gatt}/config-server.c | 14 +- tools/{mesh => mesh-gatt}/crypto.c | 5 +- tools/{mesh => mesh-gatt}/crypto.h | 0 tools/{mesh => mesh-gatt}/gatt.c | 11 +- tools/{mesh => mesh-gatt}/gatt.h | 0 tools/mesh-gatt/keys.h | 39 + tools/{mesh => mesh-gatt}/local_node.json | 0 tools/{mesh => mesh-gatt}/mesh-net.h | 0 tools/{mesh => mesh-gatt}/net.c | 16 +- tools/{mesh => mesh-gatt}/net.h | 0 tools/{mesh => mesh-gatt}/node.c | 16 +- tools/{mesh => mesh-gatt}/node.h | 0 tools/{mesh => mesh-gatt}/onoff-model.c | 15 +- tools/{mesh => mesh-gatt}/onoff-model.h | 0 tools/{mesh => mesh-gatt}/prov-db.c | 14 +- tools/{mesh => mesh-gatt}/prov-db.h | 0 tools/{mesh => mesh-gatt}/prov.c | 16 +- tools/{mesh => mesh-gatt}/prov.h | 0 tools/{mesh => mesh-gatt}/prov_db.json | 0 tools/mesh-gatt/util.c | 220 +++ tools/mesh-gatt/util.h | 41 + tools/mesh/README | 43 +- tools/mesh/agent.c | 32 +- tools/mesh/cfgcli.c | 1413 ++++++++++++++++ tools/mesh/cfgcli.h | 25 + tools/mesh/config-model.h | 3 +- tools/mesh/keys.c | 175 ++ tools/mesh/keys.h | 27 +- tools/mesh/mesh-db.c | 899 ++++++++++ tools/mesh/mesh-db.h | 54 + tools/mesh/model.h | 63 + tools/mesh/remote.c | 266 +++ tools/mesh/remote.h | 29 + tools/mesh/util.c | 107 +- tools/mesh/util.h | 14 +- tools/meshctl.c | 22 +- 41 files changed, 5313 insertions(+), 231 deletions(-) create mode 100644 tools/mesh-cfgclient.c create mode 100644 tools/mesh-gatt/README rename tools/{mesh => mesh-gatt}/config-client.c (99%) rename tools/{mesh => mesh-gatt}/config-server.c (94%) rename tools/{mesh => mesh-gatt}/crypto.c (99%) rename tools/{mesh => mesh-gatt}/crypto.h (100%) rename tools/{mesh => mesh-gatt}/gatt.c (98%) rename tools/{mesh => mesh-gatt}/gatt.h (100%) create mode 100644 tools/mesh-gatt/keys.h rename tools/{mesh => mesh-gatt}/local_node.json (100%) rename tools/{mesh => mesh-gatt}/mesh-net.h (100%) rename tools/{mesh => mesh-gatt}/net.c (99%) rename tools/{mesh => mesh-gatt}/net.h (100%) rename tools/{mesh => mesh-gatt}/node.c (98%) rename tools/{mesh => mesh-gatt}/node.h (100%) rename tools/{mesh => mesh-gatt}/onoff-model.c (96%) rename tools/{mesh => mesh-gatt}/onoff-model.h (100%) rename tools/{mesh => mesh-gatt}/prov-db.c (99%) rename tools/{mesh => mesh-gatt}/prov-db.h (100%) rename tools/{mesh => mesh-gatt}/prov.c (98%) rename tools/{mesh => mesh-gatt}/prov.h (100%) rename tools/{mesh => mesh-gatt}/prov_db.json (100%) create mode 100644 tools/mesh-gatt/util.c create mode 100644 tools/mesh-gatt/util.h create mode 100644 tools/mesh/cfgcli.c create mode 100644 tools/mesh/cfgcli.h create mode 100644 tools/mesh/keys.c create mode 100644 tools/mesh/mesh-db.c create mode 100644 tools/mesh/mesh-db.h create mode 100644 tools/mesh/model.h create mode 100644 tools/mesh/remote.c create mode 100644 tools/mesh/remote.h -- 2.21.0