Flashing Spark Core not working

Hi,

after some weeks of idling, I wanted to play with my Spark Core again.

However, I have troubles logging in, or flashing the device via USB.

I see the blue LED toggling fine, but when I scan for the device in my wifi, I see no device. When I connect the device with a USB cable and run:

 $ particle setup

There is no device either.

Also,

dfu-util -l

does not list a device, and

ls -ltr /dev/cu.*

does not show anything either.

How can I debug this setup? What is the most simple way to get again some application code running? (I would like to try this: Tutorial: Upgrading Factory Reset Firmware but first I need to see a device :slight_smile:

Thanks!

For any type of USB connection to work, it’ll need to be in either listing (blinking blue) or DFU (blinking yellow) mode. Or you’ll need to have opened a Serial connection in your code.
The easiest way to start fresh is to do a factory reset. That’ll allow you to configure your device from the factory Tinker firmware, as if it’s out of the box once more.

My core also stopped accepting a new flash, about 12 hours ago. I guess I should do the factory reset also. I have been using the OTA flash on the build IDE.

I have done the factory reset, and all worked ok, I was able to flash some code, and it ran.
But, then when I made slight changes to the script, and tried to flash again, I keep getting "request timed out , flash unsuccessful ". (I have tried this morning about 12 times).

Could it have anything to do with the fact that I am using
Spark.publish(“hc-sr04 inches”,String(inchesAverage));
in the code that is currently running?

Maybe I don’t understand the procedure to flash code OTA to the core, using the build IDE.
I was able to do it consistently for a few months, and now not.

Should I take out the Spark.publish(),
if I plan to reflash my core often, and don’t want to go through a factory reset each time?
Thanks

SUCCESS! I took out the Spark.publish(), (after a factory reset), and now, every time I hit “flash” it does it. Glad to see “flash” working so good again.
If the Original Poster has his problem solved, and I do, someone can mark this as [SOLVED]…
Thanks.

@Jack,

Where is the Spark.publish you speak of? Is it simply a matter of removing it once for all your code?

Thanks!

Spark.publish() shouldn’t create issues like that. Most likely, there’s something else going on in your code that’s wreaking havoc. If you’re willing to share your code, it’d be easier to debug.

Moors7 will probably be able to help you.
But in my code (month ago now), I added Spark.publish(). If you have not added that into your code, then it is not there.

Flashing code OTA is also not working very consistently for me.

How can I flash via usb? I imagine I do this by DFU, but what command to I use? I want to flash code that is currently in my particle IDE. Thanks!

In the IDE, click the little download button:

That will download the compiled .bin file. In the directory that’s downloaded to, open your command prompt and do particle flash --usb firmware.bin. Assuming your device was in DFU mode, that should work.

1 Like

Thanks @Moors7

1 Like