BluzDK slow blinking Magenta


#1

I’ve had a BluzDK connected to the Cloud for days now, and saw it slow blinking magenta continuously recently. If I look in the Bluz app, it’s disconnected. When I press connect, it will fast blink magenta, then slow blink Cyan once connected.

Instead of throwing out guesses, can someone tell me what this magenta might indicate?

Side note: I just pressed disconnect in the app, and it immediately tried to reconnect, and it did. The app preferences are set to auto re-connect so this behavior seems correct. I think maybe though if I manually press disconnect it could ask me if I want to disable auto re-connect, and if I say yes… finish disconnecting. Not that I’d necessarily want to do this :slight_smile: but you know, for logic’s sake.


BluzDK solid Green
#2

@BDub, on the Bluz Gateway shield, I will occasionally get the same behavior. However, when that happens I need to reboot the GW and reset the bluz to re-establish the cloud connection.

@eric, I just noticed that my Bluz running Tinker and connected via a GW shield is not blinking cyan anymore. In fact, the onboard LED is off entirely. I can control the D7 LED via the Android Particle app and it shows online with Particle CLI.


#3

@BDub The slow blilnking magenta means that the device was connected, but the pings to the cloud failed. So the BLE connection was fine, but for some reason the back-end internet connection failed. In that case, bluz would disconnect from the central, this is the current behavior we implemented for release as a means to recover. In the future, we will handle this more gracefully where it will attempt to reconnect to the cloud without disconnecting from BLE.

@peekay123: Yes, I have seen that to, it is on my list. I have a device that has been connected and online for nearly two weeks, and the LED stopped working after a few days. The device is fine, everything else seems normal, it just stops the LED blinks. Perhaps this can be a “battery saving feature” :smile: I will fix it in a future release…


#4

@eric I did see this again today testing the gateway shield… the blinking magenta makes me think an OTA process in happening. Would it not be proper to revert back to slow green flashing if the cloud pings are failing?


#5

Yes, I agree. I think I need to re-evaluate some of he colors and make it a little more Photon-like, but also maybe a little different in some areas (there is just too much magenta!)


#6

Hello! I recently purchased a couple of bluz and I’m eager to put them through their paces. I’ve already run into a snag though…
Both of my bluz blink a slow magenta after doing a full reset (which I did b/c I couldn’t push out a new firmware OTA).

Now, I can use the app on the phone to attempt a connection from the bluz to the particle cloud. This increases the rate of magenta blinking. But shortly, the app tells me the bluz has disconnected and it resumes it’s slow magenta blinking.

As far as I can tell, I have been unable to flash a new firmware via the particle web IDE in this state. I downloaded the bluzDK-firmware using git, put the bluz into boot loader mode, and can seemingly install a new firmware over USB (with the help of a 3v3 FTDI adapter). The LED blinks appropriately. But when I try and make a new connection to the Particle cloud, it puts me back into the slow magenta blinking state.
I don’t believe these to be beta-modules, but in my attempt to exhaust all solutions, I have followed the instructions pinned above and successfully updated the keys on one of the bluz, with no difference in blinking behavior.

Any ideas?

Thanks in advance.


#7

It might have something to do with how I make main.bin for uploading over usb…
See if this sounds right:

  1. edit the application.cpp file in firmware/user/src
  2. run ‘make’ in the firmware/main directory
  3. choose the firmware/build/target/main/platform-0-lto/main.bin as the file firmware to upload.

I’m not intimately familiar with how make and gcc works…
Thanks for ideas!


#8

Can you send me the device ID’s for the troublesome devices? I just need the first 8 characters, so something like b1e2ABCD. You can private message them to me.

The blinking magenta is confusing as it will be the same in both a non-connected and connected state. It will only blink fast when it is connecting, so it could be that they are online, I can tell better once I have your device ID’s. This is on my list of things to correct in the next release so that it isn’t quite so confusing.

