Status LED and Device Modes

If you are using a Tracker One, see the section Tracker SoM mode, below, as the LED sequences may be different.

Here's the typical pattern of after power up:

  • White blink
  • Blinking green
  • Blinking cyan (light blue)
  • Breathing cyan

Connected

When it is breathing cyan (light blue), your device is happily connected to the Particle cloud. When it is in this mode, you can call functions and flash code.

Connecting to network

Cellular - Connecting to network

Blinking green indicates that your cellular device is attempting to connect to the cellular network. This can take anywhere from a few seconds to several minutes. You should wait at least 10 minutes.

Cellular connection troubleshooting

Wi-Fi - Connecting to network

If your device is blinking green, it is trying to connect to Wi-Fi.

Connecting to Wi-Fi troubleshooting

Connecting to the Particle cloud

When the device is in the process of connecting to the cloud, it will blink cyan. You often see this mode when you first connect your device to a network, after it has just blinked green.

There are two phases, blinking cyan, then fast blinking cyan, though the fast blinking phase is short and you may not notice it occurring.

Could not reach internet

If the device was able to reach the network but not the Internet, you could get a blinking cyan followed by 2 orange blinks. This is most common for Wi-Fi if the network loses Internet service.

Could not reach cloud

If the device was able to reach the network but not the Internet, you could get a blinking cyan followed by 3 orange blinks. This is most common for Wi-Fi if the network has a firewall that blocks access to the Particle cloud.

OTA firmware update

If your device is blinking magenta (red and blue at the same time), it is currently loading an app or updating its firmware. This state is triggered by a firmware update or by flashing code from the Web IDE, CLI, or Workbench. You might see this mode when you connect your device to the cloud for the first time.

On some devices the blink pattern is not always regular, and there may be periods where the status LED appears to be on solid magenta for a few seconds, or off for a few seconds. This is normal.

Note that if you enter this mode by hold down the MODE button on boot, blinking magenta indicates that letting go of the MODE button will enter safe mode to connect to the cloud and not run application firmware.

Listening mode

Blinking dark blue is listening mode.

  • For Wi-Fi devices, it typically means that the device is waiting for network credentials
  • On all devices, it can be manually entered to allow control commands to be sent by the USB serial port
  • For cellular devices, listening mode generally does not occur, with the exception of the Electron (see below)

To put your device in Listening Mode, hold the MODE button until the RGB LED begins blinking blue. This typically takes a couple seconds, but could take longer, especially if the device is currently blinking green.

You can also use particle usb start-listening to enter listening mode.

Electron information

Network signal strength

Tapping the MODE button on your device once will blink out the bars of signal strength. More blinks indicate a stronger signal.

Some older Wi-Fi devices including the Photon and P1 do not support network signal strength.

Soft power off

Tapping the MODE button twice on your device enter soft power off mode. Tap the RESET buttton to turn it back on.

This is different than shipping mode on the Tracker One and Monitor One.

Some older Wi-Fi devices including the Photon and P1 do not support soft power off.

Network off

If your device is breathing white, the network module is off. You might see this mode if:

  • You have set your module to MANUAL or SEMI_AUTOMATIC in your user firmware
  • You have called Cellular.off() or WiFi.off() in your user firmware

Safe mode

Safe mode, breathing magenta (red and blue at the same time), connects the device to the cloud, but does not run any application firmware.

You can use this to flash the device OTA even if you have a bug in your firmware that is preventing the device from running properly.

To put your device in safe mode:

  • Hold down the MODE button
  • Tap the RESET button while continuing to hold down the MODE button
  • When the status LED blinks magenta, release the MODE button.

Before entering safe mode, the device will proceed through the normal steps of connecting to the cloud; blinking green, blinking cyan, and fast blinking cyan.

You can also use the particle usb safe-mode command to enter safe mode.

DFU Mode (device firmware upgrade)

DFU mode allows Device OS, user firmware, and other firmware to be reprogrammed on your device

To enter DFU Mode:

  • Hold down the MODE button
  • Tap the RESET button while continuing to hold down the MODE button
  • When the status LED blinks magenta, continue to hold down the MODE button
  • When the status LED blinks yellow, release the MODE button.

The device now is in the DFU mode. Neither user firmware nor Device OS run in DFU mode, allowing everything except the bootloader to be overwritten.

You can also use the particle usb dfu command to enter DFU mode.

