@mdma might be hanging around
that would be rad! hey @mdma you around? im not particularly concerned about this one photon in my possession (i have a backup)…just wondering if you could shed some light for anyone else experiencing this.
don’t spend too much time on it, i know there are many pressing firmware topics to handle!
and its 130am in SF. so time to go to sleep!
Yep, that does sounds like a problem with keys. I’ll write up a tutorial on how to reflash the keys to the photon and post a link here.
Is this an out-the-box photon? If it is, very strange it doesn’t work, although there is a known issue with a small number of keys.
Once the photon and the cloud agree on a set of keys for the photon, the cloud locks in on that set until you do a
particle keys send DEVICE_ID KEY_FILE
that unlocks the keys for that device and leaves them open for a fresh try. When you’re erasing / re-flashing a photon, it’s possible to wipe its local key, and cause it to generate a fresh key.
In this case, that means someone would also have to unlock the keys on the cloud side. I think we can relax the key sending rules here if we start sending better notifications / alerts in these cases (e.g. “hey, your photon just changed its key”). The goal behind this key locking was to prevent man-in-the-middle attacks, but I’d like to find a happy middle ground. Sorry about that!
Thanks,
David
Sorry for the late follow up. Had a few people with this issue, so now I see the pattern and the solution.
NB! only do this if the device has NEVER connected to the cloud before and has the intermittent red blink while fast flashing blue. If the device has previously connected to the cloud successfully then the problem lies elsewhere and these steps are not required.
Using particle, first generate a new key:
particle keys new
Then put the device in DFU mode and flash this new key
dfu-util -d 2b04:d006 -a 1 -s 34 -D device.der
Then reboot the device and it should connect to the cloud.
perfect thanks!
How do we fix this if it has been claimed and been connected to the cloud?
I messed mine up flashing the develop branch somehow… ive tried sending new keys and it says success but i get the same rapid cyan and red burst…
try to reflash the Particle keys in DFU mode with:
Download the server public key from https://s3.amazonaws.com/spark-website/cloud_public.der
dfu-util -d 2b04:d006 -a 1 -s 2082 -D cloud_public.der
I was faster. Took me a day
If anyone else has to relash the public key, it would be great to first save the existing key for later analysis. So before updating the public key run:
dfu-util -d 2b04:d006 -a 1 -s 2082:512 -U cloud_public_from_device.der
If flashing the cloud public key works, then please PM me and send me the cloud_public_from_device.der
file so I can investigate!
Thanks!
mat.
I have the same problem with a previously claimed and connected device. Tried your suggestion. Didn’t help. My other photon is working fine. I saved the cloud_public_from_device.der.
What are my options?
Please try generating a new device key, as described above, and then put the device in DFU mode and run
particle keys load mykey
particle keys send <DEVICE_ID> mykey.pub.pem
This will regenerate a key on the device and provide it to the cloud, which is allowed, since you have already claimed the device.
so here I am having this same issue; and I tried this:
and that didn't help, so I did this:
and I still get the cyan flashing with brief periods of red, like @avidan, the OP
not my day I guess!
EDIT
for the record, @kennethlimcp helped me solve my problem via a PM.
I wanted to give @kennethlimcp props for being so helpful to this forum, and to me personally, so BIG THANKS @kennethlimcp!!!!
Would you mind sharing the solution in case others hit the same problem?
Right, yes!
reset the device keys (as above)
reset the public key (as above)
and finally...
Can you do a particle keys send deviceid device.pub.pem
We might really have to wait for Mat to give directions on this.
In summary:
particle keys server cloud_public.der
particle keys new photon
particle keys load photon.der
particle keys send photon.pub.pem
Ok, so this was on a Photon that was already claimed?
I’m curious to know what made the installed keys go bad?