Encryption key fix (fast cyan blinks with occasional red)

Same problem. How do I go about exchanging device?

I got it working, but these instructions left out a few steps that I had to figure out. I’ve only done this once, so feel free to correct me if I’m off base anywhere.

Prep Work…

  1. Hold down BOTH buttons
  2. Release only the RST button, while holding down the MODE button.
  3. Wait for the LED to start flashing yellow
  4. Release the MODE button "

Then do these 4 commands that @garadget shared (ofcourse make sure you copied the .der file to your local path)

fu-util -d 2b04:d006 -a 1 -s 2082 -D cloud_public.der
particle keys server cloud_public.der
particle keys new photon
particle keys load photon.der

And some others…

particle cloud login

(follow login prompts)

particle device remove [device id]

particle keys send [device id] photon.pub.pem

“particle device add [device id]” didn’t work for me so I plugged the device back into its brick and pressed the M button for 3 seconds to re-claim it and set it back up.

John,
Thanks for the write up. All looks good except you could use your existing Garadget account to login into Particle CLI instead of creating a new/generic one.

1 Like

Hi, For any Mac / Linux users, here is a step by step that may help:

  1. Open Terminal
  2. Paste the following: bash <( curl -sL https://particle.io/install-cli )
  3. Install Homebrew: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  4. Install DFU-Util brew install dfu-util
  5. Download the Encryption Key (as written by garadget above)
  6. Hold Down “M” and “R” on the Garadget and connect it to your computer. Let go of “R” It will flash Purple and then a Yellow / Green colour, once it is Yellow / Green, you can release “M”
  7. Assuming that you downloaded the .der file above to downloads, the command will be similar to this (replace yourusernamegoeshere with whatever your username is on your machine) dfu-util -d 2b04:d006 -a 1 -s 2082 -D /users/yourusernamegoeshere/Downloads/cloud_public.der
  8. On my machine (Mac running OS X Mojave 10.14.2) I had to change directory over to where Particle was installed so cd ~/bin
  9. Assuming that you downloaded the .der file above to downloads, the command will be similar to this (replace yourusernamegoeshere with whatever your username is on your machine) ./particle keys server /users/yourusernamegoeshere/Downloads/cloud_public.der
  10. ./particle keys new photon
  11. ./particle keys load photon.der
  12. You will need your Device ID at this stage, head to: Garadget Login and click settings and copy your “ID” or type ./particle identify
  13. ./particle cloud login and enter your email address and password when prompted
  14. ./particle device remove YourID_From_Step_12
  15. ./particle keys send YourID_From_Step_12 photon.pub.pem
    If it worked, you should see:

submitting public key succeeded!

1 Like

I was able to follow the tutorial until step 7.
After step 6, it went into the yellow (DFU mode) for a short time and then returned to the cyan blinking mode right afterwards.
and the first command line input of step 7 reported:
$ dfu-util -d 2b04:d006 -a 1 -s 2082 -D cloud_public.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

Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
No DFU capable USB device available

Is this because I couldn’t stay in the DFU mode? How should I resolve this?

This part is displayed on every command and is normal:

To continue with the steps you will need to return to DFU mode (reset while holding “M” until yellow blinking).

I got a little bit further, it seems that I have to keep the M button held so I remain in the yellow led mode (releasing it makes the led turn back to cyan mode again).
But When I try to upload the key(last command line input of step 7) I get a permission deny.
$ particle keys send 1e004200…93433 photon.pub.pem
attempting to add a new public key for device 1e004200…93433
Error sending public key to server: Permission Denied

Any clue?

Please try now. I’ve released your Garadget from the account. That should allow you to complete the steps. You’ll then need to run particle device add [device-id] to get the device back in to account, or just run the setup again.

submitting public key succeeded!
But couldn’t claim device using command line:
$ particle device add 1e004200…3433
Claiming device 1e004200…3433
Failed to claim device: Device is not connected to the cloud

Will try the normal pairing

well, I take it back, it just somehow worked.
You probably did something on your side?

It’s in slow cyan blinking now, hooray.

1 Like

Hi

my garadget failed in the last 2 days, looks like the PSU failed. I attached a new PSU and now looks to have an encryption fault. I decided to run OP fix but I am getting -

C:\Users\t>particle keys send 2xxx photon.pub.pem
attempting to add a new public key for device 2xxx
Error sending public key to server: Permission Denied 

I have tried to remove the device but I get the same Permission Denied error.

Cheers

You can try removing the device from account using the current mobile app (settings link from main screen then “delete” tab). If that doesn’t work, please PM me the device ID of your unit and I’ll take a look.

Thanks that worked :grin:

1 Like

Hi,

I think I have the same problem.

I am trying to follow these steps, however when I try to login to garadget using particle login, I am getting incorrect credentials, which is impossible because I am using a Password Manager and if I logout and login to garadget web UI those credentials are accepted.

What am I doing wrong?

I am having this exact issue - Also using a password manager with copy/paste. I’ve typed the password manually as well, being very careful. I’ve verified that the password works in the web app.

particle
λ particle login
? Please enter your email address me@here.com
? Please enter your password [hidden]
! There was an error logging you in! Let’s try again.
! User credentials are invalid

This used to work with Garadget accounts.
If it no longer does, you can register a plain vanilla Particle account for this purpose at: https://console.particle.io/

I got a bit further but now I get this message with the final command:

particle keys send <removed> photon.pub.pem
attempting to add a new public key for device <removed>
Error sending public key to server: Permission Denied

Do I need to do anything in my Particle account other than set it up?

All good now - I read the post above and deleted it with the mobile app.

Thanks!

1 Like

I’m having a hard time getting this to work on my garadget that I have had for several years.

First my computer seems to be very stubborn when trying to communicate to the device while it is in DFU mode. I have to restart my computer while the device is plugged in and DFU mode to be able to list the device (dfu-util -list).

When I try following the sets I get this.

C:\Users\John\Downloads>dfu-util -d 2b04:d006 -a 1 -s 2082 -D cloud_public.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

Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 2b04:d008
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 = 402
Download        [                         ]   0%            0 bytesError during download get_status

C:\Users\John\Downloads>particle keys server cloud_public.der
Make sure your device is connected to your computer: Error during DfuSe download: Error: Error during special DfuSe command SET_ADDRESS:UsbStallError: OUT control transfer failed

Any advice is appreciated.

Soon after posting this I fixed my issue by updating my firmware via the instructions here.

I still had to put the device in DFU mode, and reboot my computer while it was plugged in. But I got it working again.