Xenon breathing white

After installing the SSD1306 X32 OLED on my featherwing to display data, I flashed the code below into my xenon. The OLED was running its demo in the example ok, but then I decided to comment out much of the demo, and it would not flash. I also noted that the LED was breathing white, which the xenon datasheet says it indicates that my code may have put the xenon into manual mode. I looked at the code and found “SYSTEM_MODE(MANUAL);” line, so now I have it commented out, but I am unable to reflash the code without that command.

What can I do to get the xenon to accept new code after my code put it into manual mode?
See code below:

This is an example for our Monochrome OLEDs based on SSD1306 drivers
  Pick one up today in the adafruit shop!
  ------> http://www.adafruit.com/category/63_98
This example is for a 128x64 size display using I2C to communicate
3 pins are required to interface (2 I2C and one reset)
Adafruit invests time and resources providing this open source code, 
please support Adafruit and open-source hardware by purchasing 
products from Adafruit!
Written by Limor Fried/Ladyada  for Adafruit Industries.  
BSD license, check license.txt for more information
All text above, and the splash screen must be included in any redistribution

#include "SSD1306_128x32.h"


#define OLED_RESET D4
SSD1306_128x32 display(OLED_RESET);

#define NUMFLAKES 10
#define XPOS 0
#define YPOS 1
#define DELTAY 2

int randomNum(int maxRand) {
    return rand() % maxRand;

You can put the Xenon in safe mode (breathing magenta, red and blue at the same time):

Hold down MODE and RESET at the same time, release RESET, then hold down MODE until the status led blinks magenta (red and blue at the same time). Then release MODE. Wait until the status led breathes magenta, then you can flash new firmware.

1 Like

Thanks for responding rickkas7. When I got it into magenta mode, it pretty quickly went to flashing blue (listening mode). It would not flash. On another try, it went into dfu mode. Still wouldn’t flash.

When in dfu mode, the IDE said it flashed and was ready, but it never flashed. I never saw the led indicate that it was being updated. Still breathing white.

I can’t seem to get it to stay in magenta mode. If I hold mode down it eventually goes to dfu mode, then eventually flashing white then breathing white again.

If you follow @rickkas7’s instructions and you get to DFU mode (yellow), you held too long. You should release as soon as you see magenta flashing. One possible clarification… You press MODE and RESET at the same time and then release RESET while holding down MODE. Wait till flashing magenta then release all. Rick’s instructions may have been construed as realeasing both then pressing and holding MODE again separately which would have taken you to listening mode (blinking blue) as you describe.


Hi ninjatill,
I followed his and your instructions. If at the instant I see magenta I release the mode button, the xenon quickly gives one white flash then goes into the listening mode, blinking blue. It will not stay in the magenta mode even a split second.

I press them both at the same time, release reset (while holding the mode button), then magenta blinks, and instantly I release the mode button. It flashes once white then goes into the blinking blue mode. Every time.

1 Like

@TomEldredge, I can’t reproduce that behavior. No matter what combination of buttons and holds I try. After I see magenta and release, it quickly goes through blinking green to blinking cyan to magenta. Since you are in manual mode, you cannot get to blinking green as I did and white is appropriate for the system mode you, inadvertently chose. You might be able to get it out of this state by flashing new user code in DFU mode… make sure manual mode is commented out.

What host OS are you using?
Can you access the device in DFU Mode?
What do you get when you run particle flash --usb firmware.bin -v?
What does particle binary inspect firmware.bin give you?

(firmware.bin should be your application binary on your machine)

I am using an IMAC, which is running MacOS High Sierra. It is of 2010 vintage. I purchased it because I gave up on getting the Windows 7 device drivers issues resolved.

As far as inadvertently choosing the system manual mode…That was in the Particle library for the OLED that I purchased from Particle. I am such a newbie that I wouldn’t even recognize this as an issue. I am trying to become familiar with the programming environment and the cpp code. Most of my programming experience is from the 1970s to the early 2000s. I started working on computers in 1966 (actually programming in 1967) troubleshooting problems in the USAF first nuclear cruise missile, the Hound Dog Missile. So, today’s programming environment is very different than the machine code we programmed in. In 2000 I wrote our company’s first CNC control software, and I did the electronics too. But my experience is very dated now. Thanks for your patience and help.

I’ll try ScruffR’s recommendation (DFU).


The new drivers are out now.
Uninstall CLI and reinstall with this

1 Like

I put the xenon in dfu mode for the first command and in listening mode for the second command.

This is what my terminal window says in response to your questions:
|  __/| (_| | |  | |_| | (__| |  __/
|_|    \__,_|_|   \__|_|\___|_|\___|

> Setup is easy! Let's get started...
> It appears as though you are already logged in as harmonyt@rollanet.org
? Would you like to use this account? Yes

! PROTIP: Hold the MODE/SETUP button on your device until it blinks blue!
! PROTIP: Please make sure you are connected to the internet. 

Apples-iMac:~ apple$ particle flash --usb firmware.bin -v
Error writing firmware: file does not exist and no known app found.
VError: Error writing firmware: file does not exist and no known app found.
    at /Users/apple/.particle/node_modules/particle-cli/dist/cmd/flash.js:156:10
    at process._tickCallback (node.js:401:9)
caused by: Error: file does not exist and no known app found.
    at /Users/apple/.particle/node_modules/particle-cli/dist/cmd/flash.js:86:12
    at process._tickCallback (node.js:401:9)
Apples-iMac:~ apple$ binary inspect firmware.bin
-bash: binary: command not found
Apples-iMac:~ apple$ particle binary inspect firmware.bin
Binary file not found firmware.bin
Apples-iMac:~ apple$ 

I put the xenon in dfu mode and reran the second command:

Apples-iMac:~ apple$ particle binary inspect firmware.bin
Binary file not found firmware.bin
Apples-iMac:~ apple$

Did you notice this not of mine?

Of course you need to have a firmware.bin to flash to the device. If it’s in a different directory than the one you are executing the command from, you need to either cd into that directory or provide the full path to that file.

Same goes for

Thanks for telling me the obvious. I downloaded the file from the cloud in the ide.

Apples-iMac:~ apple$ particle flash --usb /Users/apple/Downloads/firmware.bin

Flash success!
Apples-iMac:~ apple$

However, after flashing the binary file, I cannot get the xenon out of listening mode (flashing blue). It momentarily flashes white, but quickly returns to flashing blue. Maybe in my code I need to have a command that sets the system to automatic? Maybe it is staying in the manual mode? Can you tell me how I should format the system automatic command?

If you held the mode button until after DFU mode, and it went into blinking white, you’ve done a factory reset whereby any credentials will be erased. As such, your device can no longer connect (in any mode, including Safe Mode), and will thus take you to listening mode.

Try setting up your device using the mobile app to get it connected again.


Thank you Moors7 and Scruffr for your patience. My xenon is again breathing blue and the code is running correctly in the xenon, and the OLED.

I am learning…slowly.