I did some more research and found the documentation.
The overview
https://github.com/mongoose-os-libs/ota-shadow states
- On success, reboot to the new firmware
- After reboot, commit the new firmware after the successful AWS IoT handshake
- If AWS IoT handshake does not happen during 5 minutes (the default commit timeout), rollback to the old firmare
The commit does not seem to be happening for me. I am seeing this.
[Jun 4 10:21:00.436] mgos_provision_state:43 Current state: 2 -> 3
[Jun 4 10:21:00.447] net.c:62 MQTT_EV_MQTT_CONNACK (ret_code: 0)
[Jun 4 10:21:00.447] net.c:27 gateway alive gw/sti_B4E62DD60069, published: yes, msg: {"alive": 1}
[Jun 4 10:21:00.517] net.c:78 MQTT_EV_MQTT_PUBACK (msg_id: 2)
[Jun 4 10:21:00.627] mgos_aws_shadow.c:294 Subscribed
[Jun 4 10:21:00.634] mgos_ota_core.c:936 Update state: 300
Am I doing something wrong?