Update to 0.7.0 goes wrong


#1

I’ve tried to update my Photon from 0.6.3 to 0.7.0.

The problem is that now it won’t connect to my WiFi. It also doesn’t respond to my own firmware that I upload offline (system manual mode to try different Wi-Fi modes).

Steps:

  • ‘particle update’
  • ‘particle serial identify’ says 0.7.0.
  • uploaded the tinker app ’ particle flash --usb tinker’
  • tried to claim, it says successful however it never connects to the cloud.

The ‘particle doctor’ fails as well on the select antenna part (skip that step and it fail on the ip as well):

? Select the antenna to use to connect to Wi-Fi Internal
The Doctor didn't complete sucesfully. undefined
> Please visit our community forums for help with this error:
https://community.particle.io/

I tried ‘particle serial inspect’ and that shows a FAIL error. However I don’t know how to solve that:

particle serial inspect
Platform: 6 - Photon
Modules
  Bootloader module #0 - version 11, main location, 16384 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 207, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #2 - version 207, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: FAIL
      System module #1 - version 207
      Bootloader module #0 - version 101
  User module #1 - version 2, main location, 131072 bytes max size
    UUID: 2BA4E71E840F596B812003882AAE7CA6496F1590CA4A049310AF76EAF11C943A
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 1
  empty - factory location, 131072 bytes max size

#2

It seems as though the bootloader could be a problem. Have you checked the notes of the release announcement? They mention that when it doesn’t connect to the cloud, you may need to update your bootloader:

Give that a shot and let us know if that helped?


#3

But how do I update the bootloader. The explanation doesn’t say which file I have to update? Where can I find the bootloader? Or what should be the command?

Note: P1/Photon Bootloader
The cloud will automatically update the bootloader on P1/Photon devices. If your device does not connect to the cloud, you should flash the bootloader to the device using particle flash --serial. This should be done after upgrading system firmware.


#4

It’s all there though :wink:

And there’s always this:
https://docs.particle.io/guide/tools-and-features/cli/photon/#flashing-over-serial-for-the-electron


#5

I saw ‘particle flash --serial’ command, but it gives the explanation. Don’t I have to select a certain file to flash?

Send firmware to your device
Usage: particle flash [options] [device|binary] [files...]

Global Options:
  -v, --verbose  Increases how much logging to display                                                      [count]
  -q, --quiet    Decreases how much logging to display                                                      [count]

Options:
  --cloud    Flash over the air to the device. Default if no other flag provided                          [boolean]
  --usb      Flash over USB using the DFU utility                                                         [boolean]
  --serial   Flash over a virtual serial port                                                             [boolean]
  --factory  Flash user application to the factory reset location. Only available for DFU                 [boolean]
  --force    Flash even when binary does not pass pre-flash checks                                        [boolean]

Examples:
  particle flash red                          Compile the source code in the current directory in the cloud and
                                              flash to device red
  particle flash green tinker                 Flash the default Tinker app to device green
  particle flash blue app.ino --target 0.6.3  Compile app.ino in the cloud using the 0.6.3 firmware and flash to
                                              device blue
  particle flash cyan firmware.bin            Flash the pre-compiled binary to device cyan
  particle flash --usb firmware.bin           Flash the binary over USB. The device needs to be in DFU mode
  particle flash --serial firmware.bin        Flash the binary over virtual serial port. The device needs to be in
                                              listening mode

When I do:
particle flash --serial firmware.bin

I get:

! PROTIP: Hold the SETUP button on your device until it blinks blue!
? Press ENTER when your device is blinking BLUE 

! serial: 
Error writing firmware...file does not exist and no known app found.
undefined

#6

You need to use the actual file name in place of the “firmware.bin”. Also, make sure you’re in the directory that file is in, otherwise the command line might not be able to find it.


#7

Ok, I’m looking for bootloader.bin but I can’t find it anywhere.

Why is it such a trouble to update the firmware, shouldn’t that be a flawless user experience for an average user? What do I do wrong?


#8

It usually is for 90+% of the people - unknown circumstances might interfere tho’

BTW, the link to the binaries always comes with the announcment post in Particle Firmware Updates Thread
It’s good to subscribe to this thread if you want to stay informed.

The actual binaries can be found here (as already also liked to by @Moors7)
https://github.com/particle-iot/firmware/releases/tag/v0.7.0

After download you need to find the downloaded file on your computer and flash it from there (or any more convenient place you choose to move it to) - we have no means to know where your box puts downloads and where you want downloaded files to reside after that.

No way to tell for us :wink:


#9

The strange thing is that I’ve tested it now with 3 Photon’s and every single one has this problem… So I’m curious what’s wrong with my system.

Before:

particle serial identify

Your device id is 3e003e000547353138383138
Your system firmware version is 0.6.1

