We have many Photon devices in the field and want to OTA upgrade to 0.7.0 to pick up the latest WiFi stack (to work around what I believe is a WiFi related memory leak in 0.6.3).
To ensure the upgrade is reliable I have been running repeats of flashing a “blank” 0.7.0 app (which publishes the firmware revision, freemem and local ip address) on a 0.6.3 system and unfortunately, far too often the update does not complete successfully / gets stuck in safe mode.
I have tried initiating “particle flash <device_name> <app_name>.bin” again while the device is stuck and often that will push the upgrade through but with enough trials, even repeated attempts will fail with the photon stuck in safe mode.
When stuck, the device is ping-able on the local network and the connection to the cloud is fine, but clearly the device is not able to finish the OTA flash upgrade. I’ve read in this forum about repeated reboots during upgrade running out of IP addresses but in my case the IP address assigned each time is the same.
Any shared experience / insight / workarounds would be greatly appreciated! It’s a show stopper for us if we can’t make OTA upgrade work seamlessly.
Below is the console log for the case of repeated attempts to refresh where it gets stuck updating system part 1:
event: version-freemem-ipaddr
data: {"data":"0.6.3-57952-192.168.168.58","ttl":60,"published_at":"2018-06-08T17:40:50.707Z","coreid":"270021000a51353335323536"}
event: spark/status
data: {"data":"online","ttl":60,"published_at":"2018-06-08T17:40:56.638Z","coreid":"270021000a51353335323536"}
event: spark/device/last_reset
data: {"data":"user","ttl":60,"published_at":"2018-06-08T17:40:56.831Z","coreid":"270021000a51353335323536"}
event: spark/status/safe-mode
data: {"data":"{\"f\":[],\"v\":{},\"p\":6,\"m\":[{\"s\":16384,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"b\",\"n\":\"0\",\"v\":11,\"d\":[]},{\"s\":262144,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"s\",\"n\":\"1\",\"v\":109,\"d\":[]},{\"s\":262144,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"s\",\"n\":\"2\",\"v\":109,\"d\":[{\"f\":\"s\",\"n\":\"1\",\"v\":109,\"_\":\"\"}]},{\"s\":131072,\"l\":\"m\",\"vc\":30,\"vv\":26,\"u\":\"73A78B585FA378B79B815E2CEED078DAE51D08E63C8F7A9C1B189CA4211B24B1\",\"f\":\"u\",\"n\":\"1\",\"v\":5,\"d\":[{\"f\":\"s\",\"n\":\"2\",\"v\":207,\"_\":\"\"}]},{\"s\":131072,\"l\":\"f\",\"vc\":30,\"vv\":0,\"d\":[]}]}","ttl":60,"published_at":"2018-06-08T17:40:58.095Z","coreid":"270021000a51353335323536"}
event: spark/device/app-hash
data: {"data":"73A78B585FA378B79B815E2CEED078DAE51D08E63C8F7A9C1B189CA4211B24B1","ttl":60,"published_at":"2018-06-08T17:40:58.096Z","coreid":"270021000a51353335323536"}
event: spark/safe-mode-updater/updating
data: {"data":"1","ttl":60,"published_at":"2018-06-08T17:40:58.371Z","coreid":"particle-internal"}
event: spark/flash/status
data: {"data":"started ","ttl":60,"published_at":"2018-06-08T17:41:00.636Z","coreid":"270021000a51353335323536"}
event: spark/flash/status
data: {"data":"success ","ttl":60,"published_at":"2018-06-08T17:41:00.867Z","coreid":"270021000a51353335323536"}
event: spark/status
data: {"data":"online","ttl":60,"published_at":"2018-06-08T17:41:18.688Z","coreid":"270021000a51353335323536"}
event: spark/device/last_reset
data: {"data":"user","ttl":60,"published_at":"2018-06-08T17:41:18.880Z","coreid":"270021000a51353335323536"}
event: spark/status/safe-mode
data: {"data":"{\"f\":[],\"v\":{},\"p\":6,\"m\":[{\"s\":16384,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"b\",\"n\":\"0\",\"v\":11,\"d\":[]},{\"s\":262144,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"s\",\"n\":\"1\",\"v\":205,\"d\":[]},{\"s\":262144,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"s\",\"n\":\"2\",\"v\":109,\"d\":[{\"f\":\"s\",\"n\":\"1\",\"v\":109,\"_\":\"\"}]},{\"s\":131072,\"l\":\"m\",\"vc\":30,\"vv\":26,\"u\":\"73A78B585FA378B79B815E2CEED078DAE51D08E63C8F7A9C1B189CA4211B24B1\",\"f\":\"u\",\"n\":\"1\",\"v\":5,\"d\":[{\"f\":\"s\",\"n\":\"2\",\"v\":207,\"_\":\"\"}]},{\"s\":131072,\"l\":\"f\",\"vc\":30,\"vv\":0,\"d\":[]}]}","ttl":60,"published_at":"2018-06-08T17:41:20.120Z","coreid":"270021000a51353335323536"}
event: spark/safe-mode-updater/updating
data: {"data":"2","ttl":60,"published_at":"2018-06-08T17:41:20.327Z","coreid":"particle-internal"}
event: spark/flash/status
data: {"data":"started ","ttl":60,"published_at":"2018-06-08T17:41:22.571Z","coreid":"270021000a51353335323536"}
event: spark/flash/status
data: {"data":"success ","ttl":60,"published_at":"2018-06-08T17:41:29.289Z","coreid":"270021000a51353335323536"}
event: spark/status
data: {"data":"online","ttl":60,"published_at":"2018-06-08T17:41:41.903Z","coreid":"270021000a51353335323536"}
event: spark/device/last_reset
data: {"data":"user","ttl":60,"published_at":"2018-06-08T17:41:42.062Z","coreid":"270021000a51353335323536"}
event: spark/status/safe-mode
data: {"data":"{\"f\":[],\"v\":{},\"p\":6,\"m\":[{\"s\":16384,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"b\",\"n\":\"0\",\"v\":11,\"d\":[]},{\"s\":262144,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"s\",\"n\":\"1\",\"v\":205,\"d\":[]},{\"s\":262144,\"l\":\"m\",\"vc\":30,\"vv\":26,\"f\":\"s\",\"n\":\"2\",\"v\":205,\"d\":[{\"f\":\"s\",\"n\":\"1\",\"v\":205,\"_\":\"\"},{\"f\":\"b\",\"n\":\"0\",\"v\":101,\"_\":\"\"}]},{\"s\":131072,\"l\":\"m\",\"vc\":30,\"vv\":26,\"u\":\"73A78B585FA378B79B815E2CEED078DAE51D08E63C8F7A9C1B189CA4211B24B1\",\"f\":\"u\",\"n\":\"1\",\"v\":5,\"d\":[{\"f\":\"s\",\"n\":\"2\",\"v\":207,\"_\":\"\"}]},{\"s\":131072,\"l\":\"f\",\"vc\":30,\"vv\":0,\"d\":[]}]}","ttl":60,"published_at":"2018-06-08T17:41:43.348Z","coreid":"270021000a51353335323536"}
event: spark/safe-mode-updater/updating
data: {"data":"0","ttl":60,"published_at":"2018-06-08T17:41:43.373Z","coreid":"particle-internal"}
event: spark/flash/status
data: {"data":"started ","ttl":60,"published_at":"2018-06-08T17:41:44.518Z","coreid":"270021000a51353335323536"}
event: spark/flash/status
data: {"data":"success ","ttl":60,"published_at":"2018-06-08T17:41:44.951Z","coreid":"270021000a51353335323536"}
event: spark/status
data: {"data":"online","ttl":60,"published_at":"2018-06-08T17:41:49.920Z","coreid":"270021000a51353335323536"}
event: spark/device/last_reset
data: {"data":"user","ttl":60,"published_at":"2018-06-08T17:41:50.078Z","coreid":"270021000a51353335323536"}
event: spark/status/safe-mode
data: {"data":"{\"f\":[],\"v\":{},\"p\":6,\"m\":[{\"s\":16384,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"b\",\"n\":\"0\",\"v\":101,\"d\":[]},{\"s\":262144,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"s\",\"n\":\"1\",\"v\":205,\"d\":[]},{\"s\":262144,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"s\",\"n\":\"2\",\"v\":205,\"d\":[{\"f\":\"s\",\"n\":\"1\",\"v\":205,\"_\":\"\"},{\"f\":\"b\",\"n\":\"0\",\"v\":101,\"_\":\"\"}]},{\"s\":131072,\"l\":\"m\",\"vc\":30,\"vv\":26,\"u\":\"73A78B585FA378B79B815E2CEED078DAE51D08E63C8F7A9C1B189CA4211B24B1\",\"f\":\"u\",\"n\":\"1\",\"v\":5,\"d\":[{\"f\":\"s\",\"n\":\"2\",\"v\":207,\"_\":\"\"}]},{\"s\":131072,\"l\":\"f\",\"vc\":30,\"vv\":0,\"d\":[]}]}","ttl":60,"published_at":"2018-06-08T17:41:51.355Z","coreid":"270021000a51353335323536"}
event: spark/safe-mode-updater/updating
data: {"data":"1","ttl":60,"published_at":"2018-06-08T17:41:51.574Z","coreid":"particle-internal"}
event: spark/flash/status
data: {"data":"started ","ttl":60,"published_at":"2018-06-08T17:41:53.815Z","coreid":"270021000a51353335323536"}
event: spark/flash/status
data: {"data":"success ","ttl":60,"published_at":"2018-06-08T17:41:59.450Z","coreid":"270021000a51353335323536"}
event: spark/status
data: {"data":"online","ttl":60,"published_at":"2018-06-08T17:42:03.827Z","coreid":"270021000a51353335323536"}
event: spark/device/last_reset
data: {"data":"user","ttl":60,"published_at":"2018-06-08T17:42:04.024Z","coreid":"270021000a51353335323536"}
event: spark/status/safe-mode
data: {"data":"{\"f\":[],\"v\":{},\"p\":6,\"m\":[{\"s\":16384,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"b\",\"n\":\"0\",\"v\":101,\"d\":[]},{\"s\":262144,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"s\",\"n\":\"1\",\"v\":205,\"d\":[]},{\"s\":262144,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"s\",\"n\":\"2\",\"v\":205,\"d\":[{\"f\":\"s\",\"n\":\"1\",\"v\":205,\"_\":\"\"},{\"f\":\"b\",\"n\":\"0\",\"v\":101,\"_\":\"\"}]},{\"s\":131072,\"l\":\"m\",\"vc\":30,\"vv\":26,\"u\":\"73A78B585FA378B79B815E2CEED078DAE51D08E63C8F7A9C1B189CA4211B24B1\",\"f\":\"u\",\"n\":\"1\",\"v\":5,\"d\":[{\"f\":\"s\",\"n\":\"2\",\"v\":207,\"_\":\"\"}]},{\"s\":131072,\"l\":\"f\",\"vc\":30,\"vv\":0,\"d\":[]}]}","ttl":60,"published_at":"2018-06-08T17:42:05.265Z","coreid":"270021000a51353335323536"}
event: spark/safe-mode-updater/updating
data: {"data":"1","ttl":60,"published_at":"2018-06-08T17:42:05.485Z","coreid":"particle-internal"}
event: spark/flash/status
data: {"data":"started ","ttl":60,"published_at":"2018-06-08T17:42:07.746Z","coreid":"270021000a51353335323536"}
event: spark/flash/status
data: {"data":"success ","ttl":60,"published_at":"2018-06-08T17:42:13.560Z","coreid":"270021000a51353335323536"}
event: spark/status
data: {"data":"online","ttl":60,"published_at":"2018-06-08T17:42:18.858Z","coreid":"270021000a51353335323536"}
event: spark/device/last_reset
data: {"data":"user","ttl":60,"published_at":"2018-06-08T17:42:19.035Z","coreid":"270021000a51353335323536"}
event: spark/status/safe-mode
data: {"data":"{\"f\":[],\"v\":{},\"p\":6,\"m\":[{\"s\":16384,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"b\",\"n\":\"0\",\"v\":101,\"d\":[]},{\"s\":262144,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"s\",\"n\":\"1\",\"v\":205,\"d\":[]},{\"s\":262144,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"s\",\"n\":\"2\",\"v\":205,\"d\":[{\"f\":\"s\",\"n\":\"1\",\"v\":205,\"_\":\"\"},{\"f\":\"b\",\"n\":\"0\",\"v\":101,\"_\":\"\"}]},{\"s\":131072,\"l\":\"m\",\"vc\":30,\"vv\":26,\"u\":\"73A78B585FA378B79B815E2CEED078DAE51D08E63C8F7A9C1B189CA4211B24B1\",\"f\":\"u\",\"n\":\"1\",\"v\":5,\"d\":[{\"f\":\"s\",\"n\":\"2\",\"v\":207,\"_\":\"\"}]},{\"s\":131072,\"l\":\"f\",\"vc\":30,\"vv\":0,\"d\":[]}]}","ttl":60,"published_at":"2018-06-08T17:42:20.289Z","coreid":"270021000a51353335323536"}
event: spark/safe-mode-updater/updating
data: {"data":"1","ttl":60,"published_at":"2018-06-08T17:42:20.533Z","coreid":"particle-internal"}
event: spark/flash/status
data: {"data":"started ","ttl":60,"published_at":"2018-06-08T17:42:22.781Z","coreid":"270021000a51353335323536"}
event: spark/flash/status
data: {"data":"success ","ttl":60,"published_at":"2018-06-08T17:42:28.366Z","coreid":"270021000a51353335323536"}
...