Particle CLI - Error - I couldn't find the file for RSA

Trying to bring a sick photon back to health, using the Particle CLI on Windows 10. The device was blinking cyan with an intermittent red flash. Resetting server and device keys through “particle doctor”. Apparently, I’m missing something related to RSA.

Resetting server and device keys

! This device is not claimed to your Particle account.
! Resetting keys for a device you do not own may permanently prevent it from connecting to the Particle cloud.
? Skip resetting keys? No
Put the device in DFU mode
Tap RESET/RST while holding MODE/SETUP until the device blinks yellow.
? Select Continue when ready Continue
Found DFU device 2b04:d006
spawning dfu-util -d 2b04:d006 -a 1 -i 0 -s 2082 -D C:\Users\Trevor\AppData\Local\particle\node_modules\particle-cli\keys\rsa.pub.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        [=========================] 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.
Found DFU device 2b04:d006
Found DFU device 2b04:d006
New Key Created!
I couldn't find the file: 470034000151353532373238_rsa_new.der
Make sure your device is in DFU mode (blinking yellow), and that your computer is online.
Error - I couldn't find the file: 470034000151353532373238_rsa_new.der
The Doctor didn't complete sucesfully. undefined
> Please visit our community forums for help with this error:
https://community.particle.io/

This can happen if you run particle device doctor from a directory you don’t have write permission to, like C:\Windows.

You could also try doing it manually. Make sure you’re also in a writeable directory for this too.

Put the Photon into Listening mode (blinking blue) by holding down SETUP until it blinks blue. Then issue the CLI command:

particle identify

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

Then put the Photon in DFU mode by holding down both the RESET and SETUP buttons, releasing RESET and continuing to hold down SETUP until it blinks yellow and issue the commands below, in order.

particle keys server
particle keys doctor YOUR_DEVICE_ID

If you get this error under Windows:

'openssl' is not recognized as an internal or external command, operable program or batch file.

and you have used the CLI installer as described above, it may work if you do:

cd c:\OpenSSL-Win32\bin
particle keys doctor YOUR_DEVICE_ID

There are additional tips for a missing openssl error on this page, including tips for Mac OS X and Linux.

3 Likes

Doh! I should have realized that I might be running into permission errors.

Followed your commands to a T, and my device is now talking to the cloud! Thank you so much!

1 Like