Cannot reset to factory?

Hi all,

I had a spark core running for the last few months and it worked great. However today I fired the spark up again (using the same router etc) and it is stuck on the green blinking light. When I tried to give it a factory reset (Hold MODE, click reset, hold MODE for additional 10 sec) the following sequence happens:

blinking green
Hold MODE
Hit RST
RBG light goes off for 3 secs
blinking green for 7 secs
flashing white for 3 secs
blinking blue
I start up Tinker to connect to the core
I fill in the wifi credentials
solid blue
blinking green
The App never finds a core “No cores found”

So I’m not seeing the yellow blinking light at (and this might somehow be the reason I cannot connect to the cloud)

Seems like factory reset did work since your core entered Listening Mode (blinking blue).

Blinking yellow will not occur unless you place the core in DFU mode. Were there any changes that might be causing this issue?

Thanks for the fast reply!

I recalled from last time it blinks yellow in between when doing a factory reset.
When I do try to put it in DFU mode (http://docs.spark.io/connect/#appendix-dfu-mode-device-firmware-upgrade)
it just start blinking green and not yellow

@kennethlimcp, does 3sec of white flashing before turning blue not seem a bit short for a propper factory reset?

Hmm… Not sure if it is an led issue. If you plug it to your laptop via USB, you should be able to see if listed if it is in DFU mode.

@ScruffR good point but the current bootloader won’t enter listening mode if a factory reset is not performed (besides the normal way to enter listening mode).

Anyways, there’s something funny about this blinking green regardless whether a factory reset was performed or not.

Does it not enter listening mode on normal bootup if the credentials store of the CC3000 was flushed somehow too?

I’ll try that later today when I have a USB cable available and report back

Yes, exactly that. Listening mode is handled by the firmware and happens when there are no wifi credentials. The bootloader deals with only DFU mode and factory reset.

To me the “yellow” led used in DFU mode has a green tinge to it on the core, but of course nowhere near as pure green as the proper green one sees when connecting to wifi.

1 Like

So it seems the spark is alive

When I logon over USB:

SSID: OpenWrt
Security 0=unsecured, 1=WEP, 2=WPA, 3=WPA2: 0
Thanks! Wait about 7 seconds while I save those credentials...

Awesome. Now we'll connect!

If you see a pulsing cyan light, your Spark Core
has connected to the Cloud and is ready to go!

If your LED flashes red or you encounter any other problems,
visit https://www.spark.io/support to debug.

Spark <3 you!

And the LED blinks green again, but it never connects. I can normally connect over Wifi to my router using my phone and laptop etc.

Any suggestions?

I just tried to get it in DFU mode, but this doesn’t work it won’t start blinking yellow.
I’ve recorded it here: https://www.youtube.com/watch?v=fejRRNGabe4&feature=youtu.be

those using dfu mode successfully are you on linux? if so where did you get the code for dfu utils as the common linked location does notwork.

I’m on a Mac, but since I’m not able to get the Spark itself in DFU mode I didn’t install dfu-utils yet.

Hi @original_pir8

See this thread for the temporary location:

@Patrick1

I have used dfu-util on Mac, Windows, and Linux (Ubuntu). It is a command line tools (Terminal on a Mac).

Could your core be flashing white then green in that video? It is really hard to see colors but something is wrong there. Try holding the mode button longer!

Its blinking green, then dark, than blinking green again. I’ll make another vid that hopefully shows it clearer

Why do you think you didn’t get it in dfu mode? It looks that way to me! Congratulations!

DFU mode is part of the bootloader that’s reponsible for starting the system - if that’s not working then nothing will. :slight_smile:

1 Like

@bko I’ve made a video clip (https://www.youtube.com/watch?v=mVIoa9jkWBM) that shows what happens when I try to factory reset. What I’m missing in this sequence is the yellow led blinking as you can see it is very green.

When I do try to go into DFU mode, @mdma is right it works (albeit with a green blinking led not a yellow one). I see this in the terminal

$ dfu-util -l
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

Found DFU: [1d50:607f] ver=0200, devnum=1, cfg=1, intf=0, alt=1, name="@SPI Flash : SST25x/0x00000000/512*04Kg", serial="6D81206C4852"
Found DFU: [1d50:607f] ver=0200, devnum=1, cfg=1, intf=0, alt=0, name="@Internal Flash  /0x08000000/20*001Ka,108*001Kg", serial="6D81206C4852"  

I just hookedup a different router (that also worked before with the core) and when entering the correct credentials the core is still stuck on the green blinking light.

The observations so far:

  • USB mode works
  • DFU mode works but I don’t see the yellow blinking led in the sequence only green blinking
  • The core doesn’t connect to the two routers is connected to previously and is stuck in green blinking mode
  • The factory reset seems to work, although the sequence seems rather short as noted by
    @ScruffR and @kennethlimcp

Any advice on how to proceed?

@Patrick1,

the factory reset sequence looks ok and the core managed to enter Listening mode (blinking blue)

Maybe one of the led is non-functional which explains the difference in colour.

Can you perform a CC3000 patch:

-Run this command: dfu-util -d 1d50:607f -a 0 -s 0x08005000:leave -D cc3000-patch-programmer.bin

It should now enter Listening mode and try connecting to Wifi again :slight_smile:

3 Likes

It’s a bit hard to say with the video, but could it be that you are only missing the red sub LED of the RGB LED?
In this case the green blinking might acutally be yellow and the cyan (looks cyan to me, but it may also be pure blue on the video) might actually be white (or magenta, if it’s purfe blue).

Could you try to power the red sub LED just very briefly - e.g. with a DMM with diode measure setting?
And if the LED works, could you can flash this code via USB, to see if the traces to the LED are still in tact?

SYSTEM_MODE(SEMI_AUTOMATIC)

void setup()
{
  Serial.begin(115200);
  RGB.control(true);
}

void loop()
{
  RGB.color(0xFF0000);
  delay(500)
  RGB.color(0x00FF00);
  delay(500)
  RGB.color(0x0000FF);
  delay(500)

  if (Serial.available())        // send any byte via serial to connect
  {
    RGB.control(false);          // reactivate normal color code
    while (Serial.read() >= 0);  // flush the serial buffer
    Spark.connect();
  }
}

And @kennethlimcp got there first - while I was typing this - again :wink: and with a similar diagnose :persevere:

2 Likes

Thanks guys!

I went first by @kennethlimcp answer:

dfu-util -d 1d50:607f -a 0 -s 0x08005000:leave -D cc3000-patch-programmer.bin
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

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 1d50:607f
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash  "
Downloading to address = 0x08005000, size = 25068
Download     [=========================] 100%        25068 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state 

The light was blinking green here not magenta. Pressing the mode button didnt work.

Then I ran

dfu-util -d 1d50:607f -a 0 -s 0x08005000:leave -D spark_tinker.bin
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

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 1d50:607f
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash  "
Downloading to address = 0x08005000, size = 79996
Download	[=========================] 100%        79996 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state

And the core connected to the cloud :smiley: Whoohoo. Thanks :sunny:

Sorry @ScruffR that I couldn’t test our your idea.

What can I do to prevent this from happening again? Because I had the feeling I didn’t do anything weird that cause this.

3 Likes