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


#124

Cyan/red… Does it blink red for a few times? It sounds like the connection to the :cloud: is not successful.


#125

Thanks,

Yes. Blinks cyan, then red for a few times, then back to cyan. Yeah cloud connection not working. What casues this? How do I fix it?


#126

Maybe @Dave can help to see if this device has been attempting to reach the :cloud: with your deviceID?


#127

@until_arch sorry that first time I provisioned the wrong key for you… please try connecting again by resetting your Photon. If it doesn’t work please wait for instructions.


#128

I still have same problem too, davemil help!


#129

Please report bugs to dfu-util@lists.gnumonks.org

Found DFU: [2b04:d006] ver=0200, devnum=19, cfg=1, intf=0, alt=1, name="@DCT Flash /0x00000000/01016Kg", serial=“00000000010C"
Found DFU: [2b04:d006] ver=0200, devnum=19, cfg=1, intf=0, alt=0, name=”@Internal Flash /0x08000000/03
016Ka,01016Kg,01064Kg,07*128Kg", serial=“00000000010C”

only anomaly i see , tried everything i saw online, dfu refuses some commands because of duplicate ids, but does report new keys successful, but no problem cure,

C:>particle serial identify

Your device id is 26002e001647343337363432
Your system firmware version is 0.4.9


#130

What colour sequence is your RGB led showing?


#131

Final state is quick flashing cyan. goes through occasional red bursts after initial connection. can provide video.

C:>particle keys address
running dfu-util -l
Found DFU device 2b04:d006
running dfu-util -d 2b04:d006 -a 1 -s 2082:512 -U C:\Users\davmi\AppData\Local\Temp\116215-7104-1px9fql.der

tcp://device.spark.io:5683


#132

@davemil, has the Photon ever connected successfully to the :cloud: before?


#133

Yes

downloaded bad code and subsequent software crash caused lost wifi creds etc. cloud lost afterwards.Tried to rerun setup instead of doing wifi restore.


#134

Can you place the device in safe mode and see if it connects properly? Before that, do a particle update and particle flash --usb tinker, both in DFU mode.


#135

Still no joy. Ran all successfully. After dfu update, tinker flash, particle setup, safe mode still quick flashes cyan with initial red flashes.
Even tried keys doctor… same result. I was not able to load tinker in dfu mode.

