Issuing 'reboot' command is very similar to resetting the module via RESET pin. Though, there is a couple of differences here:
1. RESET_N is tied to the MCU hardware signal. When the pin is assert the MCU is immediately reset, there is no software intervention. While the 'reboot' command will bring down the network (close open stream and disassociate from WLAN/disconnect softap client) and cleanup any running hardware (e.g. stop PWMs, ADCs) before performing a software reset of the MCU.
2. Toggling the RESET_N pin does not cause any text output on the serial bus, whereas issuing a 'reboot' command prints the version string.
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.