You mentioned you did a reset on the devices because you couldn’t initially perform an upgrade. What happened there? Did you at one point get the devices to blink cyan and be fully connected to the cloud?


#9

I’ve also got a Bluz DK stuck in slow blinking magenta. I’m currently using the Android gateway. When I press the “disconnect” button in the gateway app the LED turns off entirely. When I press “connect” again in the app, the slow magenta blinking does not resume until I press the physical “reset” button the bluz DK.

I’m not sure where to go from here – is there a combination of RST and BTN pushing that can help?

It would be nice to document the RGB LED statuses in the reference material, perhaps on the Troubleshooting page.


#10

We do have some documentation on the different operating states, it is located here: http://docs.bluz.io/tutorials/states/

If it is slow blinking magenta after you power it on or do a reset, then the device is in safe mode. Did you just try to update the firmware? Or do a factory reset?

I think it may have been trying to update to new system firmware, when you hit Disconnect in the app the update was cutoff which is why the LED stayed off. Try connecting it again and wait a few minutes. It should blink magenta a lot for 1-3 minutes and then ultimately reboot with the new system firmware and no longer be in safe mode. Once that happens, it should operate normally again.


#11

Thanks, somehow it started working through the phone app again. I’ve got a Gateway shield setup with the .cpp file, and am currently trying to figure out how to move my BluzDK over to use the Gateway shield rather than the app. I found the “states” documentation, much appreciated. Perhaps a cross-link from Troubleshooting page to make that easier to find.


#12

If the gateway shield is powered on and the LED labeled L2 is blinking slowly, then a DK will simply connect to it. All you need to do is power it on and it should automatically connect to the cloud (just don’t try to connect from the app at the same time).

If the LED on the gateway shield isn’t blinking slowly, or doesn’t blink at all, you may have to try the hot-plug solution. To do that, simply unplug the Photon from the gateway shield, power it on and let it get to breathing cyan state. While it is still powered, and while the gateway shield is off, plug the Photon into the gateway shield.

This hot-plug fix won’t be necessary once we roll out a new version of firmware, and not everyone has the problem. It is only necessary if you don’t see the LED on the gateway shield blinking.


#13

Today I got my troublesome BluzDK updated and fixed. I did the following things:

  • Borrowed an iPhone, downloaded the Bluz Gateway app
  • Factory reset to safe mode
  • Connected to BluzDK with iPhone app
  • waited 10 minutes – still blinking magenta
  • Opened Photon app on Android phone, noticed that my DK said “Online, non-tinker” even though it was blinking magenta!
  • Tried to use “re-flash tinker” from the android app, failed
  • Loaded up the Tinker.ino from the Particle Build IDE, put System.sleep(SLEEP_MODE_CPU) in loop, left the tinker function registrations in setup(), selected troublesome DK, and flashed

The flash “took” and now I’ve got a happy BluzDK blinking cyan running tinker.

Should “reflash tinker” from the phone have worked? It doesn’t look like the particle app doesn’t know about Bluz modules yet since they’re listed as “Photon.”


#14

Glad it is fixed!

Two things. First, the Particle app will not flash Tinker properly to bluz DK. As you pointed out, their app doesn’t recognize bluz yet so flashing Tinker won’t work. It actually tries to flash down the Tinker app compiled for the Photon, which bluz just rejects. I have talked to the Particle team about this, hopefully in the future we can make this work.

Second, I wanted to clarify one point. Safe Mode can be a little confusing as it can really mean two things. Safe Mode really means that the User App, the portion of code the user writes, isn’t running. This can happen for two reasons:

  1. The user app depends on a system firmware version that is ahead of the current system firmware version on the DK. For example, if you have a DK running 1.0.47 and then select 1.1.47 in the Web IDE and flash the code, then the user code will want 1.1.47 but the DK still has system version 1.0.47. The system is now in safe mode
  2. After a factory reset, we wipe out the user app. There simply is no user app, and so it can’t run. This was intentional, we honestly didn’t feel the need to store the user app when the system firmware was enough. The system is also in safe mode.

