# Local Cloud Firmware Flash

**URL:** <https://community.particle.io/t/local-cloud-firmware-flash/8163>\
**Category:** Firmware\
**Created:** [November 15, 2014, 9:23pm UTC](https://community.particle.io/t/local-cloud-firmware-flash/8163 "2014-11-15T21:23:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![greenoutlet](https://avatars.discourse-cdn.com/v4/letter/g/b782af/32.png) [@greenoutlet](https://community.particle.io/u/greenoutlet)\
**Post date:** [November 15, 2014, 9:23pm UTC](https://community.particle.io/t/local-cloud-firmware-flash/8163/1 "2014-11-15T21:23:16Z")

</div>

Hello Everybody!

I am working on a IoT project here at my university. Because the university internet is WPA-Enterprise, we are having difficulty connected our Cores to the Internet. Instead, we have a router hooked up, and are attempting to utilize a local cloud that is not connected to the internet. I followed the instructions found here:

and got everything working properly as far as I can tell. However, now I want to prove that I can flash code from Netbeans onto the core. I was wondering if anyone could walk me through how to blink an LED by flashing the code locally. When I try to edit the application.cpp as shown in the video, I’m unable to successfully build the code.

Thanks,

Keith

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [November 15, 2014, 11:44pm UTC](https://community.particle.io/t/local-cloud-firmware-flash/8163/2 "2014-11-15T23:44:31Z")

</div>

Compile the code and flash via DFU-util should work.

You can even perform OTA flash via the local ☁

---

<div class="post-metadata">

**Author:** ![greenoutlet](https://avatars.discourse-cdn.com/v4/letter/g/b782af/32.png) [@greenoutlet](https://community.particle.io/u/greenoutlet)\
**Post date:** [November 15, 2014, 11:54pm UTC](https://community.particle.io/t/local-cloud-firmware-flash/8163/3 "2014-11-15T23:54:06Z")

</div>

I replaced the application.cpp code with the one found here, which I believe is the working tinker firmware.

[https://github.com/spark/firmware/blob/master/src/application.cpp](https://github.com/spark/firmware/blob/master/src/application.cpp)

It can build it fine, but when I compile I get this error:

arm-none-eabi-g++.exe: error: /cygdrive/C/Spark/core-firmware/src/application.cpp: No such file or directory  
arm-none-eabi-g++.exe: fatal error: no input files  
compilation terminated.

COMPILE FILE FAILED (exit value 1, total time: 55ms)

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [November 16, 2014, 12:00am UTC](https://community.particle.io/t/local-cloud-firmware-flash/8163/4 "2014-11-16T00:00:51Z")

</div>

Where did you place it and which repo branch are you using?

Also, where did you run make?

This is more of a compilation issue in Netbeans and I dont use it so someone else has to jump in 😉

---

<div class="post-metadata">

**Author:** ![greenoutlet](https://avatars.discourse-cdn.com/v4/letter/g/b782af/32.png) [@greenoutlet](https://community.particle.io/u/greenoutlet)\
**Post date:** [November 16, 2014, 12:35am UTC](https://community.particle.io/t/local-cloud-firmware-flash/8163/5 "2014-11-16T00:35:09Z")

</div>

I have pretty much abandoned Netbeans at this point, as it was way over my head.

New question: I want to use Spark.publish() to send data (temp or something) from the core to a .txt file on my local cloud. Are there any resources for using Spark.publish() without being connected to the internet? All the examples I’ve found required an internet connection.

---

<div class="post-metadata">

**Author:** ![kennethlimcp](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@kennethlimcp](https://community.particle.io/u/kennethlimcp)\
**Post date:** [November 16, 2014, 1:03am UTC](https://community.particle.io/t/local-cloud-firmware-flash/8163/6 "2014-11-16T01:03:38Z")

</div>

If you are running a local ☁, no internet connection is required.

You will be able to see your `Spark.publish()` stream using `spark subscribe` in **Spark-cli**

You can then write a script to listen to the events you are interested in and process accordingly 😉

Or actually @wgbartley has been hacking on some cool Stats library and he might be able to suggest some stuff!

---

<div class="post-metadata">

**Author:** ![greenoutlet](https://avatars.discourse-cdn.com/v4/letter/g/b782af/32.png) [@greenoutlet](https://community.particle.io/u/greenoutlet)\
**Post date:** [November 21, 2014, 10:14pm UTC](https://community.particle.io/t/local-cloud-firmware-flash/8163/7 "2014-11-21T22:14:34Z")

</div>

Ok awesome, thanks! So I’ve successfully been able to to run the Uptime code given here:

> **[Tutorial: Getting Started with Spark.publish()](https://community.particle.io/t/tutorial-getting-started-with-spark-publish/3422)**
>
> Here’s a tutorial to get you started using Spark.publish(). Let’s imagine you want to monitor your core’s uptime, that is, how many hours, minutes, and seconds since the last time the core was reset or powered-up and view it on a web page that you...

and I’ve been able to use the spark subscribe command in the CLI. I can’t figure out to log this data though. We tried something like:

C:\User\vsolar\Desktop\>spark subscribe \>testdata.txt

and we got our data to print into this .txt file on the desktop! Now we are looking to implement this sort of thing directly in the application.cpp script. We can’t figure out the proper syntax to tell spark.subscribe() to log the data to a specific place in C:\
