Photon is stuck in auto-update

Yesterday i unwraped another Photon (an older one). I could claim the device without problems until it breathed cyan. But i could not flash my program. So i tried a lot : particle update, update per dfu …

Now my Photon blinks cyan with red flashes.

I found Will not complete setup via app [SOLVED] , but the files are not longer there.

What can i do next ?

I do work with manjaro-linux

Welcome to the Particle Command Line Interface!
Version 1.29.0

dfu-util 0.9

Andreas

You could try particle doctor since your symptom description (if it’s really red not magenta) sounds like a keys issue which should be solved by the doctor (if not “semi-manual” key update is easy too)

I set DFU-Mode (yellow) then:

particle device doctor -v

The Device Doctor will put your device back into a healthy state
It will:

  • Upgrade system firmware
  • Flash the default Tinker app
  • Reset the device and server keys
  • Clear the Wi-Fi settings

The Doctor will operate on your Photon connected over USB
You’ll be asked to put your device in DFU mode several times to reset different settings.

Updating system firmware

Put the device in DFU mode
Tap RESET/RST while holding MODE/SETUP until the device blinks yellow.
? Select Continue when ready Continue

Your device is ready for a system update.
This process should take about 30 seconds. Here it goes!

▌ Updating system firmware on the device…dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device…
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08020000, size = 262016
Downloadng syste[=========================] 100% 262016 bytes
Download done.
File downloaded successfully
▐ Updating system firmware on the device…dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device…
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08060000, size = 255264
Downloadng syste[=========================] 100% 255264 bytes
Download done.
File downloaded successfully
▌ Updating system firmware on the device…dfu-util: Error during download get_status

An error occurred while attempting to update the system firmware of your device

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!

dfu-util: Error during download get_status

Please visit our community forums for help with this error:
https://community.particle.io/
The Doctor didn’t complete sucesfully. Cannot read property ‘code’ of undefined
Please visit our community forums for help with this error:
https://community.particle.io/

particle keys doctor 370022000f4734xxxxxxxxx

New Key Created!
Saved!
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device…
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #1
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "DCT Flash "
Downloading to address = 0x00000022, size = 609
Download [=========================] 100% 609 bytes
Download done.
File downloaded successfully
dfu-util: Error during download get_status
Make sure your device is in DFU mode (blinking yellow), and that your computer is online.
Error: Error writing key to device… dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!

dfu-util: Error during download get_status

the it blinks again cyan with red

Can you describe the kind of red (how many, how fast, …) or post a link to a video (YouTube, vimeo, …)?

You could also try the semi-manual key refresh (with some extra preps) in DFU Mode

particle flash --usb tinker
partcle update
particle flash --usb tinker 
particle keys server
particle keys doctor <insertYourDeviceIDhere>
1 Like

After Reset:

1, white
2.green slow blinking
3. green fast blinking

then in a loop:

cyan blinking 2-3x
cyan fast blinking 3-6x
red 1x

after a while:
in a loop

cyan blinking 45-50x
cyan fast blinking 3-6x
red 1x

Andreas

start with yellow blinking

particle flash -v --usb tinker

dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device…
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash "
Downloading to address = 0x080a0000, size = 3952
Download [=========================] 100% 3952 bytes
Download done.
File downloaded successfully
dfu-util: Error during download get_status

Error writing firmware…dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!

dfu-util: Error during download get_status

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

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

Optionen:
–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]

Beispiele:
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

nothing changed so far: cyan blinking with red

start with yellow blinking

particle update -v

Your device is ready for a system update.
This process should take about 30 seconds. Here it goes!

▌ Updating system firmware on the device…dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device…
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08020000, size = 262016
Downloadng syste[=========================] 100% 262016 bytes
Download done.
File downloaded successfully
▄ Updating system firmware on the device…dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device…
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08060000, size = 255264
Downloadng syste[=========================] 100% 255264 bytes
Download done.
File downloaded successfully
▄ Updating system firmware on the device…dfu-util: Error during download get_status

! An error occurred while attempting to update the system firmware of your device:

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!

dfu-util:
Error during download get_status

