Upgrade and Recovery

WiConnect is part of a larger sophisticated application framework installed on all ACKme modules. The framework provides a hardened bootloader, read/write file system, safemode recovery mechanism, and secure over-the-air (OTA) upgrade capability.

Secure OTA Upgrade

ACKme manages a secure online OTA server that offers each ACKme module with the ability to securely upgrade individual files, applications or an entire firmware bundle. The OTA command is used to upgrade module firmware using the OTA server on this port.

The OTA process is secured by industry standard TLS1.0/HTTPS using server and client certificates that forces

HTTPS is the same security your web browser uses to make secure transactions with your bank over the internet. ACKme adds an additional layer of security, since the ACKme OTA server checks the unique security certificate and hardware UUID of each ACKme device that requests an upgrade.

If an OTA upgrade 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 module 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 variable.

It is easy to return the module to normal operation when the module is in safe mode. Follow the command sequence in the following table and your module will be back to normal in no time.

WiConnect Commands Description

get system.safemode
faults_print
faults_reset
faults_print
reboot

<- Check if the module is in safemode? 0 = no, 1 = yes
<- Print a list of faults (8 faults should print)
<- Reset faults counter
<- Check there are no more faults after reset
<- Reboot the module

In some cases, a misconfigured module may quickly return to safe mode since the module may be inadvertently setup to invoke a fault. If this occurs, we recommend the module is returned to factory reset.

Once in safe mode, the module runs the upgrade application. The upgrade app provides the ability to upgrade the firmware, or switch back to WiConnect using the upgrade_app faults_reset command and system.boot_app variable.

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

CommandAbbr
factory_resetfac
faults_print faup
faults_reset faur
file_delete fde
format_flash format
get get
ls ls
ota ota
reboot reboot
save save
set set
version ver

Safe Mode Variables

VariableAbbrAccess
bus.data_bus bu dget/set
bus.log_bus bu lget/set
bus.mode bu mget/set
network.ca_cert ne cget/set
network.dhcp.enabled ne d eget/set
network.dhcp.timeout ne d tget/set
network.dns ne dget
network.gateway ne gget
network.ip ne iget
network.netmask ne nget
network.status ne sget
ota.host ot hget/set
ota.port ot pget/set
spi.master.active_gpio sp m gget/set
spi.master.active_level sp m lget/set
static.dns st dget/set
static.gateway st gget/set
static.ip st iget/set
static.netmask st nget/set
system.boot_app sy bget/set
system.cmd.buffered sy c bget/set
system.cmd.echo sy c eget/set
system.cmd.header_enabled sy c hget/set
system.cmd.mode sy c mset
system.cmd.prompt_enabled sy c pget/set
system.cmd.timestamp sy c tget/set
system.print_level sy pget/set
system.safemode sy sget
system.safemode_disabled sy dget/set
system.uuid sy uget
system.version sy vget
tcp.client.connect_timeout tc c tget/set
tcp.client.local_port tc c pget/set
tcp.client.retries tc c rget/set
tcp.client.retry_period tc c wget/set
uart.baud ua bget/set
uart.data ua dget/set
uart.flow ua fget/set
uart.parity ua pget/set
uart.stop ua sget/set
wlan.antenna wl aget/set
wlan.hide_passkey wl hget/set
wlan.join.retries wl j rget/set
wlan.join.timeout wl j tget/set
wlan.mac wl mget
wlan.passkey wl pget/set
wlan.rate.protocol wl r pget/set
wlan.rate.transmit wl r xget/set
wlan.roam.threshold wl r tget/set
wlan.scan.active_dwell wl s aget/set
wlan.scan.channel_mask wl s mget/set
wlan.scan.home_dwell wl s hget/set
wlan.scan.num_probes wl s nget/set
wlan.scan.passive_dwell wl s pget/set
wlan.scan.retries wl s rget/set
wlan.scan.type wl s tget/set
wlan.security wl cget/set
wlan.ssid wl sget/set
wlan.tx_power wl tget/set

Factory Reset

Factory reset returns the module to a known state.

The module may be factory reset by GPIO or by the WiConnect factory_reset command.

After a successful factory reset, all variables are set to factory defaults and the module reboots.

Factory Reset GPIO

The factory reset GPIO is GPIO 0 on all ACKme modules. To perform a factory reset by GPIO, hold the factory reset pin high for more than 10 seconds through a hardware reset.

GPIO 0 is wired to Button 1 on the Wallaby and Moray evaluation boards. To manually reset an ACKme WiConnect evaluation board, hold down Button 1, press the Reset button, then continue to hold Button 1 for 10 seconds.

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 Command

Use the factory_reset command to perform a factory reset.

To avoid accidental factory reset, the Wi-Fi MAC address must be provided when calling the factory_reset command.

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.