Spark core flashing green after wifi reset


#32

Unlike the Photon where you have roughly three firmware parts (2x system + 1x user/application code) the Core only has one combined application/system firmware section.
So when you build your application code you can decide ontop of which system firmware release you want to build your program.
If you use Particle Build (Web IDE) you can select the desired firmware via a drop-down list under your destination Core’s device ID
see
https://docs.particle.io/guide/getting-started/build/core/#wait-what-is-firmware-

But as you only can flash via USB, you’d need to download the resulting firmware.bin by use of the little cloud symbol next to the app name in Web IDE and then flash via `particle flash --usb yourFirmware.bin’


#33

When I press the cloud symbol it tries to send the firmware to my Core through wifi, but that cannot work because I cannot get it connected. How to do I download the bin file to my PC so I can attempt to send it via USB?


#34

This cloud symbol does that for you?

For me it just builds and then downloads the bin file.


#35

Sorry, my wrong, the error I got was because of a problem with the included library. I will worry about that later. In the meantime I managed to download the firmware for a simple blinking program to my PC. Now how do I go about "flash via `particle flash --usb yourFirmware.bin’ "?

I believe I got node.js installed on my pc because when I type “node” in the command prompt, the prompt changes to “>” . But if I enter:

particle flash --usb c:\firmware.bin

I get:

SyntaxError: Unexpected identifier
at Object.exports.createScript (vm.js:44:10)
at REPLServer.defaultEval (repl.js:117:23)
at bound (domain.js:254:14)
at REPLServer.runBound [as eval] (domain.js:267:12)
at REPLServer. (repl.js:279:12)
at REPLServer.emit (events.js:107:17)
at REPLServer.Interface._onLine (readline.js:214:10)
at REPLServer.Interface._line (readline.js:553:8)
at REPLServer.Interface._ttyWrite (readline.js:830:14)
at ReadStream.onkeypress (readline.js:109:10)


#36

OK, do you happen to know which version node.js you’ve got on your machine?

If you haven’t alread got Particle CLI follow this guide
https://docs.particle.io/guide/tools-and-features/cli/

If you had already got CLI make sure to run npm update -g particle-cli directly from your console (not from within node).

If you haven’t already got it you’d also need DFU support (which you should have, since you said you’d reflashed the CC3000)
https://docs.particle.io/guide/getting-started/modes/photon/#dfu-mode-device-firmware-upgrade-

And if you are on Windows you also need this tool to install the DFU drivers
http://zadig.akeo.ie/

After all that put your Core into DFU mode, then start zadig, find your Core in the drop-down and install libusbK for it.

Once you got that, to avoid any confusion about forward or back slashes and such, cd into the directory where you’ve got your firmware.bin downloaded to.

And again directly in the console enter 'particle flash --usb [firmware.bin]where[firmware.bin]` is the name of the downloaded file.

Sounds a lot of work, but it’s worth it. In future you’ll be able to solve possible problems a lot easier :wink:


#37

I tried npm update and got a revolving cursor animation which wouldn’t stop. I opened another console window and ran “particle flash --usb firmware.bin”

and got this:

C:\>particle flash --usb firmware.bin
Found DFU device 1d50:607f
Apparently I didn't find a DFU device? util said  dfu-util 0.7-msvc

Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 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=7, cfg=1, intf=0, alt=1, name="@SPI Flas
h : SST25x/0x00000000/512*04Kg", serial="6D9151934857"
Found DFU: [1d50:607f] ver=0200, devnum=7, cfg=1, intf=0, alt=0, name="@Internal
 Flash  /0x08000000/20*001Ka,108*001Kg", serial="6D9151934857"

checking file  firmware.bin
spawning dfu-util -d 1d50:607f -a 0 -i 0 -s 0x08005000:leave -D firmware.bin
dfu-util 0.7-msvc

Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 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 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 = 76116
Download        [=========================] 100%        76800 bytes
Download done.
File downloaded successfully
Transitioning to dfuMANIFEST state
Flashed!

C:\>

After that the light started flashing green again


#38

The revolving cursor should be running a while to download all the required files and install them. If you didn’t cancel the process it should be ready by now.

What version are you on now (particle --version)?
I see you’ve still got dfu-util v0.7, maybe you could update to v0.8

But obviously reflashing didn’t help. So we are back at start :weary: This is most annoying!

One final suggestion might sound stupid (especially since you did try before).
Wipe all the WiFi credentials again (hold MODE/SETUP button till rapid flashing blue).
Activate WiFi tethering on your Galaxy S3 Mini.
Enter the credentials correctly.
Take your Phone and Core somewhere far away from your home (WiFi interference) and try if it can connect then.

I’ve pinged more clever Particle guys than me - maybe one of them has a better idea :blush:


#39

I managed to get npm update -g particle-cli to work and started the process again but got the same result.

particle --version returns 1.8.3

I don’t know how to update to v0.8. The link you gave me is a list of files but I cannot find an exe to run.

Tried the wifi tethering trick by temporarily disabling my home wifi, clearing the wifi credentials in the core and entering the tethered wifi credentials via putty. Still the same result - the core goes from flashing blue to flashing green. I am starting to think the core has been bricked. :frowning:


#40

About dfu-util v0.8, amongst these files you’ll find a folder win32-mingw32 and in there you’ll find a bunch of EXE files and a DLL.
I don’t know which browser you’re using, but on Chrom you should be able to right-click on the folder and should be able to Link save to ... (in other browsers something similar should be possible).
Once you’ve downloaded the folder you can put that wherever you want and need to add the new location to your system PATH.

Not asked this before, but you are not happening to be using WEP for your WiFi?
If so, you might be interested in reading this
How to setup WEP secured network on the Photon


#41

I downloaded the files and placed them in a folder and then added the location to the system PATH. Ran the flash again but got the same result. It says flashing successful but the Core starts flashing green then every 30 seconds or so it flashes white once and then restarts flashing green.

My wifi router is set WPA/WPA2 - Personal.


#42

I’m running out of ideas now - maybe time to get in contact with @corey or hello[at]particle[dot]io


#43

Thanks, @ScruffR I will do that. All this time I thought I was talking to a Particle representative! :smile:


#44

No sorry, Elites are only enthusiastic volunteers :blush:


#45

Hey @osprey,

I’ll message you !

-Corey


#46

I wonder if this gives any indication of what the problem is:


#47

This does not necessarily mean anything. On my Windows 8.1 & Windows 10 machines I never get a WiFi network when scanning via CLI but when I enter my known credentials my devices still connect without fuss.


#48

It worked! It finally worked! I followed the instructions in this post:

Replacing “Spark” with “Particle”. Step 6 did not work (see screen shot above) so I applied the wifi settings using Putty. Later I applied different wifi settings using the Android App and it worked too.

@ScruffR , I know that most of the steps in this post were suggested by you and I had tried them, but I guess it was just a matter of doing them in the right sequence. Or maybe I was flashing the wrong cc3000. Anyway, thanks for your help and patience!


#49

Glad to hear that it finally worked out for you :+1:


#50

It can’t connect to WiFi channels >11, so set up your router accordingly.

Thanks @ScruffR, I have been battling the eternal green blink on the Core for so long and almost gave up, untill I read your post. My wifi was on channel 13! Fixed it and the Core is completely back alive.


#51

That’s the beauty of this community: Collective memory :wink:

But the docs would also have stated the fact
https://docs.particle.io/support/troubleshooting/common-issues/core/#device-doctor
https://docs.particle.io/guide/getting-started/start/core/#what-39-s-on-it-