Unable to claim Photon

This Photon originally had no issues connected, then I started getting the blink green light issue. I finally was able to get out of the blinking green loop. However, I’ve never been able to get the Photon back online. I can go through the setup via the Android app, but on the last step my Photon cannot be claimed. Attached is the error I see in the Android app. Once upon a time the device was claimed, however, it’s no longer claimed and it doesn’t appear when login to the cloud.

I just installed 0.4.7 today to try it again and I still have the same experience. I even tried to claim the device via the cli while initiating it via Android app and I still cannot get this solved. I also setup a new WiFi SSID with no security and attempted the setup and I had the same experience.

Can someone please help?

If you’ve got the CLI, try particle update in DFU mode, followed by particle setup wifi in listening mode. Then, do particle identify in listening mode, followed by particle device add [deviceid] where you insert the device ID you got from the previous step.
Let me know if that works.

It works all the way up to the last step. I even had Particle confirm that my device was not already claimed on the back end as well.

Here’s the output after particle device add [deviceid]
Claiming device 2700310xxxxxxxxxxxxxxxxxxx
Failed to claim device, server said { ok: false, errors: [ ‘Device is not connected’ ] }

It did take the wifi credentials after I did particle setup wifi. But then it looks like it connects but just blinks cyan constantly.

A week ago my Wi-Fi modem failed and I could not connect my laptop or my three Photons. My supplier gave me a second Wi-Fi from the same LAN modem (Bell Canada fibe) and I was able to get the laptop to connect to the new Wi-Fi but not the Photons. Now the laptop will latch onto either Wi-Fi but no such joy with the little guys. Using Particle on my android cell, I have made dozens of attempts and in the process changed device names. Now the process proceeds through selection, configuring, connecting, cloud, internet, all with speedy green checkmarks but then after a lengthy struggle is unable to verify product ownership. Unfortunately I have not been able to get CLI to be totally functional so unable to work through Moors Oct 25th suggestion.
Any new thoughts on unable to verify product ownership? This old guy will appreciate your help.

Just a few steps to try.

  • Make sure to have your router set up for 2.4GHz only or set any available 5GHz WiFi to a seperate SSID, since Photon can only connect to 2.4GHz
  • Clear the credentials on your device by holding SETUP for 10+ sec till flashing rapid blue
  • plug the Photon into your PC via USB and open a Serial monitor and connect to the Photon’s COM port
  • type in w and supply the info requested

Thank you for your speedy response. I thought that things had finally turned from 8 days of total frustration. Then I realized that I don’t think I have a serial monitor. I downloaded Kujang but after I entered COM9 it noted that COM6 connected and entering “w” did not return anything. Can you suggest another monitor I might try?

I’m using PuTTY and don’t know Kujang.
What OS are you on? If it’s Windows (less than 10) you might need to install the Particle Serial drivers.
And install them via Device Manager.
Has the device been blinking blue when you entered w?

See also
https://docs.particle.io/support/troubleshooting/troubleshooting-tools/photon/#setup

Hi again ScruffR
I did not realize that PuTTY was what we needed. I had installed it last month but never used it
So I tried the “w” request on PuTTY and the monitor performed.
I entered data for 3 Photons and 2 WiFi connections (6 tries).
In each case the LED went from blinking blue –to- blinking green – fast blinking green – blinking blue.
No joy in achieving connection but at least something happened – PuTTY worked.
I have not been able to confirm my router speed as 2.4GHz. I am on Windows 10.
Thanks for a great try, I am about at the end of my rope after eight days of frustration trying to get my Photons to work. In the process I am sure I have done something terribly stupid. I have changed their names from the originals supplied, responded yes to change ownership when told they don’t belong to me. The Particle app on my Android cell tries but has succeeded only twice. In each of those tries they would not connect later to the app or to Particle build. The one still listed in Particle build will not accept a program flash. Unfortunately the CLI accessed through Windows command prompt has never worked completely giving an error message at the start about not finding module ‘node-pre-gyp.’ I have searched for that file and not found it. It may be that I have to reinstall node.
I will appreciate any suggestions you may have but the Photons are very close to the trash can.

