Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when clearing the EEPROM with the 'particle doctor' command #386

Closed
legionaryu opened this issue Sep 12, 2017 · 7 comments
Closed

Comments

@legionaryu
Copy link

Hi,
Since the first time I used the command 'particle doctor', it never succeeded to clear the EEPROM.
This is output that I'm getting:

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 Electron 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!

Clear all data in EEPROM storage

? Select Continue when ready Continue
The Doctor didn't complete sucesfully. undefined
> Please visit our community forums for help with this error:
https://community.particle.io/
@monkbroc
Copy link
Member

I was looking at this issue this weekend. It turns out the timeout for the EEPROM clear command was super close to the limit. I increased the limit from 1 second to 3 seconds.

Can you try the fix I pushed and if it works for you I'll release a new version.

git clone https://github.com/spark/particle-cli.git
cd particle-cli
npm install
bin/particle.js device doctor

@legionaryu
Copy link
Author

Thanks, @monkbroc!
This timeout increasing solved the issue!

@monkbroc
Copy link
Member

Nice! I'll cut a 1.24.1 release.

@RichardBronosky
Copy link

RichardBronosky commented May 5, 2018

I'm getting the same issue.

$ bin/particle.js device 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 Photon 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!

Select antenna

? Select the antenna to use to connect to Wi-Fi Internal
The Doctor didn't complete sucesfully. undefined
> Please visit our community forums for help with this error:
https://community.particle.io/

@RichardBronosky
Copy link

Based on your comment I made this change and still get the same result.

$ PAGER=cat git diff src/cmd/doctor.js
diff --git a/src/cmd/doctor.js b/src/cmd/doctor.js
index d984656..ffd35a2 100644
--- a/src/cmd/doctor.js
+++ b/src/cmd/doctor.js
@@ -12,8 +12,8 @@ function EarlyReturnError() {
 function SkipStepError() {
 }

-const deviceTimeout = 3000;
-const serialTimeout = 3000;
+const deviceTimeout = 5000;
+const serialTimeout = 5000;

 class DoctorCommand {
 	constructor(options) {

@kennethlimcp
Copy link
Contributor

@RichardBronosky what's wrong with your device?

@RichardBronosky
Copy link

I didn't know the state of it. I was just pulled it out of a drawer where it sat since the Kickstarter. I was trying to just "start fresh" using CLI tools. I got it working tonight but had to use WiFi listen mode and the downloaded HTML file. Very awkward. I wish Particle didn't try to be so cuddly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants