ble_mesh: Fix not update prov addr in fast prov

When using fast provisioning, the Provisioner functionality
will be enabled. Unicast addresses within the pre-allocated
range will be used for provisioning nodes. And during the
address assignment, the allocated unicast address will be
checked that if it's duplicated with other nodes addresses
and the Provisioner's own addresses.
So before starting using fast provisioning, we need to update
the Provisioner address.
This commit is contained in:
lly 2020-05-09 10:07:45 +08:00
parent 06d445759a
commit 295a9eea82

View file

@ -661,6 +661,7 @@ u8_t bt_mesh_set_fast_prov_action(u8_t action)
if (IS_ENABLED(CONFIG_BLE_MESH_PB_GATT)) {
bt_mesh_provisioner_pb_gatt_enable();
}
bt_mesh_provisioner_set_primary_elem_addr(bt_mesh_primary_addr());
bt_mesh_provisioner_set_prov_bearer(BLE_MESH_PROV_ADV, false);
bt_mesh_provisioner_fast_prov_enable(true);
bt_mesh_atomic_or(bt_mesh.flags, BIT(BLE_MESH_PROVISIONER) | BIT(BLE_MESH_VALID_PROV));