Downloading code from spark core

So I accidentally deleted my app on the spark core builder. The code I want is still flashed to the core. I don’t suppose that I can download my code from the core or maybe restore my app in some other way? thanks

You can get back the binary…but restoring back to original code is gonna be really…tough

how do i get back the binary?

You can use dfu-util to download the binary from the core to your laptop.

dfu-util -d 1d50:607f -a 0 -s 0x08005000:0x08108000 -U firmware.bin

@dave i need some help with the end address... Can't calculate it properly off my mind :smiley:

108KB max for core firmware --> What's the hex for this?

@naterackers the 0x08007000 might not be right so just hang on

If you wanted to the firmware binary, then yeah, you could do a:

dfu-util -d 1d50:607f -a 0 -s 0x08005000:108000 -U firmware.bin

@naterackers - If you destroyed your source code, wrote over it and saved or something, email me at david@spark.io from your email address on your account, and tell me the name of your project and how far back you want to go, and I can try to go through our database backups and help you out.

Thanks,
David

hi Dave ,

I have done the similar mistake of deleting the core. Can you help me regarding this?

What do you mean by deleting the core?

Like removed from your account?

Or you are referring to user code as per posts above?

@kennethlimcp: Yes ! I have removed from my account … I am not able to add new core to my account now.

I rooted the device to the latest firmware V0.2.3 https://github.com/spark/core-firmware
I have new issue - like Green LED flashes and does not get connected to the network at all…
I did Factory reset - went back to the old firmware - updated CC3000 firmware but none seems to be working.
Please help me bob,

Simply use the Smart config app and connect your core again :slight_smile:

@kennethlimcp: Device seems to exchange credentials using SmartApp Config but does not proceed …
Spark starts blinking Green LED repeatedly.

Did you managed to connect successfully before? You might want to factory reset and reconnect again :slight_smile:

@Dave @kennethlimcp: I was able to connect successfully before! I did factory reset and reconnected too but didn’t work :frowning: .

In Spark-core Build https://www.spark.io/build
Spark Core - Add new Spark core - i am not able to add new

If i add a Device ID also i am not able to connect/Claim core because i had previously deleted my core.
After Factory Reset - Device gets into listening mode

  1. Now, i try to connect through IOS - Smart App Config TI App … Device doesn’t get connected.
  2. If i try connecting to the core through Tinker App - Device doesn’t get connected at all.
    Green Light flashes repeatedly and doesn’t move ahead.

All this happened because i upgraded to V2.3 Firmware i feel still not sure…

Can you try adding the core id manually in the Web IDE and see what happens?

@kennethlimcp: Hi, I tried adding the core ID Manually in WEB IDE - its does not accept to claim the core …

Weird.

  1. Did you change any router recently?

  2. What did you do which caused the removal of core from your account?

1 Like

HI there, @Skywalker111 - I’ll try to grab @Dave this morning for a moment to see if we can help figure this out.

Hi @Skywalker111,

I think we’re already emailing directly, but I’ll try to chime in here as well. Your core must be online and breathing cyan before you can claim it, this is to help deter brute-forcing.

Did you intentionally delete all your cores and projects, or did you login and find them missing? If so you probably just signed in with the wrong email address.

What do you mean you “rooted the device to the latest firmware”, did you install the unstable nightly build from the master branch of core-firmware? Can you try installing the stable / stock tinker? https://github.com/spark/core-firmware/blob/spark_6/build/core-firmware.bin?raw=true

Thanks,
David

1 Like

Hi @Dave - ,
I found my cores as soon i logged in -there was no problem but @kennethlimcp @Dave I have intentionally deleted the cores and projects unknowingly without knowing the limitations.

hi @Dave,
can you please give the addresses also start and end address to this stable / stock tinker along with dfu-util command ?

https://github.com/spark/core-firmware/blob/spark_6/build/core-firmware.bin?raw=true

The dfu-util command for flashing user firmware is:

dfu-util -d 1d50:607f -a 0 -s 0x08005000:leave -D core-firmware.bin

I highly recommend using the Spark-CLI instead!

Installation instructions for Spark-CLI can be found here:

2 Likes