Skip to content

Commit 8af0dec

Browse files
committed
Bluetooth: Mesh: Shell: Clear CDB on local reset
Adds feature that clears the CDB entry on local reset. Signed-off-by: Anders Storrø <[email protected]>
1 parent 31ee91a commit 8af0dec

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

doc/connectivity/bluetooth/api/mesh/shell.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ General configuration
132132
``mesh reset-local``
133133
--------------------
134134

135-
Reset the local mesh node to its initial unprovisioned state.
135+
Reset the local mesh node to its initial unprovisioned state. This command will also clear the Configuration Database (CDB) if present.
136136

137137
Target
138138
======

subsys/bluetooth/mesh/shell/shell.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,9 @@ static int cmd_init(const struct shell *sh, size_t argc, char *argv[])
424424

425425
static int cmd_reset(const struct shell *sh, size_t argc, char *argv[])
426426
{
427+
#if defined(CONFIG_BT_MESH_CDB)
428+
bt_mesh_cdb_clear();
429+
# endif
427430
bt_mesh_reset();
428431
shell_print(sh, "Local node reset complete");
429432

0 commit comments

Comments
 (0)