In order to run CLI properly you’d need at least node version 4.x.x
Have you got a brand and type of the LAN Modem you’ve got - usually these things provide some setup page you can view in your browser (just enter the gateway IP in the address bar).
Have a check if all the prerequisites outlined here are met
https://docs.particle.io/support/troubleshooting/common-issues/photon/#wi-fi-network-requirements
Have you got a mobile phone that can act as access point? Try this.
Could you give the CLI installer in this thread a try?
I somethimes have my devices also got back to blinking blue after entering the credentials mostly due to bad reception (or hidden SSID), but a reset after the green phase gets me out of this and the credentials still stick.
Try temporarily deactivating the firewall on the modem.

I have done some research. CLI node is v4.4.0. My LAN model is a Sagemcom 2864. I have worked through the setup page with my provider Bel Canada. It is 802.11. Note that all three of my Photons previously connected with the WiFi before the modem failure. Bell reset everything in the modem and I now have WiFi connectivity for my laptop but not the photons. Modem is working on channel6 at 2.4GHz. Encryption is WPA/WPA2 (TKIP/AES).
I tried to connect two different Photons on two separate WiFi spots (my Church and my son) but all failed.
Using Putty I connected to the Device Mgr noted COM9 and typed w.
After answering the questions, the Photon went from flashing blue - flashing green - faster flashing green, and back to flashing blue.
I wondered if all my attempts had messed up my Photons so I was going to buy another unit. Unfortunately my supplier only had the older Spark Core (ARM Cortex - M3) and I didn’t think it would be wise to open up another can of worms.
Should we look at new credentials form? A new install of the Particle app in my cell phone?
I continue to try to get the tools working. My try a curl https //api.particle io/v1/devices\?access_token=xxxxxxxxxxxxxxx gave me:

{
"OK": false,
"error": 'Not Found',
"device_name"  "robot wombat boomer hindu penguin"
}

And so I continue in my blind way.
Dave

If I assume that you have not used the same credentials as before, could it be that your password is longer than 31 char?
Also try to avoid funny characters in SSID and password (non US keyboard layout).

Could you try if you can connect when you got your WiFi open (temporarily)?

Sorry forgot the link for the CLI installer in my previous post
Toolchain for Windows Installer
CLI would be really useful in this case.

Other stabs in the dark:
Have you wiped the old credentials off the Photon (SETUP 10+ sec till rapid blue)?
How does the device behave in Safe Mode?
Have you ever used WiFi.selectAntenna() in any of your programs?

I have not changed my credentials as far as I know.
Password is 8 letters. SSID is "BELL843"
“Could you try if you can connect when you got your WiFi open (temporarily)?” Please explain. My WiFi is operating (at least to my laptop). What did you want me to try?
Agreed CLI would be useful. Used your link and reinstalled the CLI and the lengthy tools install. Unfortunately two stumbling blocks remained after a very smooth install:

  1. calling Particle setup gives me the same error as before "Cannot find module
    ’node-pre-gyp’.
  2. setup starts but asks if I want to login with a different account. Answering “N” causes the program to drop out and put me back at the command prompt. If I answer Yes, then Particle setup continues as I answer that I do not want to revoke the current authentification token, enter the same email address and password, Protips are given re flashing blue and then "Now to find your device(s)… The search is endless and fruitless.
    Each time I try to connect a Photon it is with flashing blue, so Yes the old credentials have been wiped.
    I don’t think I have had any luck in Safe Mode. I will try again to make sure this stab in the dark has not shed light.
    I have never used WiFi.selectAntenna() in a program.
    Thanks again for your continued help.
    I think if I can get rid of the ‘node-pre-gyp’ error there might be hope.
    Dave

Could you show us the full error output of that, there might be something useful in there? I've got a feeling it is complaining about serialport(?)

Moors7
The error shows immediately starting any Particle pgm:

C:\WINDOWS\system32>particle setup
Error loading command C \Users\MDGpcOwner\AppData\Roaming\ npm\node_modules\particle-cli\commands\SerialCommand.js Error Cannot find module ‘node-pre-gyp’

Hope this can shed some light on the problem.
Dave

