Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6890529yba; Tue, 14 May 2019 15:57:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqybqwcYwibj5aTvanO49NDovl2RfAyIeYrqDaFuH8YVHD/Ip7lYSwTl0gJ6vqeRNDHPH2yT X-Received: by 2002:a62:6d47:: with SMTP id i68mr43615079pfc.189.1557874640614; Tue, 14 May 2019 15:57:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557874640; cv=none; d=google.com; s=arc-20160816; b=NThW9cPDBaAPeJ0sFJC5dEFXogP6AXYfyf4MZ97mDLSIBHpD2v7DgkRXnHYluAtIEz TBHtsZcjpXOvNNn2DTTzs8avc3vPTP+RJrWvKz1AxuPi232gCbsy2fd0C9WdJhfyAKTS vKuMaH9KhAcPHMqeSsdSSlpfA6tpF57pieSoaFkNpzuUfBJByVt02p+/9PagP9ZLQcaZ 1qDVD2dH8ihnqfEhdtTKbs1AaDQ5RZc8AN03+RmjWMbGrkoiXbU+NFacsFkWSR6uYiMg 3jbbCAGVz3H29WbJ1zSn/HtgRVlEqXNNbH2Xi0MVq8JZLctvR6GEfw1ruuROxJFbtPCf iOqA== 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:cc:to:from; bh=uUAbb1fkkTGVKT9GzXmPWyMUuYLU3LMAOLWSkprMkXE=; b=J4nrWYhF8mB08zhCw26sp81cfy9KXWmUnZopb1/Z6aZwWt1ERGqRABGZe2Cui0AXOi KI6cWjzeYYfJJ8IB/n0OckqalO5rr8CcyONK3oh8UheSZeKC09ys0Zre/egqRl6i4swK +/dYQnj0ZTKc7gDYinr0y/OsH108nvskqCe0LVi0kQkz2tbdttzO4TDgZ1f4bNNa7fI3 zYRNvlEf5RCXoiDxazLo0/sd+3ATeczzc6Nb8ZJAS6SIQSEftwlsV2mJiyDKpBGbKARX K0FqJnjyTMTFVmEoIrl+kXRTmPsBwnpc+RBl0PxuX2avcik/1E78d8vDQxUCiFSKwMfX GULQ== 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 z21si144184pga.403.2019.05.14.15.57.03; Tue, 14 May 2019 15:57: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; 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 S1726251AbfENWyK (ORCPT + 99 others); Tue, 14 May 2019 18:54:10 -0400 Received: from mga03.intel.com ([134.134.136.65]:22776 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726148AbfENWyK (ORCPT ); Tue, 14 May 2019 18:54:10 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2019 15:54:10 -0700 X-ExtLoop1: 1 Received: from ingas-nuc1.sea.intel.com ([10.252.138.236]) by orsmga003.jf.intel.com with ESMTP; 14 May 2019 15:54:10 -0700 From: Inga Stotland To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, johan.hedberg@gmail.com, luiz.dentz@gmail.com, Inga Stotland Subject: [PATCH BlueZ 1/2] mesh: Add check for org.bluez.mesh.Provisioner1 interface Date: Tue, 14 May 2019 15:54:06 -0700 Message-Id: <20190514225407.29594-2-inga.stotland@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190514225407.29594-1-inga.stotland@intel.com> References: <20190514225407.29594-1-inga.stotland@intel.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 adds check for the presence of org.bluez.mesh.Provisioner1 interface when collecting information about mesh application that is received in callback of GetManagedObjects() method. Set "provisioner" flag in the node structure to trueto indicate that the node may act aa a provisioner. --- mesh/mesh.h | 3 ++- mesh/node.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mesh/mesh.h b/mesh/mesh.h index ff4e04fa1..9b63500d1 100644 --- a/mesh/mesh.h +++ b/mesh/mesh.h @@ -2,7 +2,7 @@ * * BlueZ - Bluetooth protocol stack for Linux * - * Copyright (C) 2018 Intel Corporation. All rights reserved. + * Copyright (C) 2018-2019 Intel Corporation. All rights reserved. * * * This library is free software; you can redistribute it and/or @@ -24,6 +24,7 @@ #define MESH_ELEMENT_INTERFACE "org.bluez.mesh.Element1" #define MESH_APPLICATION_INTERFACE "org.bluez.mesh.Application1" #define MESH_PROVISION_AGENT_INTERFACE "org.bluez.mesh.ProvisionAgent1" +#define MESH_PROVISIONER_INTERFACE "org.bluez.mesh.Provisioner1" #define ERROR_INTERFACE "org.bluez.mesh.Error" typedef void (*prov_rx_cb_t)(void *user_data, const uint8_t *data, diff --git a/mesh/node.c b/mesh/node.c index 3618595b3..21dcfd007 100644 --- a/mesh/node.c +++ b/mesh/node.c @@ -2,7 +2,7 @@ * * BlueZ - Bluetooth protocol stack for Linux * - * Copyright (C) 2017-2018 Intel Corporation. All rights reserved. + * Copyright (C) 2017-2019 Intel Corporation. All rights reserved. * * * This library is free software; you can redistribute it and/or @@ -1492,6 +1492,9 @@ static void get_managed_objects_cb(struct l_dbus_message *msg, void *user_data) &properties); if (!agent) goto fail; + } else if (!strcmp(MESH_PROVISIONER_INTERFACE, + interface)) { + node->provisioner = true; } } } -- 2.21.0