Connecting to internet (power issue)

Blinking green is connecting to Wi-Fi or cellular. A white blink indicates reboot. This typically indicates insufficient power causing the device to brown out while connecting to the network. This is more common with cellular, and in particular 2G/3G devices and the M-SoM.

Network on but not connected

If the network module is on but not connected, your device will be breathing blue. Note that this will be dark blue and not cyan.

This only occurs if you've turned the network on, but not connected, in SEMI_AUTOMATIC or MANUAL mode. It doesn't occur during normal operation.

Cloud not connected

When your device is connected to network but not to the cloud, it will be breathing green.

More information

Rainbows/Nyan

Using the Signal option in the Web IDE, or the particle cloud nyan CLI command, you can have a device's status LED display a rainbow pattern. This is handy if you have multiple devices nearby and are not sure which one is which.

Blinking red indicates various errors.

While connecting to the Cloud, the RGB LED will be blinking cyan followed by:

  • 1 orange blink: Decryption error.
  • 2 orange blinks: Could not reach the internet.
  • 3 orange blinks: Connected to the internet, but could not reach the Particle Device Cloud. This sometimes is seen as yellow or red and indicates bad server keys.
  • 1 magenta blink: Authentication error.
  • 1 red blink: Generic handshake error. The device could have the wrong keys or has just encountered a generic error in the handshake process.

Repair instructions

Red flash SOS

Is your device blinking red? Oh no!

A pattern of more than 10 red blinks is caused by the firmware crashing. The pattern is 3 short blinks, 3 long blinks, 3 short blinks (SOS pattern), followed by a number of blinks that depend on the error, then the SOS pattern again.

Enter safe mode, tweak your firmware and try again!

You can also reset your device to a known state by following these instructions.

There are a number of other red blink codes that may be expressed after the SOS blinks:

  1. Hard fault
  2. Non-maskable interrupt fault
  3. Memory Manager fault
  4. Bus fault
  5. Usage fault
  6. Invalid length
  7. Exit
  8. Out of heap memory
  9. SPI over-run
  10. Assertion failure
  11. Invalid case
  12. Pure virtual call
  13. Stack overflow
  14. Heap error

The two most common ones are:

Hard Fault (1 blink between 2 SOS patterns)

Some causes of hard fault include:

  • Using an invalid pointer.
  • Memory corruption caused by freeing memory twice, overwriting the end of a block of memory, etc.
  • Making Wire (I2C) calls without calling Wire.begin().

Exit (7 blinks between 2 SOS patterns)

This occurs if the standard C function abort() is called. In a Unix program, this would be used to abruptly stop the process. Device OS itself does not use this function, but the SOS can happen if user firmware calls abort() or _exit(). Since Particle devices only effectively support a single process, the user firmware, the effect is an SOS+7 and reboot. This could also happen if a library used abort().

Out of heap memory (8 blinks between 2 SOS patterns)

If your device crashes repeatedly with an SOS code, first try recovering with Safe Mode and flashing Tinker with the CLI to see if it was something recently added in your user application.

particle flash <mydevice> tinker

Some tips for reducing the memory used by your firmware can be found here.

Assertion failure (10 blinks between 2 SOS patterns)

Assertion failure is triggered when a test for something that should never occur occurs, and there is no solution other than to SOS and restart.

Code might do this if the internal state is invalid and not what is expected, for example. Or something that should never happen and is non-recoverable, for example if the system thread cannot be created.

At the moment, all of the AssertionFailures are in things related to threads and the system thread, but that’s just because those are the only things that have been instrumented with an AssertionFailure panic.

Stack overflow (13 blinks between 2 SOS patterns)

Stack overflow occurs when you try to store too much data on the stack. The size is quite limited, and storing large temporary objects on the stack can cause problems.

  • Main loop thread: 6144 bytes
  • Software timer callbacks: 1024 bytes

Heap error (14 blinks between 2 SOS patterns)

SOS+14 signifies:

  • Semaphore lock timeout
  • Since 0.8.0 60 seconds expired while trying to acquire a semaphore lock, likely due to dynamic memory allocation
  • Since 1.2.0 Other heap-related error, such as allocating memory from an ISR

Prior to 1.2.0, attempting to allocate memory from an interrupt service routine would sometimes work, and sometimes corrupt the heap causing the software to crash sometime later, while doing something completely different. Since this is very difficult to debug, now a SOS+14 is thrown immediately.