MBP0515086:firmware kasperkamperman$ particle serial inspect
Platform: 6 - Photon
Modules
  Bootloader module #0 - version 11, main location, 16384 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 105, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #2 - version 105, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 105
  User module #1 - version 4, main location, 131072 bytes max size
    UUID: 7CAC146FD259EE57382D2A7316DC53DDDBE84D09DE6D2D31E20D26B2ED2DFC15
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 15
  User module #1 - version 3, factory location, 131072 bytes max size
    UUID: CEBC10B50446FEF7D5FD204610BD70B5457C04460E4625B9007CFFF7D0FC0028
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 9

AFTER particle update

particle serial identify:

Your device id is 3e003e000547353138383138
Your system firmware version is 0.7.0

particle serial inspect

Platform: 6 - Photon
Modules
  Bootloader module #0 - version 11, main location, 16384 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 207, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #2 - version 207, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: FAIL
      System module #1 - version 207
      Bootloader module #0 - version 101
  User module #1 - version 4, main location, 131072 bytes max size
    UUID: 7CAC146FD259EE57382D2A7316DC53DDDBE84D09DE6D2D31E20D26B2ED2DFC15
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 15
  User module #1 - version 3, factory location, 131072 bytes max size
    UUID: CEBC10B50446FEF7D5FD204610BD70B5457C04460E4625B9007CFFF7D0FC0028
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 9

Photon setup flashing cyan with a "quick red burst" (now orange burst) [Solved]
#10

Thanks for the pointer to the bootloader binary. I’ve missed that. I tried this and it worked!

particle flash --serial bootloader-0.7.0-photon.bin

now the inspector says:

 Bootloader module #0 - version 101, main location, 16384 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 207, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #2 - version 207, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 207
      Bootloader module #0 - version 101
  User module #1 - version 4, main location, 131072 bytes max size
    UUID: 7CAC146FD259EE57382D2A7316DC53DDDBE84D09DE6D2D31E20D26B2ED2DFC15
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 15
  User module #1 - version 3, factory location, 131072 bytes max size
    UUID: CEBC10B50446FEF7D5FD204610BD70B5457C04460E4625B9007CFFF7D0FC0028
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 9

#11

No idea why your updates failed to also update the bootloader.
I have updated several Photons (via OTA, CLI update & CLI all individual binaries) and Electrons/E-Series (CLI update & CLI all individual binaries).
And in no case I had any problem upgrading.

The only “issues” I had with devices that were previously flashed 0.8.0-rc.X or Electrons with ancient firmware versions to start with (explicitly downgraded first for the sake of the test) - but for these there are explicit upgrade notes in the respective community thread.


#12

I think there is a serious issue related to 0.7.0 in some way (I tried 5 Photons and all 5 have the same problem).

I now tried the noob way (so from the Web Ide) as mentioned here with another Photon. I did this to eliminated problems that could be caused by my local build environment. So the steps below where all done from build.particle.io.

Step 1:

One of the easiest and safest ways to update system firmware is to simply flash an application firmware that was compiled against a newer version of system firmware. The device will receive the incompatible firmware app, and use safe mode healer to automatically download the newer system modules.

In the Web IDE, this can be done by using the system firmware target dropdown, and choosing a version that is newer than what is currently on the device.

Steps taken:
Upload a script from build.particle.io

System firmware target: 0.7.0
On the device: 0.6.3

Result:
Some pink blinks (safe mode, firmware update etc.).
Then it ends with a rapidly blinked green light, to never come online again.

The particle serial inspect shows indeed a failure with system module #2 and User module #1.

System module #2 - version 205, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: FAIL
      System module #1 - version 205
      Bootloader module #0 - version 101
User module #1 - version 5, main location, 131072 bytes max size
    UUID: DBB6DC69DF547C841DEB73FB4CDADF8BA8773BA43B7C938D8FE626E8048B93EB
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: FAIL
      System module #2 - version 207
  empty - factory location, 131072 bytes max size

#13

Maybe a look into the server logs might show something interesting - @rickkas7?


#14

Photon 0.7.0 does not contain a boot loader in the system parts as previous versions did because there wasn’t room. It’s normally upgraded OTA if required because you flashed 0.7.0 by USB (serial or DFU). However, if you flash the upgrade before you configure WiFi, you’ll get into a situation where you can’t get the boot loader.

The workaround is to flash the boot loader manually (using —serial) before you do the system firmware update to 0.7.0.


#15

And what’s the rest of the output from the latest Particle build test? What version was system module 1 and the boot loader?


#16

I’ve just encountered what seems to be either the same or very similar problem.

Scenario (replicated on two Photons):

Prior state: 0.6.3 with functioning application firmware installed

