[SOLVED] Bluz DK does not flash despite being connected to particle cloud


#1

Sometimes it works but most of the time it doesn’t. I have tried factory resetting the board and still no luck. I was able to upload the led blink sketch but after changing the code I am unable to flash the board with the new sketch. When it does work it can take up to 5 mins just to flash the sketch, but this happens randomly. The web IDE says “flash successful” but the led on the board does not even turn magenta, it stays cyan. The logs also say “success” but the new sketch is not on the board. What can I do to fix this? Am I the only one with this problem?


#2

What are you using as a gateway? Android or iOS? What version of operating system?

Can you send me the first 8 characters of the device ID? So something like b1e2ABCD. You can direct message it to me on the forums, I can take a look at the logs.

How many devices do you have in the Web IDE? Is the correct one always selected when you are trying to flash?


#3

Thanks for sending over the ID.

What code are you running on bluz? Can you share the user app?

I do see a lot of failures for updates, it is unusual to see this many. The current firmware version doesn’t block the user app from running when an update is happening, so if there is user code in the loop() that can take extended periods of time, that would cause issues.

The new version, 1.1.47, has fixed this and the user code simply isn’t run once an update starts. It is currently in pre-release on the Web IDE.


#4

//I’m just using the blink sketch but change around delay() to 500 and 10000.

int led1 = D0; // Instead of writing D0 over and over again, we’ll write led1

int led2 = D7; // Instead of writing D7 over and over again, we’ll write led2

void setup() {

// We are going to tell our device that D0 and D7 (which we named led1 and led2 respectively) are going to be output
// (That means that we will be sending voltage to them, rather than monitoring voltage that comes from them)

// It’s important you do this here, inside the setup() function rather than outside it or in the loop function.

pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);

}

void loop() {
// To blink the LED, first we’ll turn it on…
digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);

delay(1000);

digitalWrite(led1, LOW);
digitalWrite(led2, LOW);

delay(1000);

}


#5

Interesting. Could you try something? Can you do a factory reset, then open the Web IDE and choose the 1.1.47 firmware from the dropdown next to the device. Then load a blank sketch. The device will go through two OTA updates, one short one first followed by a long one. You will need to reconnect in between.

Once that happens, you will be on 1.1.47, and you can try to OTA update your same blink app again.

Let me know if that works.


#6

It took a while and I wasn’t sure if I was doing anything wrong (since for some reason a blank sketch wouldn’t flash) but just got it now and my bluz dk is at 1.1.47. I am now able to flash sketches again (including a blank one) Thanks for your help eric!