2018-05-02 06:02 AM
How to save &sharpBluetoothMesh Models (Generic or Vendor) states on BlueNRG_2 flash & retrieve them after every reboot ?
##bluetoothmesh2018-05-03 04:24 AM
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 flashThis 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.
2018-05-03 06:56 AM
,
,
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)
2018-05-03 11:53 AM
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.