In ZentriOS, a default configuration file is a CSV file containing a list of ZentriOS settings.
The default configuration file MUST be named:
default_config.csv for ZentriOS to automatically load the settings file after an OTA or a factory reset.
an OTA is successfully completed
the factory reset GPIO is asserted for 5s
The command load default_config.csv is issued. In this case, any config file can be specified as the argument to load.
When the default_config.csv is applied after an OTA, a 'soft' factory reset is done:
Resets NVM flash
Loads factory default values from firmware into Configuration RAM
Loads variable values stored in NVM Backup into Configuration RAM
Loads platform specific settings from OTP memory into Configuration RAM
Loads variable values from the
default_config.csv file into Configuration RAM
Saves Configuration RAM to NVM flash
The reset is done so the device is in a known state before the default config is applied: That means once default config is applied, all the variables set in NVM are erased, except the critical setting that are backed up. A list of backed up settings may be found here:
In case developer is using ZentriOS SDK to write his own native app, to keep configurations safe across resets it is recommended to:
1) Convert all the settings in default_config.csv to 'application settings':
2) Remove the default_config.csv from the bundle
3) On ZAP startup, check if the default_config.csv exists and delete it if so. This ensures the old default_config is not applied on the next OTA
The default_config.csv is largely intended for non-ZAP applications. Storing the settings as 'application settings' will achieve the same effect.