Then…

  • New very minor tweak to application firmware made
  • Using desktop IDE, compiled and attempted to flash OTA – DIDN’T REALIZE DESKTOP IDE HAD JUST SWITCHED FROM 0.6.3 to 0.7.0 DEFAULT!!
  • Flash failed

Have since tried a bunch of things referenced on this thread, but can’t un-brick the Photon. It appears as if it may be trying to run the old (0.6.3-based) version of the app, but then runs into trouble. Eventually end up in flashing red panic state, with it then rebooting.

I’ve tried:

This reports “Flash success!” – and the web console says the device is reporting 0.7.0 system firmware (actually, console was reporting that before this command, too).

However, assuming the bootloader is on there successfully, I’m not able to figure out how to get the 0.7.0-based app flashed.

I’ve tried particle flash --serial photon_0.7.0_firmware_1522240404849.bin

I’ve tried particle device doctor, and that appeared to do something over DFU, but no noticeable change of state on the device (still trying to run old app).

How can I get these photons back into a usable state? I’m definitely not an expert in the Particle world, so any detailed pointers would be greatly appreciated.

More importantly, how can I get all my field-deployed Photons upgraded via OTA – simply can’t get to them all to do a serial-based bootloader upgrade, if that’s the current recommendation.

Also, as an aside, is there a way for me to pin the desktop IDE to a particular system firmware version, so I don’t unknowingly start building with a newer version, and accidentally brick a device in the field, as I appear to have done just now (thankfully these two weren’t in the field!)


#17

I really have serious issues with the 2 Photons that I tried with the OTA. There is no way I can connect them to the cloud again.

I tried the complete particle doctor sequence. It seems hard to get it in listen mode (pressing setup for 4 seconds).

I also tried the Particle app on Android.

When I succeed and try adding the Photon with my app I walk through all the steps. It starts blinking green (the app says everything went successfully, however this is simply not true, the device doesn’t do any light blue cloud fade).

The inspect result:

Platform: 6 - Photon
Modules
  Bootloader module #0 - version 101, main location, 16384 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 207, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #2 - version 207, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 207
      Bootloader module #0 - version 101
  User module #1 - version 2, main location, 131072 bytes max size
    UUID: 2BA4E71E840F596B812003882AAE7CA6496F1590CA4A049310AF76EAF11C943A
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 1
  empty - factory location, 131072 bytes max size