Please visit our community forums for help with this error:
https://community.particle.io/
Cannot read property ‘code’ of undefined
TypeError: Cannot read property ‘code’ of undefined
at dfuError (/usr/lib/node_modules/particle-cli/dist/cmd/update.js:91:17)
at dfu.findCompatibleDFU.then.catch.err (/usr/lib/node_modules/particle-cli/dist/cmd/update.js:22:11)
at tryCatchReject (/usr/lib/node_modules/particle-cli/node_modules/when/lib/makePromise.js:845:30)
at runContinuation1 (/usr/lib/node_modules/particle-cli/node_modules/when/lib/makePromise.js:804:4)
at Rejected.when (/usr/lib/node_modules/particle-cli/node_modules/when/lib/makePromise.js:625:4)
at Pending.run (/usr/lib/node_modules/particle-cli/node_modules/when/lib/makePromise.js:483:13)
at Scheduler._drain (/usr/lib/node_modules/particle-cli/node_modules/when/lib/Scheduler.js:62:19)
at Scheduler.drain (/usr/lib/node_modules/particle-cli/node_modules/when/lib/Scheduler.js:27:9)
at process._tickCallback (internal/process/next_tick.js:176:11) [ ‘TypeError: Cannot read property ‘code’ of undefined’,
’ at dfuError (/usr/lib/node_modules/particle-cli/dist/cmd/update.js:91:17)’,
’ at dfu.findCompatibleDFU.then.catch.err (/usr/lib/node_modules/particle-cli/dist/cmd/update.js:22:11)’,
’ at tryCatchReject (/usr/lib/node_modules/particle-cli/node_modules/when/lib/makePromise.js:845:30)’,
’ at runContinuation1 (/usr/lib/node_modules/particle-cli/node_modules/when/lib/makePromise.js:804:4)’,
’ at Rejected.when (/usr/lib/node_modules/particle-cli/node_modules/when/lib/makePromise.js:625:4)’,
’ at Pending.run (/usr/lib/node_modules/particle-cli/node_modules/when/lib/makePromise.js:483:13)’,
’ at Scheduler._drain (/usr/lib/node_modules/particle-cli/node_modules/when/lib/Scheduler.js:62:19)’,
’ at Scheduler.drain (/usr/lib/node_modules/particle-cli/node_modules/when/lib/Scheduler.js:27:9)’,
’ at process._tickCallback (internal/process/next_tick.js:176:11)’ ]

now: cyan blinking with red

start with yellow blinking

particle flash -v --usb tinker

gives exactly the same response as above

ends with cyan blinking and red

Now things become interesting.

Chances are that your CLI installation got corrupted, but that’s another story.
You can do the whole update stuff step by step
First download the system binaries and bootloader for the Photon from here


Then flash these in DFU Mode

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

Then in Listening Mode

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

Then try the this again in DFU Mode

particle keys server
particle keys doctor <insertYourDeviceIDhere>

If this doesn’t help try installing CLI on a fresh machine - if you are using Windows make sure to use the CLI Windows Installer and not npm
With Win10 uncheck the “Install Serial Drivers” (or however it’s called) option as Win10 brings it’s own drivers and is gererally happier with these.

start with yellow blinking

particle keys -v server

dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device…
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #1
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "DCT Flash "
Downloading to address = 0x00000822, size = 512
Download [=========================] 100% 512 bytes
Download done.
File downloaded successfully
Okay! New keys in place, your device will not restart.

end with yellow blinking

particle keys -v doctor 370022000f47343432313031

New Key Created!
Saved!
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device…
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #1
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "DCT Flash "
Downloading to address = 0x00000022, size = 609
Download [=========================] 100% 609 bytes
Download done.
File downloaded successfully
dfu-util: Error during download get_status
Make sure your device is in DFU mode (blinking yellow), and that your computer is online.
Error: Error writing key to device… dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!

dfu-util: Error during download get_status

Ends with cyan blinking and red

Can you post a video of the blinking (at least 40sec from power up onwards)?

You can also open a support ticket at support.particle.io and reference this thread.

start in yellow blinking:

particle flash -v --usb /home/andreas/Downloads/system-part1-0.7.0-photon.bin

dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device…
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08020000, size = 262016
Download [=========================] 100% 262016 bytes
Download done.
File downloaded successfully

Flash success!

particle flash -v --usb /home/andreas/Downloads/system-part2-0.7.0-photon.bin

dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device…
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface…
Setting Alternate Setting #0
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08060000, size = 255264
Download [=========================] 100% 255264 bytes
Download done.
File downloaded successfully

Flash success!

Ends in yellow blinking

----- Switch to listening mode

Start with blue blinking

particle flash -v --serial /home/andreas/Downloads/bootloader-0.7.0-photon.bin

! PROTIP: Hold the SETUP button on your device until it blinks blue!
? Press ENTER when your device is blinking BLUE
sending file: /home/andreas/Downloads/bootloader-0.7.0-photon.bin

Flash success!

endy with cyan blinking with red

This did the trick:

**** - Tech Support (Particle )

Apr 27, 10:07 PDT

It seems like you may have a keys issue.

Put the Photon into Listening mode (blinking blue) by holding down SETUP until it blinks blue. Then issue the CLI command:

particle serial identify
Save the Device ID; you’ll need it later.

Then put the Photon in DFU mode by holding down both the RESET and SETUP buttons, releasing RESET and continuing to hold down SETUP until it blinks yellow and issue the commands below, in order.

particle keys server
particle keys doctor YOUR_DEVICE_ID
If you get this error under Windows:

‘openssl’ is not recognized as an internal or external command, operable program or batch file.
and you have used the CLI installer as described above, it may work if you do:

cd c:\OpenSSL-Win32\bin
particle keys doctor YOUR_DEVICE_ID
There are additional tips for a missing openssl error on this page, including tips for Mac OS X and Linux.

Sorry for the difficulties,
**** @ Particle

I am working under manjaro linux, so no ssl-error was issued

The device is breating cyan, and responds now to programming with atom

Andreas

This looks also very much like what I suggested before (twice) :wink:

Yes, and i did exactly as you suggested. But this time it worked. Maybe it was the starting identify that prepared the photon. I compared the logs.

This time there was no dfu-util: Error during download get_status . But i dont know why.

1 Like

There’s definitely a problem with the device doctor on Windows. I’ve had this error twice over a span of about a month with two different devices on two different machines:

Okay! New keys in place, your device will not restart.
The Doctor didn’t complete sucesfully. Make sure your device is in DFU mode (bli
nking yellow), and that your computer is online.: Error creating keys: Command f
ailed: C:\Windows\system32\cmd.exe /s /c “openssl genrsa -out 000000[redacted]000000_rsa_new.pem 1024”
‘openssl’ is not recognized as an internal or external command,
operable program or batch file.

That’s not a problem with device doctor but with your setup.

OpenSSL nees to be installed on your system and be part of the PATH environment variable on your system.

Not sure about that - if I install the Particle tools using a setup wizard - shouldn’t it sort out the path etc? It has before…

I’ve made the changes as per:-

Add openssl to the System Path

Procedure
1
On your View Transfer Server host, right-click My Computer and select Properties.

a
On the Advanced tab, click Environment Variables.

b
In the System variables group, select Path and click Edit.

c
Type the paths to the JRE and Apache directories in the Variable Value text box. Use a semicolon (:wink: to separate each entry from other entries in the text box.

For example: C:\OpenSSL-Win32\bin

2
Click OK until the Windows System Properties dialog box closes.

If the installation was once done via Particle Windows CLI installer and didn’t quite succeede (for whatever reason) subsequent runs seem to be unable to remedy that anymore - that’s some issue Particle intends to address when there is more time to iron out glitches.

BTW, you stated that you made the changes, but you didn’t say whether that changed anything.
To check manually, just open a CMD or PowerShell terminal and try to run openssl directly.
It should be recognised as external command and greet you with an OpenSSL> prompt.
If it doesn’t the PATH wasn’t set quite right - you might need to check the complete PATH for some other possible error.

2 Likes

Thanks @ScruffR - I’ve tested it (using your method) and it works. But thank you, I didn’t know how to test it. So I’m glad I know it works.

1 Like