Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2859602ybc; Mon, 18 Nov 2019 05:54:28 -0800 (PST) X-Google-Smtp-Source: APXvYqxbvnBqCn/j7a0n1w1PcLnKOlVw1o5iKh0FfXxR6s7310/AwRh9of0/FZHic8eEszAp2NEl X-Received: by 2002:a17:906:85c8:: with SMTP id i8mr27547801ejy.46.1574085268202; Mon, 18 Nov 2019 05:54:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574085268; cv=none; d=google.com; s=arc-20160816; b=YvSNieyrcGfGCbGyhIO5og04V6WBKYg58HUyP3yBJDKa8rQiqPhnTqNb43v35h3vlX 6orfYQoDqEzL9YNzIek2ldeUK8cHNqyBGMI7zE6/V4SeoShXBet0PGwttkeB6YgNDUZL VlaMcP9ghm7umgX0ywvfTurl/wdWzfm1CX7lOuI2MyVtbnYDeZ95D8+WQuOjC6w6Ir81 4vyE45NWNx7up3OhBe6R7wUe3/zJVebSMsB2Ht7NkuoUubdCW7IfuZeGEoVGeC/rFAxN SWfqPUxvWm9dW7WQVW++Z861iPEsbXtjL1sYDvjelul1YYbWq+fucNfG06l5cgJZ0hUb AIpQ== 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=aR9G8Bz4VZi9T+x0ISfypqoCgAG/bwPyEL3xJBYk5XM=; b=0C609p7peC+a4HhJQ8+gLiCq96qjPVuTebtb0gAbb31r11IqvgepTiLKyH8mfqeIWk EHQjT9EzfpDuc+VmTcuQAmgyOu4fhMsUf8BrK5sPC66/MHhtKC8JXkLHWRzW7aT/LUn4 g4SS5DsFWxU/IToz8L52Q6ilf4Sw1lzX1R0MqlStuHnq5F8uwULnXcqFgTWK8fQbXQqR Qf3jqKs82izOq4IosUd7/39tw8Ubgrjt3g+j6uI4C6srOBHW7gPAKOw6WwhWwGNyiOrO r/i+Tnbkxn8bCd/XauVXJR/tyj6Gk/+ebj9TVqlHxkanSLqDw+Vr09MmgaDKN9YOSWMw QbBg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j6si1539375ejb.419.2019.11.18.05.54.00; Mon, 18 Nov 2019 05:54:28 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726668AbfKRNxp (ORCPT + 99 others); Mon, 18 Nov 2019 08:53:45 -0500 Received: from mail.tinia.it ([212.104.57.17]:44910 "EHLO mail.tinia.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726895AbfKRNxp (ORCPT ); Mon, 18 Nov 2019 08:53:45 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.tinia.eu (Postfix) with ESMTP id DAEE3222722; Mon, 18 Nov 2019 14:44:15 +0100 (CET) Received: from mail.tinia.eu ([127.0.0.1]) by localhost (mail.tinia.eu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id pMKv1QEduIUR; Mon, 18 Nov 2019 14:44:14 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.tinia.eu (Postfix) with ESMTP id 840C0222712; Mon, 18 Nov 2019 14:44:14 +0100 (CET) X-Virus-Scanned: amavisd-new at yes Received: from mail.tinia.eu ([127.0.0.1]) by localhost (mail.tinia.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BmVZ6fgVl6NV; Mon, 18 Nov 2019 14:44:14 +0100 (CET) Received: from blemesh.cbl.lan (customer-93-189-143-66.com-com.it [93.189.143.66]) by mail.tinia.eu (Postfix) with ESMTPA id 57BC722270F; Mon, 18 Nov 2019 14:44:14 +0100 (CET) From: Daniele Biagetti To: linux-bluetooth@vger.kernel.org Cc: Daniele Subject: [PATCH 0/6] Add features and fix some undesired behaviour of meshctl Date: Mon, 18 Nov 2019 14:43:59 +0100 Message-Id: <20191118134405.20212-1-daniele.biagetti@cblelectronics.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Daniele The followings extend the features of meshctl, adding: * The Subscription Delete message to the configuration client=20 (as per Mesh Profile 4.3.2.21) * The Generic OnOff Set Unacknowledged message to the onoff client model * Generic Level Client Model, limited to the following messages: - generic level get and set - generic level set unacknowledged - generic level status * Generic Power OnOff Client except the Generic OnPowerUp Set Unacknowledged message They also contains two fixes: * The first one cames up when more than a client model is added to the local node. The received status messages are forwarded to all clients and they needs to be filtered within each client in order to avoid wrong reports on the bt shell * The second one replaces a return statment within the onoff=20 client model with a warning message when the user selects an unknown target address. For example it happens when the user=20 tries to send messages to a group address due to the fact that such addresses are not stored whitn the json database. Daniele (6): tools/mesh: Add onoff set unack message to onoff client model tools/mesh: Fix status messages processing tools/mesh: Fix unwanted return in onoff client model tools/mesh: Add subscription delete message to config client model tools/mesh: Add generic level model support tools/mesh: Add generic power onoff client model Makefile.tools | 4 +- tools/mesh/config-client.c | 40 +++++ tools/mesh/level-model.c | 298 +++++++++++++++++++++++++++++++++++ tools/mesh/level-model.h | 34 ++++ tools/mesh/local_node.json | 10 +- tools/mesh/node.c | 11 ++ tools/mesh/onoff-model.c | 52 ++++-- tools/mesh/onpowerup-model.c | 262 ++++++++++++++++++++++++++++++ tools/mesh/onpowerup-model.h | 34 ++++ tools/meshctl.c | 8 + 10 files changed, 734 insertions(+), 19 deletions(-) create mode 100644 tools/mesh/level-model.c create mode 100644 tools/mesh/level-model.h create mode 100644 tools/mesh/onpowerup-model.c create mode 100644 tools/mesh/onpowerup-model.h --=20 2.20.1