Commit 1bbfdf1d authored by Vikrant More's avatar Vikrant More Committed by Johan Hedberg
Browse files

samples: mesh/onoff-app: Enable persistent storage support



Enable persistent storage support in
samples/boards/nrf52/mesh/onoff-app.

Signed-off-by: default avatarVikrant More <vikrant8051@gmail.com>
parent 48b7f236
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -85,9 +85,7 @@ root element's unicast address as it is the only one that has a
configuration server model.

If meshctl is gracefully exited, it can be restarted and reconnected to
network 0x0. The board configuration is volatile and if the board is reset,
power cycled, or reprogrammed, it will have to be provisioned and configured
again.
network 0x0.

The meshctl utility also supports a onoff model client that can be used to
change the state of any LED that is bound to application key 0x1.
+9 −0
Original line number Diff line number Diff line
@@ -2,6 +2,15 @@
CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_FCB=y
CONFIG_SETTINGS=y
CONFIG_SETTINGS_FCB=y
CONFIG_BT_MESH_RPL_STORE_TIMEOUT=600

CONFIG_BOOT_BANNER=y
CONFIG_BUILD_TIMESTAMP=y

+5 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@
 */

#include <misc/printk.h>
#include <settings/settings.h>
#include <misc/byteorder.h>
#include <nrf.h>
#include <device.h>
@@ -590,6 +591,10 @@ static void bt_ready(int err)
		return;
	}

	if (IS_ENABLED(CONFIG_SETTINGS)) {
		settings_load();
	}

	bt_mesh_prov_enable(BT_MESH_PROV_GATT | BT_MESH_PROV_ADV);

	SYS_LOG_INF("Mesh initialized");