The only way to connect to the cloud was reverting to 0.6.3 by downloading the [version 0.6.3] binaries (https://github.com/particle-iot/firmware/releases/tag/v0.6.3).

particle flash --usb system-part1-0.6.3-photon.bin
particle flash --usb system-part2-0.6.3-photon.bin

After I did that the device directly connected to the cloud after I finished the DFU mode, without any additional steps (tested with the both Photons successfully).


#18

When I succeed and try adding the Photon with my app I walk through all the steps. It starts blinking green (the app says everything went successfully, however this is simply not true, the device doesn’t do any light blue cloud fade).

I’m not sure how it happened, but it sounds like the Wi-Fi configuration might have been bad. Or you might have run into a situation where the wrong DCD (where the Wi-Fi configuration is stored) was being used. It might be worthwhile to try clearing the Wi-Fi credentials by holding down SETUP but 10+ seconds after it starts blinking blue, until it blinks blue rapidly, then do:

particle serial wifi

to configure the WI-Fi settings again. This shouldn’t be necessary but it would be a good data point to see if that has an effect or not when you get stuck in blinking green with 0.7.0.


#19

This is surprising.
Normally if your update before had applied the two 0.7.0 system parts correctly, this should not have worked as you’d normally need to downgrade by applying the system parts in reverse order.

Could it be that your WiFi was flaky while appying the OTA updates? The multiple reboots during application of system parts, bootloader and application code should not get interrupted.


#20

Ok retry. I think my WiFi wasn’t flaky or 0.7.0 does different things with WiFi… All my 0.6.3 firmware devices work reliable, but to be sure I did reset my router before trying it out again.

Started from a connect Photon (0.6.3) to the Cloud.

  • Go to build.particle.io to upload blink (target at 0.7.0).
  • Event log below
  • Stuck on fast blinking green.
  • Holding setup for 10 seconds doesn’t do anything…
  • run particle doctor
  • the doctor get’s stuck on the wifi antenna selector
? Select the antenna to use to connect to Wi-Fi Internal
The Doctor didn't complete sucesfully. undefined
> Please visit our community forums for help with this error:
https://community.particle.io/
  • now the >10 seconds pressing the setup button works and it’s blinking dark blue.
  • followed your tip and did particle serial wifi
particle serial wifi
? Should I scan for nearby Wi-Fi networks? Yes
? Select the Wi-Fi network with which you wish to connect your device: WiFi-Kamperman
? Should I try to auto-detect the wireless security type? Yes
> Detected WPA(PSK/AES/AES) WPA2(PSK/AES/AES) security
? Wi-Fi Password #####
Done! Your device should now restart.
  • still a fast green blinking led
  • particle serial inspect (missing bootloader) (why doesn’t the doctor detect this?)
  • particle flash --serial bootloader-0.7.0-photon.bin
  • white fading LED
  • again particle serial wifi
  • fast blinking green LED
  • particle doctor doing all the steps till “The Doctor has restored your device!” (so with a correct bootloader I won’t get the undefined error in the doctor).
  • fast blinking green LED
  • reverting to 0.6.3 (particle flash --usb system-part1-0.6.3-photon.bin/particle flash --usb system-part2-0.6.3-photon.bin)
  • press reset
  • nice light blue fading status led… (with firmware 0.6.3).

EVENT log:

EVENT NAMEDATAPUBLISHED AT
Show 0 new event
device went offlineno dataMarch 28th at 3:56:31 pm
{"data":"offline","ttl":60,"published_at":"2018-03-28T13:56:31.536Z","coreid":"410024000447343339373536","name":"spark/status"}
spark/flash/statussuccess March 28th at 3:55:31 pm
{"data":"success ","ttl":60,"published_at":"2018-03-28T13:55:31.274Z","coreid":"410024000447343339373536","name":"spark/flash/status"}
spark/flash/statusstarted March 28th at 3:55:23 pm
{"data":"started ","ttl":60,"published_at":"2018-03-28T13:55:23.901Z","coreid":"410024000447343339373536","name":"spark/flash/status"}
spark/status/safe-mode{"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":"DB88160717098B7A06661AD00F6011F1F08745A352FA0D2B9F034ECFFA4533E0","f":"u","n":"1","v":5,"d":[{"f":"s","n":"2","v":207,"_":""}]},{"s":131072,"l":"f","vc":30,"vv":0,"d":[]}]}March 28th at 3:55:21 pm
{"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\":\"DB88160717098B7A06661AD00F6011F1F08745A352FA0D2B9F034ECFFA4533E0\",\"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-03-28T13:55:21.460Z","coreid":"410024000447343339373536","name":"spark/status/safe-mode"}
spark/device/last_resetuserMarch 28th at 3:55:20 pm
{"data":"user","ttl":60,"published_at":"2018-03-28T13:55:20.170Z","coreid":"410024000447343339373536","name":"spark/device/last_reset"}
device came onlineno dataMarch 28th at 3:55:20 pm
{"data":"online","ttl":60,"published_at":"2018-03-28T13:55:20.003Z","coreid":"410024000447343339373536","name":"spark/status"}
spark/flash/statussuccess March 28th at 3:55:01 pm
{"data":"success ","ttl":60,"published_at":"2018-03-28T13:55:01.086Z","coreid":"410024000447343339373536","name":"spark/flash/status"}
spark/flash/statusstarted March 28th at 3:55:00 pm
{"data":"started ","ttl":60,"published_at":"2018-03-28T13:55:00.899Z","coreid":"410024000447343339373536","name":"spark/flash/status"}
spark/device/app-hashDB88160717098B7A06661AD00F6011F1F08745A352FA0D2B9F034ECFFA4533E0March 28th at 3:54:56 pm
{"data":"DB88160717098B7A06661AD00F6011F1F08745A352FA0D2B9F034ECFFA4533E0","ttl":60,"published_at":"2018-03-28T13:54:56.994Z","coreid":"410024000447343339373536","name":"spark/device/app-hash"}
spark/status/safe-mode{"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":"DB88160717098B7A06661AD00F6011F1F08745A352FA0D2B9F034ECFFA4533E0","f":"u","n":"1","v":5,"d":[{"f":"s","n":"2","v":207,"_":""}]},{"s":131072,"l":"f","vc":30,"vv":0,"d":[]}]}March 28th at 3:54:56 pm
{"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\":\"DB88160717098B7A06661AD00F6011F1F08745A352FA0D2B9F034ECFFA4533E0\",\"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-03-28T13:54:56.993Z","coreid":"410024000447343339373536","name":"spark/status/safe-mode"}
spark/device/last_resetuserMarch 28th at 3:54:55 pm
{"data":"user","ttl":60,"published_at":"2018-03-28T13:54:55.717Z","coreid":"410024000447343339373536","name":"spark/device/last_reset"}
device came onlineno dataMarch 28th at 3:54:55 pm
{"data":"online","ttl":60,"published_at":"2018-03-28T13:54:55.540Z","coreid":"410024000447343339373536","name":"spark/status"}
spark/flash/statussuccess March 28th at 3:54:51 pm
{"data":"success ","ttl":60,"published_at":"2018-03-28T13:54:51.341Z","coreid":"410024000447343339373536","name":"spark/flash/status"}
spark/flash/statusstarted March 28th at 3:54:50