cancel
Showing results for 
Search instead for 
Did you mean: 

How to save #BluetoothMesh Models (Generic or Vendor) states on the flash of SoC & retrieve them after every reboot ?

vikrant more
Associate II
Posted on May 02, 2018 at 15:02

How to save &sharpBluetoothMesh Models (Generic or Vendor) states on BlueNRG_2 flash & retrieve them after every reboot ?

##bluetoothmesh
3 REPLIES 3
alok
Senior
Posted on May 03, 2018 at 13:24

Here are 2 approaches to it..

1. The Models implementation and message handling are available for users to modify. Also, the NVM interface is available. The developers can implement the handling based on what is needed.

2. The Generic model, provide messages to Get the status from the nodes. For example 'Generic OnOff Get',

'Generic Level Get'. This is already available in the SDK and no need to implement the saving of the status on flash

This also helps to sync the real status. For example, it may be possible that a light on a node has changed the status due to a message from a publishing node or any other reason. The status on the App can be updated using the 'Get ' message anytime. 

Posted on May 03, 2018 at 13:56

 ,

 ,

Hi Alok,

Thanks for such prompt response.

Are you pointing Drivers/BlueNRG1_Periph_Driver/BlueNRG1_flash.c as NVM interface ?

What will be the range of flash addresses we should use as ♯ EEPROM ?

( it should get protection from ♯ DFU_OTA, , like Mesh Keys &, Configuration data gets)

Posted on May 03, 2018 at 18:53

This can be managed by using the right configuration in the linker files for the application. You need to do correct settings of the address range you need to use from the linker file. So, for example these are the settings now in IAR

place at address mem:0x1007D000 { readonly section .appconfig };

place at address mem:0x1007E000 { readonly section .nvmbase_data };

Similarly, in the Keil project...the corresponding settings using the correct format. These are used in the Mesh application.

You can use (for example) the 0x1007C000 (or any other aligned address towards the end of the flash) for your specific application data storage.