From d4037ce6a10c14dd3d27e10e825b8a82f98150fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Storr=C3=B8?= Date: Wed, 25 Oct 2023 11:08:21 +0200 Subject: [PATCH] Bluetooth: Mesh: Correct pack of net idx hb_status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ensures correct packing of net idx in Heartbeat Publication Status messages on the Configuration Server. Reference to net idx packing format: MshPRTv1.1 section 4.3.1.1 Signed-off-by: Anders Storrø --- subsys/bluetooth/mesh/cfg_srv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/bluetooth/mesh/cfg_srv.c b/subsys/bluetooth/mesh/cfg_srv.c index d9df5550720..1684748ba83 100644 --- a/subsys/bluetooth/mesh/cfg_srv.c +++ b/subsys/bluetooth/mesh/cfg_srv.c @@ -2274,7 +2274,7 @@ static int hb_pub_send_status(struct bt_mesh_model *model, net_buf_simple_add_u8(&msg, bt_mesh_hb_log(pub->period)); net_buf_simple_add_u8(&msg, pub->ttl); net_buf_simple_add_le16(&msg, pub->feat); - net_buf_simple_add_le16(&msg, pub->net_idx); + net_buf_simple_add_le16(&msg, pub->net_idx & 0xfff); } if (bt_mesh_model_send(model, ctx, &msg, NULL, NULL)) {