Skip to content

Commit f514c14

Browse files
committed
samples: mesh: dfu: fix boot warnings in samples
- Added state check in dfu_target_image_confirm() to prevent "Wrong state" warning. - Reduced model extension list sizes to fix relation list warning. Signed-off-by: Stine Åkredalen <[email protected]>
1 parent 4eb29ff commit f514c14

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

samples/bluetooth/mesh/dfu/common/src/dfu_target.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,5 +289,7 @@ void dfu_target_image_confirm(void)
289289
}
290290

291291
/* Switch DFU Server state to the Idle state if it was in the Applying state. */
292-
bt_mesh_dfu_srv_applied(&dfu_srv);
292+
if (dfu_srv.update.phase == BT_MESH_DFU_PHASE_APPLYING) {
293+
bt_mesh_dfu_srv_applied(&dfu_srv);
294+
}
293295
}

samples/bluetooth/mesh/dfu/distributor/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ CONFIG_BT_MESH_SHELL=y
5656
CONFIG_BT_MESH_DK_PROV=y
5757
CONFIG_BT_MESH_PROXY_USE_DEVICE_NAME=y
5858
CONFIG_BT_MESH_MODEL_EXTENSIONS=y
59+
CONFIG_BT_MESH_MODEL_EXTENSION_LIST_SIZE=3
5960

6061
# Bluetooth Mesh models
6162
CONFIG_BT_MESH_BLOB_SRV=y

samples/bluetooth/mesh/dfu/target/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ CONFIG_BT_MESH_GATT_PROXY=y
5757
CONFIG_BT_MESH_DK_PROV=y
5858
CONFIG_BT_MESH_PROXY_USE_DEVICE_NAME=y
5959
CONFIG_BT_MESH_MODEL_EXTENSIONS=y
60+
CONFIG_BT_MESH_MODEL_EXTENSION_LIST_SIZE=1
6061

6162
# Bluetooth Mesh models
6263
CONFIG_BT_MESH_BLOB_SRV=y

0 commit comments

Comments
 (0)