Photon flashing cyan with red bursts [SOLVED]

Well the battery in my Weather Shield ran down again. All the lights on the Photon were off. I brought it inside and connected it to my PC via USB. It came up in listening mode. (At least that’s something - the last one just had that steady dim D7 blue light on). I used the Particle app to reconnect it to the net. The app said everything was OK but the Photon started blinking fast cyan alternating with quick bursts of flashing red. After reading a bunch of seemingly related threads, I tried the following, all to no avail.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\User>particle list
β–€ Retrieving devices...
! Please login - it appears your access token may have expired

Error Invalid token

C:\Documents and Settings\User>particle list
β–„ Retrieving devices...
! Please login - it appears your access token may have expired

Error Invalid token

C:\Documents and Settings\User>particle config identify
Current profile: particle
Using API: https://api.particle.io
Access token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

C:\Documents and Settings\User>particle list
β–„ Retrieving devices...
! Please login - it appears your access token may have expired

Error Invalid token

C:\Documents and Settings\User>particle serial wifi
? Should I scan for nearby Wi-Fi networks? Yes

! serial: Unable to scan for Wi-Fi networks. Do you have permission to do that on this system?

C:\Documents and Settings\User>particle keys new
Error creating keys... dfu-util is not installed 

C:\Documents and Settings\User>particle flash -serial tinker

! Please login *(eh? How do I login - to what?)* - it appears your access token may have expired

Flash device failed
Invalid token

C:\Documents and Settings\User>particle setup
                  _   _      _        _
 _ __   __ _ _ __| |_(_) ___| | ___  (_) ___
| '_ \ / _` | '__| __| |/ __| |/ _ \ | |/ _ \
| |_) | (_| | |  | |_| | (__| |  __/_| | (_) |
| .__/ \__,_|_|   \__|_|\___|_|\___(_)_|\___/
|_|                     https://particle.io/

> Setup is easy! Let's get started...
> It appears as though you are already logged in as xxxxxx.com
? Would you like to log in with a different account? No

! PROTIP: Hold the MODE/SETUP button on your device until it blinks blue!
! PROTIP: Please make sure you are connected to the internet.

> I have detected a Photon connected via USB.
? Would you like to continue with this one? Yes
! The Photon supports secure Wi-Fi setup. We'll try that first.

! PROTIP: Wireless setup of Photons works like a wizard!
! PROTIP: We will automagically change the Wi-Fi network to which your computer
is connected.
! PROTIP: You will lose your connection to the internet periodically.

! PROTIP: Some computers may require Administrator permissions for my automagical Wi-Fi scanning capabilities.

! OOPS: I was unable to scan for nearby Wi-Fi networks (-___-)

? We can still proceed in 'manual' mode. Would you like to continue? Yes

! PROTIP: Manual mode will prompt you to manage the Wi-Fi connection of your computer when it's necessary.
! PROTIP: To proceed, you will need to be able to manually change the Wi-Fi connectivity of your computer.
! PROTIP: Your Photon will appear in your computer's list of Wi-Fi networks with a name like, Photon-XXXX
! PROTIP: Where XXXX is a string of random letters and/or numbers unique to that specific Photon.

! PROTIP: You will need to know the password for your Wi-Fi network (if any) to proceed.
! PROTIP: You can press ctrl + C to quit setup at any time.

> Obtained magical secure claim code.

! PROTIP: There was a network error while connecting to the cloud...
! PROTIP: We need an active internet connection to successfully complete setup.
! PROTIP: Are you currently connected to the internet?

(Uh yes I am) Please double-check and try again.

C:\Documents and Settings\User>

So once again I’m left with a non-functioning Photon and a confusing welter of threads with assorted bits and pieces of partial solutions and no clear direction of what to do to get this device running again and everything I try leading to a dead end. :angry: HEEEEEEEEEEELP!

Put the Photon into Listening mode (blinking blue) by holding down SETUP until it blinks blue if it’s not still in that mode. Then issue the CLI command:

particle identify

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

Put the Photon into DFU mode (blinking yellow) by holding down RESET and SETUP. Then release RESET while holding down SETUP while it blinks magenta, until it blinks yellow, then release SETUP. Then issue the CLI commands:

particle keys doctor YOUR_DEVICE_ID_GOES_HERE
particle keys server
particle flash --usb tinker

The fast blinking cyan to red/orange flashes is usually a keys error and the steps above should correct it.

6 Likes

dfu-util is not installed

@Michele This is going to prevent you from following @rickkas7's good advice.... you might want to try the CLI installer found here to get dfu-util much easier on Windows: https://www.particle.io/cli

Here's a direct link for Windows: https://binaries.particle.io/cli/installer/windows/ParticleCLISetup.exe

Please login - it appears your access token may have expired

Also you need to run:

particle login

for many commands to work properly. You will type in your particle account email and password to download an access token. After that lots of those errors will be gone! :smile:

2 Likes

Before gettin aggitated, what version CLI are you running?
Have you tried logging in to CLI as CLI asked you to?

particle login

@BDub was a bit quicker, but I want to put my finger on this a bit more direct:
Your own post shows that CLI told you to log in, so why not just ask how to do that instead?

particle help

might help

1 Like

Indeed. I probably should have done that before spending an hour getting completely frustrated trying to figure it all out myself. I have nothing but praise for the Particle community and have always gotten help right away with my multitude of Photon problems.

That said, in my first post, after it says

a little further down it also says

leading to further confusion. If I might make a suggestion, a more helpful message might be to say "Please run "particle login" from a command prompt" instead of just "Please login". Or even better yet, if the program knows a login is needed at that point, why not just offer up the login prompt right there, like "Please enter your email address". I'm not saying there's anything wrong with the way it works now, just that from the perspective of someone who is not a Photon expert, I found it confusing.

So anyway, I went back and ran particle login and got "Successfully completed login!". Then following rikkas7's advice, I did a particle identify which did indeed return the device id and f/w v. 0.5.2.

Next, I followed BDub's link

But when I ran the setup program it opened the installer dialog and then popped up an error "Your internet connection seems to be not permitted or dropped out! Please reconnect and click Retry to resume installation."

Well there's nothing wrong with my Internet connection. I even tried this on a different PC and got the same error. So I'm not going to get aggravated, I'm just going to ask for more help. How do I get this installed?

Just out of curiosity, does this try to talk to a server in China? Because I have all of .cn blocked at my router, as well as a number of other malware-type Internet domains.

Oh, and is there a way to patch up the title of this thread? I missed the n in Photon.

You can change the title of this thread when you click on it, then you should see a pencil icon. Click that again and there you go.

But I’m a bit lost with the reason for that β€œYour internet connection seems to be not permitted or dropped out! Please reconnect and click Retry to resume installation.” - might be XP too.
I’ve no ideas what servers the installer goes through, but I wouldn’t think they are in China.

But if that installer doesn’t work you might just need to go the oldfashioned way.

You’ve already got CLI
So what version is it? (particle --version)
If it’s not the latest, try npm update -g particle-cli

To get dfu-util, you can download the files from this directory
http://dfu-util.sourceforge.net/releases/dfu-util-0.8-binaries/win32-mingw32/
into a local directory and add that to your PATH.

After that you should be able to do what @rickkas7 said

particle keys doctor YOUR_DEVICE_ID_GOES_HERE
particle keys server
particle flash --usb tinker

And then we may look further.

4 Likes
C:\Documents and Settings\User>particle --version
1.13.0

C:\Documents and Settings\User>npm update -g particle-cli
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher
 to avoid a RegExp DoS issue
/
> serialport@3.1.2 install C:\Documents and Settings\User\Application Data\npm\n
ode_modules\particle-cli\node_modules\serialport
> node-pre-gyp install --fallback-to-build

[serialport] Success: "C:\Documents and Settings\User\Application Data\npm\node_
modules\particle-cli\node_modules\serialport\build\Release\serialport.node" is i
nstalled via remote
C:\Documents and Settings\User\Application Data\npm\particle -> C:\Documents and
 Settings\User\Application Data\npm\node_modules\particle-cli\bin\particle.js
particle-cli@1.16.0 C:\Documents and Settings\User\Application Data\npm\node_mod
ules\particle-cli
β”œβ”€β”€ cli-spinner@0.2.5
β”œβ”€β”€ xtend@4.0.1
β”œβ”€β”€ semver@5.3.0
β”œβ”€β”€ chalk@1.1.3 (supports-color@2.0.0, ansi-styles@2.2.1, escape-string-regexp@1
.0.5, has-ansi@2.0.0, strip-ansi@3.0.1)
β”œβ”€β”€ temp@0.8.3 (os-tmpdir@1.0.1, rimraf@2.2.8)
β”œβ”€β”€ cli-table@0.3.1 (colors@1.0.3)
β”œβ”€β”€ glob@4.5.3 (inherits@2.0.1, inflight@1.0.5, once@1.3.3, minimatch@2.0.10)
β”œβ”€β”€ node-wifiscanner2@1.2.0 (os-locale@1.4.0)
β”œβ”€β”€ when@3.7.7
β”œβ”€β”€ inquirer@0.11.4 (ansi-regex@2.0.0, strip-ansi@3.0.1, ansi-escapes@1.4.0, thr
ough@2.3.8, rx-lite@3.1.2, cli-width@1.1.1, figures@1.7.0, readline2@1.0.1, stri
ng-width@1.0.2, cli-cursor@1.0.2, run-async@0.1.0)
β”œβ”€β”€ form-data@1.0.0-rc4 (async@1.5.2, combined-stream@1.0.5, mime-types@2.1.11)
β”œβ”€β”€ latest-version@2.0.0 (package-json@2.3.3)
β”œβ”€β”€ binary-version-reader@0.4.0 (buffer-crc32@0.2.5, h5.buffers@0.1.1)
β”œβ”€β”€ hogan.js@2.0.0
β”œβ”€β”€ request@2.74.0 (aws-sign2@0.6.0, oauth-sign@0.8.2, forever-agent@0.6.1, tunn
el-agent@0.4.3, caseless@0.11.0, is-typedarray@1.0.0, stringstream@0.0.5, aws4@1
.4.1, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, tough-cookie@2.3.
1, node-uuid@1.4.7, qs@6.2.1, combined-stream@1.0.5, mime-types@2.1.11, bl@1.1.2
, hawk@3.1.3, http-signature@1.1.1, har-validator@2.0.6)
β”œβ”€β”€ moment@2.14.1
β”œβ”€β”€ lodash@3.10.1
β”œβ”€β”€ softap-setup@1.1.4 (nconf@0.7.2, node-rsa@0.2.30)
└── serialport@3.1.2 (bindings@1.2.1, commander@2.9.0, es6-promise@3.2.1, debug@
2.2.0, nan@2.4.0, object.assign@4.0.4)

C:\Documents and Settings\User>particle --version
1.16.0

C:\Documents and Settings\User>

Then I did this:

Then this:

C:\Documents and Settings\User>particle keys doctor xxxxxxxxxxxxxxxxxxx
Make sure your device is in DFU mode (blinking yellow), and that your computer is online.
Error - dfu-util is not installed

C:\Documents and Settings\User>

The Photon is blinking yellow. The dfu files are all in C:\Program Files\dfu and I added that directory to PATH. ???

To circumvent the PATH issue, you can try opening the terminal from the same directory the DFU file is in, that normally works as well :slight_smile:

2 Likes

Have you restarted XP after you changed your PATH?
Can you run dfu-util from the command prompt?
If not, your PATH doesn’t find dfu-util.exe

Does CLI now report 1.16.0?

2 Likes

Ah yes - that worked.

C:\Program Files>cd dfu

C:\Program Files\dfu>particle keys doctor xxxxxxxxxxxxxxxxxxxxxxxx

!!! 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 that your computer is online.
Error - No DFU device found

C:\Program Files\dfu>

Well this is different, anyway. And the Photon is in fact blinking yellow.

Update - I checked in Device Manager and the device "Photon DFU Mode" says the drivers are not installed. So the question now is where to get those drivers?

Yes.

Moving right along, I downloaded and ran Zadig which claims to have installed the DFU drivers. The driver not found error is now gone from Device Manager. So I tried the doctor command again. Now I have a whole slew of new errors:

C:\Program Files\dfu>particle keys doctor xxxxxxxxxxxxxxxxxxxxxxxxx
Found DFU device 2b04:d006
Found DFU device 2b04:d006
Error creating keys... Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c
"openssl genrsa -out xxxxxxxxxxxxxxxxxxxxxxx_rsa_new.pem 1024"
'openssl' is not recognized as an internal or external command,
operable program or batch file.

Make sure your device is in DFU mode (blinking yellow), and that your computer is online.
Error - Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "openssl genrsa
 -out xxxxxxxxxxxxxxxxxxxxxxx_rsa_new.pem 1024"
'openssl' is not recognized as an internal or external command,
operable program or batch file.

C:\Program Files\dfu>

???

Oh no, sorry for all that inconvenience :blush:
If the installer worked on your machine all that would have been installed at once, but so you need to collect them all over the place.

OpenSSL is now missing.
You need to install that and add to PATH too.
https://www.openssl.org/community/binaries.html


Here are step-by-step tutorials how to install CLI (and dependencies) before the installer arrived.
Tutorial: Installing DFU-Driver on Windows [24 Feb 2015]
Tutorial: Particle-cli on Windows [07 Jun 2015]

2 Likes

Well hallelujah! I installed a Win32 OpenSSL, rebooted, and ran this:

That finally worked. The Photon is now back online and I was able to re-download my weather code to it. Whew!

Many thanks to everyone who helped with this. You guys are the greatest.

4 Likes

And this is why the CLI installer that failed to work above is such a joy. I’ll file an issue to look into the error you experienced to see if it’s something we can make better.

Glad to see you are back up and running!

1 Like

BTW, we do like the :heart: Like buttons when our responses have been helpful :wink:

5 Likes

Oh, is that what that is? OK, well then here ya go. And some more for good measure: XOXOX

5 Likes