Could you try npm install -g serialport? No guarantees, but it might help.

I tried npm install -g serial port and got
serial@0.0.9 C:\Users\MDGpcOwner\AppData\Roaming\npm\node_modules\serial port@0.8.1 C:\Users\MdgpcOwner\AppData\Roaming\npm\node_modules\port
When I entered Particle, I still got the error Cannot find module ‘node-pre-gyp’.

Did you do

npm install -g serial port

as you wrote, or as Jordy suggested?

npm install -g serialport

BTW, you could also try npm install -g node-pre-gyp
And after that try npm update -g particle-cli again.

Thank goodness for your keen eye! I erred.
npm install -g serialport did not make any noticeable changes,
npm install -g node-pre-gyp got rid of the 'node-pre-gyp' error.
However when starting Particle there was still an error noted.

"Error loading command C:\Users\MDGpcOwner\AppData\Roaming\npm\node_modules\particle-cli\commands\SerialCommand.js Error: Cannot find module 'C:\Users\MDGpcOwner\AppData\Roaming\npm\node_modules\particle-cli\node_modules\sweialport\build\Release\node-v46-win32-ia32\serialport.node'

npm update -g particle-cli did not improve the situation.
Particle list gives me the error as above then does list one of my three Photons.
Particle setup crumps out after a 'No' to Would you like to log in with a different account?. I am including the error messages here.

readline.js:925
throw err;
^

TypeError: Cannot read property 'findDevices' of undefined
at SetupCommand.findDevice (C:\Users\MDGpcOwner\AppData\Roaming\npm\node_modules\particle-cli\commands\SetupCommand\index.js:293:8)
at accountStatus (C:\Users\MDGpcOwner\AppData\Roaming\npm\node_modules\particle-cli\commands\SetupCommand\index.js:150:3)
at switchChoice [as completed] (C:\Users\MDGpcOwner\AppData\Roaming\npm\node_modules\particle-cli\commands\SetupCommand\index.js:115:4)
at PromptUI.onCompletion (C:\Users\MDGpcOwner\AppData\Roaming\npm\node_modules\particle-cli\node_modules\inquirer\lib\ui\prompt.js:57:10)
at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.completed (C:\Users\MDGpcOwner\AppData\Roaming\npm\node_modules\particle-cli\node_modules\rx-lite\rx.lite.js:1550:12)
at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (C:\Users\MDGpcOwner\AppData\Roaming\npm\node_modules\particle-cli\node_modules\rx-lite\rx.lite.js:1489:14)
at Subject.Rx.Subject.addProperties.onCompleted (C:\Users\MDGpcOwner\AppData\Roaming\npm\node_modules\particle-cli\node_modules\rx-lite\rx.lite.js:5871:19)
at Subject.tryCatcher (C:\Users\MDGpcOwner\AppData\Roaming\npm\node_modules\particle-cli\node_modules\rx-lite\rx.lite.js:63:31)
at AutoDetachObserverPrototype.completed (C:\Users\MDGpcOwner\AppData\Roaming\npm\node_modules\particle-cli\node_modules\rx-lite\rx.lite.js:5796:56)
at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (C:\Users\MDGpcOwner\AppData\Roaming\npm\node_modules\particle-cli\node_modules\rx-lite\rx.lite.js:1489:14)

C:\WINDOWS\system32> End of error messages

So we had success in getting rid of node-pre-gyp. GREAT! Can you direct me further?

In the error message on starting Particle (not the long series) I traced the paths noted. The first one to \SerialCommand.js seems OK but the second that should end at \serialport.node is broken at what looks like a typo in the code. It is looking for node_modules**sweialpor**t\build where I suspect it should be node_modules\serialport\build.
I am guessing the question is how we reload particle so that it looks along the correct filepath and also we make sure the target is where it should be.
Please tell me if I’m off line but help me with the corrections if this makes sense.

I went ahead and reinstalled Particle CLI with

npm install -g particle-cli
particle login

Voila! NO ERROR MESSAGES!
Now the attempt to particle setup my three Photons, only one of which appears on Dashboard, my cell Particle, or Particle Build's device list.
I may need you help in wiping them clean and starting over.