Bluetooth: Mesh: Trigger GATT update when subnet is added

When the node is part of only one subnet, it starts Network ID
advertisements with infinite timeout. It is not an issue when using
legacy advertising and extended advertising with shared set for local
messages and GATT because any message will stop advertisements. However,
when a separate adv set is used for GATT advertisements,
`struct bt_le_ext_adv_cb.start` callback won't be called, but the
implementation relies on that callback to switch to a next subnet.
Calling `bt_mesh_adv_gatt_update()` stop GATT advertisement so that the
implementation can switch to the next subnet.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit is contained in:
Pavel Vasilyev 2022-09-21 15:42:31 +02:00 committed by Carles Cufí
commit e4921cc84d

View file

@ -632,6 +632,7 @@ static void subnet_evt(struct bt_mesh_subnet *sub, enum bt_mesh_key_evt evt)
}
} else {
bt_mesh_proxy_beacon_send(sub);
bt_mesh_adv_gatt_update();
}
}