Skip to content

Commit b9f776d

Browse files
Andrewpinifabiobaltieri
authored andcommitted
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 c7621d7 commit b9f776d

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
@@ -522,6 +522,9 @@ static int cmd_init(const struct shell *sh, size_t argc, char *argv[])
522522

523523
static int cmd_reset(const struct shell *sh, size_t argc, char *argv[])
524524
{
525+
#if defined(CONFIG_BT_MESH_CDB)
526+
bt_mesh_cdb_clear();
527+
# endif
525528
bt_mesh_reset();
526529
shell_print(sh, "Local node reset complete");
527530

0 commit comments

Comments
 (0)