CLI doesn't work anymore!

I had installed CLI previous version (it was fully operational) and yesterday during opening it a message that a new version xxxbbbbbrrrrttt (or something) is available, indicated. I tried to make update and from then everything in CLI does not work. Previously particle shown as “particle” and now is shown as “.particle” plus a new dir “particledev”. What happens?
4 days ago, i had connected Photon with RS485 interface, loaded a library and during power-up Photon fried!

"does not work" isn't really a debuggable statement.
What exactly isn't working?
In what way is it not working?
Does it have an output?
Does it show errors?
What OS are you on?
How have you installed the CLI?
How did you update the CLI?

Stuff like that helps. Screenshots work wonders as well.

1 Like

I have uninstalled everything. .particle, .particledev (that wasn’t existed in first installation, it appears after the update) particle desktop ide, etc. I will follow again the sequence provided in guide and will let you know. From what i remember, typing particle in command line the reply was don’t exists. Typing .particle the reply was serial error, try to reinstall -mg -dddd (and such things) bt again error. I’m tired now, will get a sleep for a couple hours and will retry.

Before trying the manual route, give the CLI installer a shot. That should give you everything you need.

Impossible to install CLI using windows application. From memory, i had the same issue before 3 weeks when i installed for first time CLI and i did it manually following the instructions. The same i did now and managed to install again CLI. Now i can't complette a device DFU and install tinker again using the doctor. In the last steps i receive an error message, i don't remember and i don't like to remember it. I can't connect P1 in WLAN, it breaths white again! Oh my!

Here is the issue, the error is shown in last lines. I can’t connect P1 to WLAN.

Microsoft Windows [Έκδοση 6.1.7601]
Πνευματικά δικαιώματα © 2009 Microsoft Corporation. Με επιφύλαξη κάθε νόμιμου δικαιώματος.

C:\Users\FOTIOS>particle doctor
The Device Doctor will put your device back into a healthy state
It will:
- Upgrade system firmware
- Flash the default Tinker app
- Reset the device and server keys
- Clear the Wi-Fi settings

The Doctor will operate on your P1 connected over USB
You’ll be asked to put your device in DFU mode several times to reset different settings.

Updating system firmware

Put the device in DFU mode
Tap RESET/RST while holding MODE/SETUP until the device blinks yellow.
? Select Continue when ready Continue

> Your device is ready for a system update.
> This process should take about 30 seconds. Here it goes!

! System firmware update successfully completed!

> Your device should now restart automatically.

Flashing the Device Doctor app

This app allows changing more settings on your device

Put the device in DFU mode
Tap RESET/RST while holding MODE/SETUP until the device blinks yellow.
? Select Continue when ready Continue

Flash success!

Configure IP address

? Select how the device will be assigned an IP address Dynamic IP
Switched to dynamic IP

Clear all data in EEPROM storage

? Select Continue when ready Continue
Cleared EEPROM data

Clearing and setting up Wi-Fi settings

? Select Continue when ready Continue
Cleared Wi-Fi credentials

Entering listen mode

? Should I scan for nearby Wi-Fi networks? No
Attempting to configure Wi-Fi on COM6
? SSID Forthnet-XXXXX
? Security Type WPA
? Wi-Fi Password XXXXXXXX
Done! Your device should now restart.

Resetting server and device keys

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:d008
spawning dfu-util -d 2b04:d008 -a 1 -i 0 -s 2082 -D C:\Users\FOTIOS\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: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 = 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:d008
Found DFU device 2b04:d008
Error creating keys… Error: Command failed: C:\Windows\system32\cmd.exe /s /c “openssl genrsa -out 490033001751353431383737_rsa_new.pem 1024”
‘openssl’ ??? ??? ?? ??? ? ??? ???,
??? ??? ? ??? ??? ???.

Make sure your device is in DFU mode (blinking yellow), and that your computer is online.
Error - Error: Command failed: C:\Windows\system32\cmd.exe /s /c “openssl genrsa -out 490033001751353431383737_rsa_new.pem 1024”
‘openssl’ ??? ??? ?? ??? ? ??? ???,
??? ??? ? ??? ??? ???.

The Doctor didn’t complete sucesfully. Command failed: C:\Windows\system32\cmd.exe /s /c “openssl genrsa -out 490033001751353431383737_rsa_new.pem 1024”
‘openssl’ ??? ??? ?? ??? ? ??? ???,
??? ??? ? ??? ??? ???.

> Please visit our community forums for help with this error:
https://community.particle.io/

C:\Users\FOTIOS>

Now it breathes green (cloud not connected).
Please note that i flashed several other firmwares and the problem arised after an attempt to flash again Tinker.
By the chance, this process of all necessary installations is unorganized: one file here, other file there etc.
I use a Win7 Pro x64 machine with ESET smart security and Windows CLI installation allways fails.

The reason why these OpenSSL commands failed needs to be investigated. Could it be due to permission issues?

1 Like

I don't know what you mean. I had a working P1 custom module, was registered in my account, had flashed some Modbus firmwares and later decided to flash again the Tinker app. When i opened the CLI, a message appeared that a new CLI version is available --> use npm install -g particle-cli. I did it, and got an error (or warning) message that serial is not connected (or something). After that, i don't remember what did exactly, it was so many actions. Uninstalled - reinstalled everything related to Particle (included the SSL app), put P1 in listening mode, run Particle setup and identify etc. Till here all right. Tried Particle doctor for DFU and that is the resulted message.
Now what i have, is a working P1 module (it can connect to WLAN of router, so WiFi chip is OK) but cannot connect to cloud. It blinks green or breathes green. I lost cloud connection. I will give a new try now. From memory, i've read in docs (i don't remember where exactly) that if you make an action with CLI you will lost permanently connection? to cloud? I don't remember exactly.
Thanks

You could try the "manual" way what particel doctor would bundle to get more verbose debugging info

// in Listening Mode (blinking blue) 
particel identify
// all the following in DFU Mode (blinking yellow)
particle update
particle keys server
particle keys doctor <yourDeviceIDFromFirstCommand>
particle flash --usb tinker

Post the output of each step


BTW, double posting for the same issue is not appreciated here

Hence I'll lock this this thread.

1 Like

Just wanted to add that using the CLI, under normal circumstances, will absolutely not lock you out of anything. Not sure where you get that idea from, but if you do manage to find it in the docs, let us know.
There are certain settings you can choose that disable the connection (pointing the device to a local cloud instead of the Particle cloud), but the CLI doesn't do these by itself. Even if you somehow end up in one of those situations, the CLI is also capable of restoring it to normal. It most definitely won't lock you out permanently.

1 Like