From 31b164ccb1358f52a95bcbf0b46e2d750104e5a1 Mon Sep 17 00:00:00 2001 From: lly Date: Tue, 12 May 2020 11:21:57 +0800 Subject: [PATCH] ble_mesh: Not ignore msg when fast prov is enabled When fast provisioning is enabled, Provisioner shall not ignore messages from the nodes whose addresses are not in the provisioning database. Because other nodes which are not provisioned by the Primary Provisioner will send node address messages to the Primary Provisioner. --- components/bt/esp_ble_mesh/mesh_core/net.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/bt/esp_ble_mesh/mesh_core/net.c b/components/bt/esp_ble_mesh/mesh_core/net.c index 36308d9df9..eeccc6664a 100644 --- a/components/bt/esp_ble_mesh/mesh_core/net.c +++ b/components/bt/esp_ble_mesh/mesh_core/net.c @@ -1399,6 +1399,14 @@ static bool ready_to_recv(void) static bool ignore_net_msg(u16_t src, u16_t dst) { + if (IS_ENABLED(CONFIG_BLE_MESH_FAST_PROV)) { + /* When fast provisioning is enabled, the node addr + * message will be sent to the Primary Provisioner, + * which shall not be ignored here. + */ + return false; + } + if (IS_ENABLED(CONFIG_BLE_MESH_PROVISIONER) && bt_mesh_is_provisioner_en() && BLE_MESH_ADDR_IS_UNICAST(dst) && @@ -1409,6 +1417,7 @@ static bool ignore_net_msg(u16_t src, u16_t dst) * be ignored. */ if (!bt_mesh_provisioner_get_node_with_addr(src)) { + BT_INFO("Not found node address 0x%04x", src); return true; } }