# Firmware v0.2.0 released, with many fixes

**URL:** <https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619>\
**Category:** Firmware\
**Created:** [March 25, 2014, 10:25pm UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619 "2014-03-25T22:25:56Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![RWB](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rwb/32/22599_2.png) [@RWB](https://community.particle.io/u/RWB)\
**Post date:** [March 27, 2014, 12:09am UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/21 "2014-03-27T00:09:54Z")

</div>

@BDub So what is actually included in this new updated regarding the following:

```
 Spark.connect(), Spark,disconnect(), WiFi.on(), WiFi.off()

```

&

```
#include "spark_disable_wlan.h"
#include "spark_disable_cloud.h"

```

You can always enable them at runtime in your code via:

```
WiFi.on(); // turns on WLAN
Spark.connect(); // Connects to CLOUD

```

I didn’t see this feature mentioned in the update info but know it was supposed to hit the Web IDE firmware in this next update. Please fill me in what the deal is what these features since they are not mentioned in the release info.

---

<div class="post-metadata">

**Author:** ![BDub](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bdub/32/5137_2.png) [@BDub](https://community.particle.io/u/BDub)\
**Post date:** [March 27, 2014, 12:46am UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/22 "2014-03-27T00:46:06Z")

</div>

Sounds like Zach is going to be writing up the docs on the functions… there are actually more things like status involved.

Basically if you add this to the top of your application.cpp or .ino:

```auto
#include "spark_disable_wlan.h"

```

it will disable your WiFi connection from the time you power up your Core. Your RGB led should breathe white. Your code will run as soon as your core gets power.

In your code you can then run `WiFi.on();` to connect to WiFi (WLAN) and your core will breathe GREEN.

At this point your core will probably connect to the cloud automatically? But if you also had included `#include "spark_disable_cloud.h"` in your code the Cloud would be disabled until you ran `Spark.connect();`

There is an intermediate step after running WiFi.on(); before you should run Spark.connect(); This is where you would look for the WiFi.status() == WIFI\_ON like this:

```cpp
if(WiFi.status() == WIFI_ON) {
  Spark.connect();
}

```

Spark.disconnect(); will disconnect you from the Cloud, and WiFi.off(); will disconnect you from WLAN.

---

<div class="post-metadata">

**Author:** ![RWB](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rwb/32/22599_2.png) [@RWB](https://community.particle.io/u/RWB)\
**Post date:** [March 27, 2014, 1:34am UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/23 "2014-03-27T01:34:38Z")

</div>

@BDub You Da Man 😃

Thank you very much for the clean and clear explanation!

---

<div class="post-metadata">

**Author:** ![AndyW](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/andyw/32/686_2.png) [@AndyW](https://community.particle.io/u/AndyW)\
**Post date:** [March 27, 2014, 1:38am UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/24 "2014-03-27T01:38:17Z")

</div>

BTW, those tarballs are a PITA - it mangles the names so the makefile can’t find things, because of the trailing spark\_3

---

<div class="post-metadata">

**Author:** ![RWB](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rwb/32/22599_2.png) [@RWB](https://community.particle.io/u/RWB)\
**Post date:** [March 27, 2014, 2:42am UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/25 "2014-03-27T02:42:41Z")

</div>

@BDub @david_s5

I loaded the new updated firmware and I’m happy to announce that it seems that the most annoying issue I had with the Spark Core seems to be gone and fixed now. The issue I and @Bdub had was when my cellphone would loose its data connection or when it would reset the Spark core would freeze up and flash dark blue until a manual rest was done which was happening often lately.

I’ve tried to force this to happen about 4 times now and the spark core reconnects successfully every time so far.

Very good news for us end users who were having this issue.

---

<div class="post-metadata">

**Author:** ![zach](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/zach/32/20714_2.png) [@zach](https://community.particle.io/u/zach)\
**Post date:** [March 27, 2014, 3:41am UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/26 "2014-03-27T03:41:31Z")

</div>

> [@BDub](#):
>
> Sounds like Zach is going to be writing up the docs on the functions.. there are actually more things like status involved.

The reason we haven't documented all these functions is that in the future — probably the next firmware release in a couple of weeks — the syntax for these functions will change to be simpler. Didn't want to "release" something only to immediately deprecate it. Just know that we will be re-designing the syntax for these functions in the very near future.

---

<div class="post-metadata">

**Author:** ![BDub](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bdub/32/5137_2.png) [@BDub](https://community.particle.io/u/BDub)\
**Post date:** [March 27, 2014, 4:00am UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/27 "2014-03-27T04:00:38Z")

</div>

That’s definitely better than waiting around for the perfect implementation to release a feature, like Apple did with cut, copy, paste… lol.

---

<div class="post-metadata">

**Author:** ![zachary](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/zachary/32/20717_2.png) [@zachary](https://community.particle.io/u/zachary)\
**Post date:** [March 27, 2014, 4:22am UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/28 "2014-03-27T04:22:57Z")

</div>

The “safe mode” has not been removed in v0.2.0. It will be in the next release.

I am not able to reproduce any issues. Any further debugging news @kennethlimcp? And is anyone else experiencing unexpected instability?

---

<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:** [March 27, 2014, 4:29am UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/29 "2014-03-27T04:29:29Z")

</div>

I decided not to pursue further since it gets my core in a cranky state and I need DFU everytime.

Since `safe mode` is on, it’s somehow not working.

But we might isolate it to socket related issue where your code keeps opening and closing connections repeatedly and ends up flashing red. In this scenario, safe mode doesn’t seems to help.

I have other videos where the core does weird OTA magenta sequences (i’m confident it’s on V0.2.0) but decided not to post it to cause any confusion. 😉

I can’t think of other code where I can force safe mode to kick in. If we have an example like that, I can help to test it out.

---

<div class="post-metadata">

**Author:** ![gruvin](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/gruvin/32/765_2.png) [@gruvin](https://community.particle.io/u/gruvin)\
**Post date:** [March 27, 2014, 4:39am UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/30 "2014-03-27T04:39:25Z")

</div>

> [@zach](#):
>
> To debug, please switch to Spark Firmware v0.2.0 (tagged in each repository as spark\_3)

How do we do that -- the tag thing? Is it some git command? How do we see these tags? What exactly is, "tagged as"? Am I mixing up terminologies and simply way of track here?

I've not seen any documentation on this. All I'm doing is, `git pull` in the folders I originally, `git clone`d. It's all I know how to do, with git anyway. (I use subversion usually. Sorry for swearing! :-P)

Thanks.

---

<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:** [March 27, 2014, 4:45am UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/31 "2014-03-27T04:45:47Z")

</div>

If you use th web github, look for the button `releases` near the branches etc

---

<div class="post-metadata">

**Author:** ![zachary](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/zachary/32/20717_2.png) [@zachary](https://community.particle.io/u/zachary)\
**Post date:** [March 27, 2014, 5:12am UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/32 "2014-03-27T05:12:40Z")

</div>

Good question @gruvin!

The easiest thing is to just download the core-firmware release and use DFU to flash the core-firmware.bin that’s there. But to drop a little git knowledge on you…

In each of the 3 repositories (core-common-lib, core-communication-lib, core-firmware), run

```
git pull
git fetch --tags
git checkout spark_3

```

Then, connect your Core, put it in DFU mode, and clean, build, and flash.

```
cd core-firmware/build
make clean all program-dfu

```

You only have to `clean` the first time, not for changes on the same branch/tag thereafter.

EDIT: When you’re finished just do `git checkout master` in each repo to get back to normal.

---

<div class="post-metadata">

**Author:** ![LZHenry](https://avatars.discourse-cdn.com/v4/letter/l/3e96dc/32.png) [@LZHenry](https://community.particle.io/u/LZHenry)\
**Post date:** [March 27, 2014, 5:22pm UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/33 "2014-03-27T17:22:19Z")

</div>

Please help with some further confusion.  
I have converted to using NetBeans (and the integrated call to dfu). Will the core-firmware.bin be “automatically” loaded by NetBeans???

1. I manuall get the V0.2.0 revisions.
2. Manually copy them into my exsiting directories, overwriting what is there.
3. Then clean, build and load.

Am I properly capturing all the needed core updates???  
Am I capturing the cc3000 updates???

---

<div class="post-metadata">

**Author:** ![zachary](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/zachary/32/20717_2.png) [@zachary](https://community.particle.io/u/zachary)\
**Post date:** [March 27, 2014, 6:55pm UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/34 "2014-03-27T18:55:56Z")

</div>

I don’t have NetBeans to verify with @LZHenry, but as long as you download and replace all three repositories, I think the process you described should work fine.

You are not capturing the CC3000 updates yet, because there are not yet finalized updates to share. 😄 Soon!

---

<div class="post-metadata">

**Author:** ![RWB](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rwb/32/22599_2.png) [@RWB](https://community.particle.io/u/RWB)\
**Post date:** [March 27, 2014, 6:59pm UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/35 "2014-03-27T18:59:46Z")

</div>

@zachary @LZHenry

I have used the netbeans approach to loading firmware onto the spark core manually and all you need to do to get the latest firmware working is to replace the 3 old folders with the new and recompile and then flash.

---

<div class="post-metadata">

**Author:** ![LZHenry](https://avatars.discourse-cdn.com/v4/letter/l/3e96dc/32.png) [@LZHenry](https://community.particle.io/u/LZHenry)\
**Post date:** [March 27, 2014, 8:20pm UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/36 "2014-03-27T20:20:04Z")

</div>

Thank you both. It is good to have confirmation that I properly understand the loading process.

---

<div class="post-metadata">

**Author:** ![Muez](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@Muez](https://community.particle.io/u/Muez)\
**Post date:** [March 28, 2014, 10:43am UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/37 "2014-03-28T10:43:27Z")

</div>

Dear Spark :spark: guys

Can you please fix the extern Timer Interrupt handler error on your web based IDE so that I could load via cloud.

…/…/core-common-lib/SPARK\_Firmware\_Driver/inc/config.h:12:2: warning: #warning “Defaulting to Release Build” [-Wcpp]  
timer.cpp: In function ‘void TIM2\_IRQHandler()’:  
timer.cpp:32:14: error: previous declaration of ‘void TIM2\_IRQHandler()’ with ‘C++’ linkage  
timer.cpp:68:33: error: conflicts with new declaration with ‘C’ linkage

I know you guys are busy and this fix may not be on top of the priority todo list, but I need the feature.  
Currently I am compiling locally from netbeans.

regards,  
Muez

---

<div class="post-metadata">

**Author:** ![bko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bko/32/20704_2.png) [@bko](https://community.particle.io/u/bko)\
**Post date:** [March 28, 2014, 10:55am UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/38 "2014-03-28T10:55:50Z")

</div>

Hi @Muez

I think this was resolved in another thread:

> **[Previous declaration of 'void TIM2\_IRQHandler()' with 'C++' linkage /...](https://community.particle.io/t/previous-declaration-of-void-tim2-irqhandler-with-c-linkage-interrupt-isr-based-timer/3096/5)**
>
> Hey @gruvin - this works now! In order to get this to compile, you need to add it to a library file; it can’t be part of your main .ino file. Then you need to #include "application.h" in that file. If you do that, it should compile as expected!

It looks like you have to put your interrupt handler in a separate file in another tab. Have you tried that already?

---

<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:** [March 28, 2014, 11:27am UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/39 "2014-03-28T11:27:57Z")

</div>

Totally not ❤-ing V0.2.0 somehow 😄

I got a blinking red after an OTA as i try to get the 595 working for my LCD!

A reset immediately went to blinking red and i had to DFU a firmware in before reconnecting to the net.

The next OTA without any change of code didn’t caused this.

---

<div class="post-metadata">

**Author:** ![gruvin](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/gruvin/32/765_2.png) [@gruvin](https://community.particle.io/u/gruvin)\
**Post date:** [March 29, 2014, 2:17am UTC](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619/40 "2014-03-29T02:17:57Z")

</div>

> [@bko](#):
>
> It looks like you have to put your interrupt handler in a separate file in another tab. Have you tried that already?

Yes. It works just fine. 😃

[Previous page](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619.md?page=1)

[Next page](https://community.particle.io/t/firmware-v0-2-0-released-with-many-fixes/3619.md?page=3)
