I knew this was going to happen. I smoked my old Photon and just got a new one today. I plugged it into a USB port on my PC and it started blinking blue. But when I run the Particle app it spends a long time on the LOG IN scrren and finally goes “Unable to connect to the server”. OK, so I went to the PC and did a particle serial identify. That gave me the device id right away. Then I tried to enter that into the “Add New Devices” tab in the web UI. But when I click on “Claim a device” it just goes “Could not claim device”. And yes my Internet connection is working just fine. I tried rebooting the Photon but got the same problems.
Honest to God this is enough to drive me back to Arduino, or my good old reliable Basic Stamp. Any help on getting this blinking Photon connected would be most appreciated.
I’m sorry you are having so much trouble setting up your photon. Let me first explain the issue you are having with the “could not claim device” error. As your device is not connected to the internet you cannot “claim” the device on our servers. Devices are only claimable when they are online. Even if you could claim it the device still wouldn’t have WiFi credentials so it wouldn’t be connected or controllable online. Try the following steps to fix your issue:
Power up your Photon. It should be flashing blue
Run the command particle setup wifi to send wifi credentials to the device
Once your device is online (breathing cyan) you can try claiming it again.
Well I have two wifi networks. Just for laughs, I switched my phone to the second network and ran the Particle app again. This time it found my new Photon and connected to the Photon’s own wifi. It then located my two networks. I chose the one I wanted and it got all the way to the last step when it said “Error! Setup process couldn’t configure the Wi-Fi credentials for your Photon, please try running setup again after resetting your Photonand putting it back in blinking blue listen mode if nedded”.
So I did that and ran the Particle app again. Chose my network, entered the password. It sat there for a while and this time said “Uh oh! Setup process couldn’t disconnect from the Photon Wi-Fi network. This is an internal problem with the device so please try running setup again after resetting your Photon, etc.”
So I had enough of that and tried particle setup wifi from the PC. It went “Should I scan for nearby wifi networks?” and I said yes. Then it said “! serial: Unable to scan for Wi-Fi networks. Do you have permission to do that on this system?” Well duh yeah!
So I went back to the app on the phone only this time when it asked which network I wanted to connect to, I chose the other one than I’d tried before. And this time it finally connected. It’s now pulsing cyan, only it’s connected to the wrong network. I really want it on the first network I tried because that one has better range where the Photon will eventually be placed.
Yes, that’ the only way this PC is connected to the net.
I ended up trying the Particle app again while connected to the original wifi network. This time, it found the Photon, even though it’s connected to the second wifi. I put the Photon back in blue-blinking mode and clicked on “Change Network”. This time, when I entered the original wifi network’s password (the same wifi it refused to connect to yesterday), it worked fine. Go figure. I went to the web IDE and was able to connect to the Photon from there and then download my program to it, so it looks like I’m back in business.
I guess I don’t understand the Photon’s boot-up process. When you power it up for the very first time, it starts broadcasting its own hotspot. But how does the Particle app find it? The Photon isn’t yet connected to any wifi. Does the app do a wifi scan looking for a network with a Photon-ish sounding name? If so, why did it matter which wifi network my phone was connected to in order to connect to the Photon? All the devices in question were in the same room.
The Photon will create an access point to which your phone can connect. When you’re in there, you can give it the credentials, after which it will disconnect the access point, and try to connect with the AP for which it was provided credentials. As such, it doesn’t matter to what AP your phone was connected to prior to setup since you’ll be connecting tot the Photon anyhow. As for finding the device, Android will probably look for the “photon-XXXX” name, whereas you’ll have to manually connect to it if you’ve got an iOS device (due to restriction from Apple).
Hope that clears it up somewhat. Glad you’re up and running again
Can you point us to the place where the docs suggest so?
This was a requirement for the Spark Core’s Smart Config setup for the TI CC3000, but is not anymore for the Particle Photon. The only (obvious) prerequisite in order to claim the device via the mobile app is that the app can talk to the cloud (by any kind of network), and the device is online & connected.
I didn’t say in was in the documentation. I merely observed that when my phone was connected to my wifi no. 1, the Particle app couldn’t find the Photon. When I connected my phone to wifi no. 2, it found the Photon right away. I was just curious why that would be. That’s all.