Update and Recovery
ZentriOS is part of a larger sophisticated application framework installed on all ZentriOS devices. The framework provides a hardened bootloader, read/write file system, safemode recovery mechanism, and secure over-the-air (OTA) update capability.
Secure OTA Update
Zentri manages a secure online OTA server that offers each ZentriOS device with the ability to securely update individual files, applications or an entire firmware bundle. The OTA command is used to update device firmware.
The OTA process is secured by industry standard TLS/HTTPS using server and client certificates that forces
- ZentriOS devices to verify the identity of the Zentri OTA server; and
- the Zentri OTA server to verify the identity of each individual ZentriOS device.
Each ZentriOS device is uniquely identified by a 128-bit hardware universally unique identifier (UUID).
HTTPS is the same security your web browser uses to make secure transactions with your bank over the internet. Zentri adds an additional layer of security, since the Zentri OTA server checks the unique security certificate and hardware UUID of each ZentriOS device that requests an update.
If an OTA update fails to complete for some reason, you can resume it later. Rejoin the network and run the ota command again.
Safe Mode
Safe mode operation is guaranteed in the unlikely event the device is configured in a way that causes repeated and/or unexpected reboots. The bootloader automatically switches to safe mode after eight exceptions occur with the offending boot application. Safe mode is indicated by the system.safemode.status variable.
It is easy to return the device to normal operation when the device is in safe mode. Follow the command sequence in the following table and your device will be back to normal in no time.
ZentriOS Commands | Description |
---|---|
|
|
In some cases, a misconfigured device may quickly return to safe mode since the device may be inadvertently setup to invoke a fault. If this occurs, we recommend the device is returned to factory reset.
Once in safe mode, the device boots into the kernel. The kernel provides the ability to update the firmware, or switch back to ZentriOS using the faults_reset
command.
For a detailed discussion of recovery procedures, see the Recovery from Safemode application note.
Commands and Variables Available in Safe Mode
In safe mode a subset of the commands and variables is available.
Safe Mode Commands
Safe Mode Variables
- bus.mode
- network.tls.ca_cert
- system.cmd.echo
- system.cmd.header_enabled
- system.cmd.mode
- system.cmd.prompt_enabled
- system.print_level
- system.safemode.disabled
- system.safemode.status
- system.uuid
- system.version
- tcp.client.connect_timeout
- tcp.client.local_port
- tcp.client.retries
- tcp.client.retry_period
- uart.baud
- uart.data
- uart.flow
- uart.parity
- uart.stop
- wlan.dhcp.enabled
- wlan.hide_passkey
- wlan.join.retries
- wlan.join.timeout
- wlan.mac
- wlan.network.dns
- wlan.network.gateway
- wlan.network.ip
- wlan.network.netmask
- wlan.network.status
- wlan.passkey
- wlan.rate.protocol
- wlan.ssid
- wlan.static.dns
- wlan.static.gateway
- wlan.static.ip
- wlan.static.netmask
- wlan.tx_power
Factory Reset
Factory reset returns the device to a known state.
The device may be factory reset by GPIO or by the ZentriOS factory_reset command.
After a successful factory reset, all variables are set to factory defaults and the device reboots.
See Configuration and Setup, Resetting Variable Values for details of reset types and the reset process.
Factory Reset GPIO
The factory reset GPIO is GPIO 0 on all ZentriOS devices. To perform a factory reset by GPIO:
- hold the factory reset pin high for more than 10 seconds through a hardware reset.
Note: GPIO 0 always acts as the factory reset GPIO. GPIO 0 may be configured to initialize to another GPIO function, but the factory reset function takes priority over other functions.
Factory Reset with Zentri Evaluation Board Buttons
GPIO 0 is wired to Button 1 on the Zentri Wallaby, Moray and Moray 106 evaluation boards. To manually reset a ZentriOS evaluation board:
- hold down Button 1
- while continuing to press Button 1, press and release the Reset button
- continue to press Button 1 for 10 seconds
- release Button 1
Factory Reset Command
Use the factory_reset command to perform a factory reset. To avoid accidental factory reset, the device Wi-Fi MAC address must be provided:
- issue get wlan.mac to obtain the device MAC address
- then issue the factory_reset command with the returned MAC address as its argument:
factory_reset <MAC address>
Web App Recovery
In the event that the Web App does not work, due to a damaged file structure or misconfiguration, you can use the Web App Recovery system to regain access to the network and restore the Web App files. See the Web App Recovery application note.