There is a big difference between 1 and 2 above. In 1, the cloud actually recognizes that the user app needs a new system firmware, and so the cloud AUTOMATICALLY will flash a new system firmware. In 2, the cloud DOES NOT recognize that the user app needs new system firmware, since the user app does not exist. Therefore, in number 2, the cloud WILL NOT automatically start a new update. To get new firmware and exit this mode, you need to flash a new app.

To clarify this, since it is quite confusing, I am planning on changing the color of Safe Mode in the next version. I am planning on using Yellow, seems to make sense. This will really help differentiate between the two cases as magenta will mean that an OTA update is happening, while yellow will mean that it is in safe mode. So to play out the two scenarios above with the new color:

  1. If you tried updating from 1.0.47 to 1.147, you would flash the new user app, the DK would blink magenta while the update is happening. When it boots, it would start to blink yellow instead. Once it comes back online, it will start to blink magenta again, meaning the cloud recognized it needed an update and is now flashing new system firmware.
  2. Once you perform a factory reset, the system will blink yellow. Once it comes back online, it will still blink yellow and will stay in this state until you actually flash a new app.

This isn’t the Particle convention, but I think it will help. Because of how slow updates happen, I think the magenta color is really too confusing because it can mean Safe Mode or Update In Progress, and it is hard to tell the difference. I think changing the color will make all the difference.

Thoughts? Questions?


Porting from Photon (with SPI)
#16

Sorry for the trouble. While it is blinking magenta, did you reconnect it to the cloud? So the procedure for an update is that it will enter safe mode, which means it blinks magenta offline. To exit this mode, you need to reconnect the device to the cloud (using the app to make it much faster) and then it should upload the system part which can take 1-2 minutes.

We are already changing this for the next release so that Safe Mode is a different color and more distinguishable.

Let me know if you have any questions or further issues


#17

I used the phone to connect to it while it was blinking, it connected on the app, but the LED just sits at magenta. I then reset it and it’s back to blinking magenta again.

:confused:

actually now the LED just goes off and stays off once I wait a while from clicking connect on the phone


#18

I do see one device that came online in safe mode very recently, but about 12 minutes ago it seems to have properly been updated. The device reported safe mode, then the update started and about 2 minutes later the cloud reported the update as Success. The device should have then rebooted (staying solid blue, you shouldn’t power the device off when it is sold blue) and the back to the normal blinking green.

Did you see that? Did that resolve the issue?


#19

It’s not even turning on anymore. Reset does nothing and I’ve unplugged the power supply. No response… uhoh

edit: HOLD UP I was powering them with 3v3 volts the whole time. Lemme try this again .


#20

So I was able to connect to again on the phone, but the LED never changes color from magenta. However it shows up on my particle account with a blue circle, so I tried flashing it and it seemed to upload correctly.

BUT it is still flashing magenta again like it wants to update. Pretty much been 20 mins


#21

This part is a bit confusing, but there are two varieties of Safe Mode. The first is after a factory reset. In this mode, there is no user app. In order to update, you must get the device online and then flash a sketch with the new firmware version, in this case 1.1.47. Once you do this, the device will download the new user app, stay solid blue for a few seconds while it is copied to internal flash, and then reboot back into Safe Mode and still blink Magenta. You are now in the second form of safe mode.

This second from of Safe Mode means the user app is there, but wants a newer version of the system firmware then the board currently has. In this mode, all you need to do is to connect it to the cloud and you the cloud will automatically update you to the newest firmware. This part can take 1-2 minutes.

This is pretty confusing at the moment and we are going to clarify this in the next release by changing the LED colors in the different states. Also, I will add better documentation around this.

For now, I can see that your board is in the first form of safe mode. This means you need to flash a new user app to start the process. After reboot, connect it again and let the cloud update to he latest version and you should be good.

We are working to make this all easier, so this should get much better starting in the next release.