# Can't flash from web IDE

**URL:** <https://community.particle.io/t/cant-flash-from-web-ide/6959>\
**Category:** Troubleshooting\
**Created:** [September 14, 2014, 10:20pm UTC](https://community.particle.io/t/cant-flash-from-web-ide/6959 "2014-09-14T22:20:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/eric/32/20751_2.png) [@eric](https://community.particle.io/u/eric)\
**Post date:** [September 14, 2014, 10:20pm UTC](https://community.particle.io/t/cant-flash-from-web-ide/6959/1 "2014-09-14T22:20:41Z")

</div>

Hi folks,

All my attempts of flashing my core through the web ide are failing no matter if it’s a new app or a firmware update (like the deep update). After compiling a new app and starting the flash procedure, my core starts to blink in magenta and after some (long) time it automatically enters in DFU mode blinking in green.

This only happens when I try to flash OTA. Using the spark-cli I can compile and flash over USB without any problem.

What could be the problem?

Cheers,

Eric

---

<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:** [September 14, 2014, 11:07pm UTC](https://community.particle.io/t/cant-flash-from-web-ide/6959/2 "2014-09-14T23:07:45Z")

</div>

You can try patching the core with `spark flash --usb cc3000` via DFU mode and try again. 🙂

---

<div class="post-metadata">

**Author:** ![eric](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/eric/32/20751_2.png) [@eric](https://community.particle.io/u/eric)\
**Post date:** [September 14, 2014, 11:54pm UTC](https://community.particle.io/t/cant-flash-from-web-ide/6959/3 "2014-09-14T23:54:28Z")

</div>

hi kenneth, I actually already patched it, but I had to do it via DFU. The `spark flash --usb cc3000` produces the same outcome of the web flash (ie, blinking in magenta then enter DFU mode). I guess due to the fact that it has to download the patched firmware OTA.

What I found most strange is that, once I flash a new app using the cli the core communicates without any problem with Spark REST server. All my Spark variables and functions work as expected. The only thing that I can’t do (to my knowledge) is to update my core over the air.

---

<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:** [September 14, 2014, 11:56pm UTC](https://community.particle.io/t/cant-flash-from-web-ide/6959/4 "2014-09-14T23:56:31Z")

</div>

That shouldn’t be the case but i’m guessing that some code you wrote is causing the behavior and not permitting OTA to occur properly. If you are able to share it, we should be able to see what’s going on. 😉

---

<div class="post-metadata">

**Author:** ![eric](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/eric/32/20751_2.png) [@eric](https://community.particle.io/u/eric)\
**Post date:** [September 15, 2014, 1:21am UTC](https://community.particle.io/t/cant-flash-from-web-ide/6959/5 "2014-09-15T01:21:27Z")

</div>

The problem is happening with any code and any firmware I try. The code I was working on was a very simple humidity sensor reading (see below) but even if I try to flash the sample blink the OTA flashing fails. However the same code gets flashed ok when using the spark cli over usb.

What get’s me confused is that only the flashing step fails. Once it it’s flashed the core does connect to the wifi successfully and interact if the Spark API server without any problem.

What exactly is the core doing when it blinks in magenta? Could be the case of the download be failing?

Also, Is it possible to set the core to use a proxy? If so I may check what is happening when it goes from magenta to green (in dfu mode).

Cheers,

ps.: you can check the code I’m running below.

```
int umidade = 0;
char message[20] = "inicializando";

void setup() {
    Spark.variable("umidade", &umidade, INT);
    Spark.variable("message", &message, STRING);
    pinMode(A0, INPUT);
}

void loop() {
  umidade = map(analogRead(A0), 1023, 0, 0, 100);
  strcpy(message, umidade <= 50 ? "seco" : "umido");
  delay(200); 
}
```

---

<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:** [September 15, 2014, 2:48am UTC](https://community.particle.io/t/cant-flash-from-web-ide/6959/6 "2014-09-15T02:48:47Z")

</div>

OH! The core is `blinking magenta` when you perform a flash?

Each magenta blink is one packet received and you will eventually see it flashing magenta rapidly which indicates that the OTA flashing is done.

Sounds like OTA flashing is working for you then. 😃

---

<div class="post-metadata">

**Author:** ![eric](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/eric/32/20751_2.png) [@eric](https://community.particle.io/u/eric)\
**Post date:** [September 15, 2014, 11:11am UTC](https://community.particle.io/t/cant-flash-from-web-ide/6959/7 "2014-09-15T11:11:44Z")

</div>

Indeed it does start flashing but it looks like the flashing is interrupted or does not end properly.  
After flashing magenta for some time, the core then stops and start `flashing green`. At this point it can be listed with `dfu-util -l` which indicates to me that the flashing process was not successful.

---

<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:** [September 15, 2014, 11:46am UTC](https://community.particle.io/t/cant-flash-from-web-ide/6959/8 "2014-09-15T11:46:48Z")

</div>

That’s weird. I’ll have to ping @dave and @will for help.

---

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dave/32/181_2.png) [@Dave](https://community.particle.io/u/Dave)\
**Post date:** [September 15, 2014, 4:45pm UTC](https://community.particle.io/t/cant-flash-from-web-ide/6959/9 "2014-09-15T16:45:29Z")

</div>

Hmm… you mentioned it fails during an auto-update, or any kind of flash, have you done the deep\_update on this core yet?

Can you post a video of what the core’s main RGB led does during / after an OTA flash?

Thanks!  
David

---

<div class="post-metadata">

**Author:** ![eric](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/eric/32/20751_2.png) [@eric](https://community.particle.io/u/eric)\
**Post date:** [September 17, 2014, 12:59am UTC](https://community.particle.io/t/cant-flash-from-web-ide/6959/10 "2014-09-17T00:59:46Z")

</div>

Hi guys, sorry for the long delay on replying. @Dave, after it failed the upgrade dispatched using the web IDE, I performed a manual deep\_update by downloading the patched firmware from the docs site and flashing it with dfu-util.

I tried to upload some videos yesterday but I got beated by my iphone. Today I finally made it and just upload two videos showcasing my troubles. One was recorded yesterday and the other today.

There is a curious change in how core behaves from yesterday to today, but I can’t explain why. The code and process from yesterday to today were exact the same. Links are below, with short explanation about what happens.

[http://youtu.be/vyxWZm37EYs:](http://youtu.be/vyxWZm37EYs:) recorded 15/09. The core was running already running my app and feeding data into Spark cloud when I flashed it using the WEB IDE. It keeps blinking magenta for almost 8 minutes when it finally stops and _automatically_ enter in DFU mode (you can save your save 07 minutes of boriness by jumping into the final 7min.).

[http://youtu.be/cKBXqBKnOeY:](http://youtu.be/cKBXqBKnOeY:) recorded 16/09. The core is in DFU mode (from yesterday) when I first flash it using the CLI. It uploads the firmware as expected and start feeding the Spark Cloud. Then I flash _the same code_ using the web IDE. After some minutes (only 2min) it stops blinking (and working) _but does not enter in DFU mode_ requiring me to manually put it into DFU mode so I can flash it again.

The code used during those tests are liste below. When I flash it over usb the core runs without trouble, feeding the REST api without any trouble.

```
int umidade = 0;
int sensor = 0;
char message[20] = "inicializando";

void setup() {
    Spark.variable("sensor", &sensor, INT);
    Spark.variable("umidade", &umidade, INT);
    Spark.variable("message", &message, STRING);
    pinMode(A0, INPUT);
}

void loop() {
  sensor = analogRead(A0);
  umidade = map(sensor, 1023, 0, 0, 100);
  strcpy(message, umidade <= 50 ? "seco" : "umido");
  delay(200); 
}

```

Regards,

---

<div class="post-metadata">

**Author:** ![Meth](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Meth](https://community.particle.io/u/Meth)\
**Post date:** [November 18, 2014, 8:47pm UTC](https://community.particle.io/t/cant-flash-from-web-ide/6959/11 "2014-11-18T20:47:50Z")

</div>

Since yesterday I have been able to Flash from the WEB IDE but the last 4 hours I am incapable of flashing, is there any issues with the sever ? or any one facing this issue, and I can’t even read my serial connection when I use `spark serial monitor` I see`I didn't find any cores available via serial No serial port identified`, when I use the cmd line tool `spark list` I can see the core that its online,  
The other funny thing is that when I reset the core I can access it with serial cmd line but as soon as it connects and goes into cyan mode, Am incapable of serial monitoring.  
Just wrote this small code to demonstrate it.  
Thanks  
Meth

```
    int LED = D7;void setup() {
    pinMode(LED, OUTPUT);
    Serial.begin(9600);
    Serial.println("started!");
}

void loop() {
    Serial.println("Working!");
    digitalWrite(LED, HIGH);
    delay(250);
    digitalWrite(LED, LOW);
    delay(250);
}
```
