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