C:>dfu-util -D tinker-v0.4.9-photon.bin
dfu-util 0.8
More than one DFU capable USB device found! Try `–list’ and specify the serial number or disconnect all but one device.
Found DFU: [2b04:d006] ver=0200, devnum=60, cfg=1, intf=0, alt=1, name="@DCT Flash /0x00000000/01016Kg", serial=“00000000010C"
Found DFU: [2b04:d006] ver=0200, devnum=60, cfg=1, intf=0, alt=0, name=”@Internal Flash /0x08000000/03
016Ka,01016Kg,01064Kg,07*128Kg", serial=“00000000010C”

So loaded it via particle serial flash.


#136

Hey BDub - thanks. I reset the Photon. The device is back online, flashes fine. I’m good to go. Particle folks have been great!


#137

I had this same problem with my electron after trying to flash a new firmware.

BTW- I’m running ubuntu 15.10.

I put my device in DFU mode and ran “particle keys doctor” but I kept getting:

   > sudo particle keys doctor wanderer
. . .
    attempting to add a new public key for device wanderer
    Error sending public key to server: Permission Denied
    Make sure your device is in DFU mode (blinking yellow), and that your computer is online.

I noticed that my particle cli version is not the latest:

> particle --version
1.10.0

So I upgraded with:

> sudo -E npm install -g particle-cli
> particle --version
1.11.0

Still didn’t work due to same error uploading keys to server.

So I put my device in listening mode and checked serially

> particle serial identify
Your device id is 37002#################
Your IMEI is 3531############
Your ICCID is 8934###########
Your system firmware version is 0.4.8

When I use the device id instead of the device name it now works:

> sudo particle keys doctor 37002#################
running dfu-util -l
Found DFU device 2b04:d00a
running dfu-util -l
Found DFU device 2b04:d00a
running openssl ecparam -name prime256v1 -genkey -out 370021000c51343334363138_ec_new.pem
running openssl ec -in 37002#################_ec_new.pem -pubout -out 37002#################_ec_new.pub.pem
running openssl ec -in 37002#################_ec_new.pem -outform DER -out 37002#################_ec_new.der
New Key Created!
running dfu-util -l
Found DFU device 2b04:d00a
running dfu-util -l
Found DFU device 2b04:d00a
running dfu-util -d 2b04:d00a -a 1 -s 3106:192 -U backup_ec_37002#################_ec_new.der
running openssl ec -in backup_ec_37002#################_ec_new.der -inform DER -pubout -out backup_ec_37002#################_ec_new.pub.pem
Saved!
checking file 37002#################_ec_new.der
spawning dfu-util -d 2b04:d00a -a 1 -i 0 -s 3106:leave -D 37002#################_ec_new.der
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

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:d00a
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 = 0x00000c22, size = 122
Download	[=========================] 100%          122 bytes
Download done.
File downloaded successfully
Saved!
running openssl ec -inform PEM -in 37002#################_ec_new.pub.pem -pubout -outform PEM -out /tmp/116217-14807-ao32td.pub.pem
running openssl ec -pubin -inform PEM -in 370021000c51343334363138_ec_new.pub.pem -pubout -outform PEM -out /tmp/116217-14807-ao32td.pub.pem
attempting to add a new public key for device 37002#################
submitting public key succeeded!
Okay!  New keys in place, your device should restart.

Now it’s breathing cyan.


#138

Tried everything in this thread multiple times…

I must have Satan’s Photon. Tried Multiple Public keys, mykeys, new keys, factory reset, flashed tinker, nothing works.

However, it was flashing cyan fast red, but when I particle updated it, it is now .50 and cyan flash orange! (not that this is better) I tried everything again, but same result!

2) Release only the RESET/RST button while continuing to hold the MODE/SETUP but
ton.

3) Release the MODE/SETUP button once the device begins to blink yellow.

Error saving key to device... No DFU device found

C:\>particle keys load mykey
running dfu-util -l
Found DFU device 2b04:d006
running dfu-util -l
Found DFU device 2b04:d006
running dfu-util -d 2b04:d006 -a 1 -s 34:612 -U backup_rsa_mykey.der
running openssl rsa -in backup_rsa_mykey.der -inform DER -pubout -out backup_rsa
_mykey.pub.pem
Saved!
checking file mykey.der
spawning dfu-util -d 2b04:d006 -a 1 -i 0 -s 34 -D mykey.der
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

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 = 0

Download        [                         ]   0%            0 bytesFile download
ed successfully
File too short for DFU suffix
A valid DFU suffix will be required in a future dfu-util release!!!
Saved!

C:\>particle keys send 30 mykey.pub.pem
Couldn't find mykey.pub.pub.pem

C:\>particle keys send 30 mykey
Couldn't find mykey.pub.pem

C:\>particle keys send 30 mykey.der
running openssl rsa -inform DER -in mykey.der -pubout -outform PEM -out C:\Users
\kreilly\AppData\Local\Temp\116418-9052-aaoto1.pub.pem
running openssl rsa -pubin -inform DER -in mykey.der -pubout -outform PEM -out C
:\Users\kreilly\AppData\Local\Temp\116418-9052-aaoto1.pub.pem
running openssl ec -inform DER -in mykey.der -pubout -outform PEM -out C:\Users\
kreilly\AppData\Local\Temp\116418-9052-aaoto1.pub.pem
running openssl ec -pubin -inform DER -in mykey.der -pubout -outform PEM -out C:
\Users\kreilly\AppData\Local\Temp\116418-9052-aaoto1.pub.pem
Error sending public key to server: Error: Command failed: C:\Windows\system32\c
md.exe /s /c "openssl ec -pubin -inform DER -in mykey.der -pubout -outform PEM -
out C:\Users\kreilly\AppData\Local\Temp\116418-9052-aaoto1.pub.pem"
WARNING: can't open config file: ssl/openssl.cnf
read EC key
unable to load Key
8364:error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long:opens
sl\crypto\asn1\asn1_lib.c:157:


C:\>dfu-util -d 2b04:d006 -a 1 -s 2082 -D cloud_public.der
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Invalid DFU suffix signature
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 = 402
Download        [=========================] 100%          402 bytes
Download done.
File downloaded successfully

C:\>particle keys new
running dfu-util -l
Found DFU device 2b04:d006
running openssl genrsa -out device.pem 1024
running openssl rsa -in device.pem -pubout -out device.pub.pem
running openssl rsa -in device.pem -outform DER -out device.der
New Key Created!

C:\>dfu-util -d 2b04:d006 -a 1 -s 34 -D device.der
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Invalid DFU suffix signature
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 = 608
Download        [=========================] 100%          608 bytes
Download done.
File downloaded successfully

C:\>dfu-util -d 2b04:d006 -a 1 -s 34 -D cloud_public.der
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Invalid DFU suffix signature
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 = 402
Download        [=========================] 100%          402 bytes
Download done.
File downloaded successfully

C:\>particle keys server cloud_public.der
running dfu-util -l

!!! I was unable to detect any devices in DFU mode...

> Your device will blink yellow when in DFU mode.
> If your device is not blinking yellow, please:

1) Press and hold both the RESET/RST and MODE/SETUP buttons simultaneously.

2) Release only the RESET/RST button while continuing to hold the MODE/SETUP but
ton.

3) Release the MODE/SETUP button once the device begins to blink yellow.

Make sure your device is in DFU mode (blinking yellow), and is connected to your
 computer
Error - No DFU device found

C:\>particle keys server cloud_public.der
running dfu-util -l
Found DFU device 2b04:d006
checking file cloud_public-padded.der
spawning dfu-util -d 2b04:d006 -a 1 -i 0 -s 2082 -D cloud_public-padded.der
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

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        [                         ]   0%            0 bytes
Download        [=========================] 100%          512 bytes
Download done.
File downloaded successfully
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Okay!  New keys in place, your device will not restart.

C:\>particle update

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

! System firmware update successfully completed!

> Your device should now restart automatically.
> You may need to re-flash your application to the device.


C:\>particle flash
NAME:
particle flash

DOES:
    flash remotely pushes a compiled firmware binary to one of your devices over
 the air, directly
    over USB using dfu, or over serial using the YMODEM protocol.  If you send i
t one or more source files, or a directory of source, it will compile
    that remotely first, and push the compiled binary to your device instead, or
 in the case of code errors
    will show you the errors from the server.

    You can also substitute "tinker", "voodoo", or "cc3000" to flash the provide
d app.

    particle flash my_device tinker
    particle flash --usb tinker
    particle flash --serial tinker

USE:
    particle flash [--usb or --serial or device_id] firmware.bin
    particle flash device_id source_folder
    particle flash device_id file1.ino file2.cpp file2.h file3.cpp



C:\>particle flash --usb tinker
running dfu-util -l

!!! I was unable to detect any devices in DFU mode...

> Your device will blink yellow when in DFU mode.
> If your device is not blinking yellow, please:

1) Press and hold both the RESET/RST and MODE/SETUP buttons simultaneously.

2) Release only the RESET/RST button while continuing to hold the MODE/SETUP but
ton.

3) Release the MODE/SETUP button once the device begins to blink yellow.


Error writing firmware...No DFU device found


C:\>particle flash --usb tinker
running dfu-util -l
Found DFU device 2b04:d006
checking file C:\Users\kreilly\AppData\Roaming\npm\node_modules\particle-cli\bin
aries\photon_tinker.bin
spawning dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D C:\Users\kreilly
\AppData\Roaming\npm\node_modules\particle-cli\binaries\photon_tinker.bin
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

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        [                         ]   0%            0 bytes
Download        [                         ]   0%            0 bytes
Download        [=========================] 100%         3952 bytes
Download done.
File downloaded successfully
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!

Flash success!

C:\>particle serial identify

! serial: Serial timed out

C:\>

That is all it will pull out of cmd but there is 4 hours of trying…


#139

One thing I must have missed in your log:
Have you tried particle keys doctor <<your device ID here>>>?

And the final particle serial identify would require your device to be in Listening Mode (blinking blue)

Just for completeness
Your node version is greater than 4.0.0 and your CLI version is greater or equal to 1.12.0?


#140

I need to try doctor, I missed that somewhere.

Particle Serial (anything) times out in DFU mode, and works to connect to the cloud, but you still get the cyan/orange after the process.

CLI is 1.12.0 and all code appears to be working aside from DFU serial and this keys. It also accepts the keys and transfers them in a normal way. (not instant done, or timing out, but moving the cmd progress bar)

Can you help me understand why there are so many versions of node and why? Specifically what changes them or makes them not work with each other. It is pretty flustering to go through pages of documentation being a non-coder just to setup the CLI/DFU/NODE etc and have half the steps not work or the links not work, and trying to figure out missing data like a cruel puzzle when you started with something your trying to fix…

I am using node 0.10, but I have no idea what that means in the long run? Everything Adafruit seems to recommend 0.10 some tutorials say 0.12, and Particle says 4.00? I am worried about having broken things if I have multiple installs or if I move to .12 or 4.0… (this is my 4th time trying to redo this Photon and previously before a few re-formats I was using 4)

People also talk about installing node and npm separate from each other, but they seem to install at the same time? What a cryptic puzzle!


#141

That’s normal since DFU mode (blinking yellow) does not expose the serial interface. For that to work you’d need to put the device into Listening/Setup mode (blinking blue).

Don’t ask me about node versioning - I’ve no clue either :confused:
But one thing is that newer versions will provide features not present before but became a requirement for additional features on the Particle side.


#142

Just had a working photon, go to blinking blue, then when I tried to readd it, the stupid Key problem started…

This is annoying…

Loaded Node 4 and this happened! Awesome! Worked before, now it doesn’t!

C:>particle serial identify
Error loading command C:\Users\kreilly\AppData\Roaming\npm\node_modules\particle
-cli\commands\SerialCommand.js Error: %1 is not a valid Win32 application.
\?\C:\Users\kreilly\AppData\Roaming\npm\node_modules\particle-cli\node_modules
serialport\build\Release\serialport.node
particle: Unknown command: “serial”


#143

Try updating/reinstalling the newest (currently 1.13.0) CLI, this should fix the ever occuring issues with serialport.
Bundling all modules into one CLI (care-free) installer is in the pipeline.