Skip to content

Commit

Permalink
Bluetooth: mesh: Fix scene recall for Light Ctrl server
Browse files Browse the repository at this point in the history
The Light Lightness Control Server was not correctly handling scene
recalls. The Server now resumes the Lightness Controller automatically
after a scene recall, fixing the known issue NCSDK-30033.

Signed-off-by: Stine Akredalen <[email protected]>
  • Loading branch information
akredalen committed Dec 20, 2024
1 parent 84ec4da commit e709db3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
7 changes: 0 additions & 7 deletions doc/nrf/releases_and_maturity/known_issues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,6 @@ The issues in this section are related to the :ref:`ug_bt_mesh` protocol.

.. rst-class:: v2-9-0-nRF54H20-rc1 v2-9-0 v2-8-0 v2-7-0 v2-6-2 v2-6-1 v2-6-0 v2-5-3 v2-5-2 v2-5-1 v2-5-0 v2-4-4 v2-4-3 v2-4-2 v2-4-1 v2-4-0 v2-3-0 v2-2-0 v2-1-4 v2-1-3 v2-1-2 v2-1-1 v2-1-0 v2-0-2 v2-0-1 v2-0-0

NCSDK-30033: :ref:`bt_mesh_light_ctrl_srv_readme` never resumes the Lightness Controller automatically after it is disabled by a scene recall
This occurs when the Lightness Controller is running and a scene recall for a scene with the Lightness Controller disabled is received.
Recalling this scene causes the Lightness Controller to stop running.
Unlike when setting the Lightness state through other messages, the Lightness Controller will not automatically resume after the time set in the :kconfig:option:`CONFIG_BT_MESH_LIGHT_CTRL_SRV_RESUME_DELAY` Kconfig option.

**Workaround:** Explicitly re-enable the Lightness Controller using a Lightness Controller client to resume it after it is disabled by a scene recall.

.. rst-class:: v2-8-0 v2-7-0

NCSDK-29893: Adding dynamic names to devices does not work
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ Bluetooth® LE
Bluetooth Mesh
--------------

|no_changes_yet_note|
* Updated:

* The :ref:`bt_mesh_light_ctrl_srv_readme` model to automatically resume the Lightness Controller
after recalling a scene. (``NCSDK-30033`` known issue).


DECT NR+
--------
Expand Down
4 changes: 3 additions & 1 deletion subsys/bluetooth/mesh/light_ctrl_srv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1541,8 +1541,10 @@ static void scene_recall(const struct bt_mesh_model *model, const uint8_t data[]
.transition = transition,
};

bool restart = is_enabled(srv);

ctrl_disable(srv);
if (atomic_test_bit(&srv->flags, FLAG_RESUME_TIMER)) {
if (restart || atomic_test_bit(&srv->flags, FLAG_RESUME_TIMER)) {
schedule_resume_timer(srv);
}
lightness_srv_change_lvl(srv->lightness, NULL, &set, &status, true);
Expand Down

0 comments on commit e709db3

Please sign in to comment.