Some locations that are interrupt service routines:

  • ISRs attached using attachInterrupt
  • System event button handlers (just button_status, button_click, and button_final_click handlers, not all system events)
  • SPI transaction callbacks
  • SparkIntervalTimer library timer callbacks

Things you should not do from an ISR:

  • Any memory allocation or free: new, delete, malloc, free, strdup, etc.
  • Any Particle class function like Particle.publish, Particle.subscribe, etc.
  • Most API functions, with the exception of pinSetFast, pinResetFast, and analogRead.
  • delay or other functions that block.
  • Log.info, Log.error, etc.
  • sprintf, Serial.printlnf, etc. with a %f (float) value.
  • attachInterrupt and detachInterrupt cannot be called within the ISR.
  • Mutex locks. This includes SPI transactions and I2C lock and unlock.
  • Start an SPI.transaction with DMA.

Solid colors

Solid colors are rare. There only expected situation is:

  • Solid magenta if you are loading code in ymodem serial mode.

In most cases, solid colors are the side effect of a bug. If code crashes or infinitely loops with interrupts disabled, it's possible that the LED animation will stop. The color of the LED is the color it last was before failure. So for example, it could be solid cyan if it was previously breathing cyan, or solid red if it was trying to output an SOS pattern.

No status LED

If you power up your device and the status LED never comes on, you could have a missing or corrupted bootloader.

  • Unplug the USB (and battery, if you are using one)
  • Hold down the SETUP button while plugging in the USB power

If you still see no change in the status LED you probably have a missing or corrupted bootloader.

This can be corrected using a JTAG/SWD programmer if you have one.

On Gen 2 (STM32) devices with a blue LED like the Photon 1 and Electron, the blue D7 LED will be on dimly if the bootloader is missing.

Network reset (fast blinking blue)

To erase the stored network settings on your device, hold the MODE button blinks dark blue, then continue to hold it down for about ten seconds longer, until the RGB LED blinks blue rapidly, then release.

  • For the M-SoM it will clear the Wi-Fi settings and cellular APN.
  • For the P2, Photon 2, and Argon, it will clear the Wi-Fi credentials.
  • For the P1 and Photon 1, it will clear the Wi-Fi credentials but not the antenna selection.
  • For the Boron, it will clear the cellular APN and SIM selection.
  • For Ethernet, it will clear the using Ethernet flag.

Factory reset

This mode is almost never useful, for the following reasons:

  • The M-SoM, P2, and Photon 2, P1, and Photon 1 do not support this feature.
  • Gen 3 (Argon, Boron) devices do not have a factory user firmware backup image installed.
  • Even when present, it will only provide a user firmware image, not a full Device OS install, so it doesn't really factory reset anything.

To factory reset, hold down the MODE button and tap RESET. The status LED will blink:

  • Hold down the MODE button
  • Tap the RESET button while continuing to hold down the MODE button
  • When the status LED blinks magenta, continue to hold down the MODE button
  • When the status LED blinks yellow, continue to hold down the MODE button
  • When the status LED blinks white, release the MODE button.

This will:

  • Restore the factory backup user firmware (if present)
  • Clear mesh credentials (1.5.2 and earlier)
  • Boron: Clear any saved APN and default to internal SIM
  • Argon: Clear Wi-Fi credentials
  • Ethernet: Clear the using Ethernet flag
  • Clear the setup complete flag, to force setup mode again

Tracker SoM mode

The Tracker SoM and Tracker One status LED can be configured in several different ways. This section describes the Tracker LED mode. It can be configured to use the standard Particle LED scheme (blinking green, blinking cyan, breathing cyan), or can be completely customized in the Device Fleet Settings. The Tracker SoM Evaluation Board defaults to the Particle color scheme.

The standard LED patterns for Tracker One devices are:

Connecting to cellular - Tracker

The Tracker will fast breathe red while connecting to cellular.

Connecting to the cloud - Tracker

While trying to connect to the cloud, the Tracker shows the relative signal strength as breathing yellow (weaker cellular signal):

Or breathing green (stronger cellular signal):

Connected to cellular - Tracker

The Tracker shows the relative signal strength as solid yellow (weaker cellular signal):

Or solid green (stronger cellular signal):

Solid yellow or solid green indicates normal operation on the Tracker.