From 092ec2302408a57365b971d9dfb8f9cb68bd4126 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 16 Oct 2017 07:41:24 +0300 Subject: [PATCH] Bluetooth: Mesh: Fix missing feature bits The feature bits for Proxy and Friend were missing in the composition data and heart beat messages. Signed-off-by: Johan Hedberg --- subsys/bluetooth/host/mesh/cfg.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/subsys/bluetooth/host/mesh/cfg.c b/subsys/bluetooth/host/mesh/cfg.c index 132a1789daa..0730557a95e 100644 --- a/subsys/bluetooth/host/mesh/cfg.c +++ b/subsys/bluetooth/host/mesh/cfg.c @@ -83,6 +83,10 @@ static void hb_send(struct bt_mesh_model *model) feat |= BT_MESH_FEAT_RELAY; } + if (bt_mesh_gatt_proxy_get() == BT_MESH_GATT_PROXY_ENABLED) { + feat |= BT_MESH_FEAT_PROXY; + } + if (bt_mesh_friend_get() == BT_MESH_FRIEND_ENABLED) { feat |= BT_MESH_FEAT_FRIEND; } @@ -143,6 +147,14 @@ static int comp_get_page_0(struct net_buf_simple *buf) feat |= BT_MESH_FEAT_RELAY; } + if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY)) { + feat |= BT_MESH_FEAT_PROXY; + } + + if (IS_ENABLED(CONFIG_BT_MESH_FRIEND)) { + feat |= BT_MESH_FEAT_FRIEND; + } + if (IS_ENABLED(CONFIG_BT_MESH_LOW_POWER)) { feat |= BT_MESH_FEAT_LOW_POWER; }