Flashing a Spark Core you bought elsewhere or in case of emergency


That was my mistake! I have pushed a fix. If you update brewpi-script, it will work.

The bug was triggered when dfu-util was not installed. You can also run:

sudo apt-get dfu-util

That will avoid the code with the bug



After I ran “sudo apt-get install dfu-util” i was able to load firmware to my Spark. My device was recognized as Particle P1 and it loads firmware version 0.5.2.

If I try to update to version 0.5.4 I get the message “Cannot open DFU device 2b04:d008”.

What do you recommend? Keep 0.5.2 or update to 0.5.4?


The first time you start the container for programming it will only put it in DFU mode. The container needs to be started again for docker to see the new device. Docker only recognizes devices available at startup. The DFU device is different from the normal serial device.

So you run the container to update. Exit with CTRL-C, then run it again.


I’m still having trouble updating the firmware on my BrewPi Photon.

On my raspberry pi I decided to use Raspbian and install docker within that. I installed the BrewPi container successfully and the script is running. I’m now trying to use the FlashDfu.py script from within the container to update my BrewPi Photon.

First I access the brewpi container as follows (my container is called “brewpi_ferm” as I intend to eventually set up another one for mashing):

docker exec -it brewpi_ferm bash

I then run the flashDfu.py as follows:

sudo python flashDfu.py --autodfu --tag=0.5.2

It puts the Photon into DFU mode (flashing yellow LED seen) but says the following:

Will try to download release '0.5.2'
dfu-util version 0.9 found installed on system.
Detecting DFU devices
dfu-util: Cannot open DFU device 2b04:d006

Did not find any DFU devices.
Is your Photon or Spark Core running in DFU mode (blinking yellow)?
Waiting until a DFU device is connected...
dfu-util: Cannot open DFU device 2b04:d006

Any suggestions? I have tried rebooting the pi with BrewPi in DFU mode but the container won’t start when I do this.


Did you try the process described at the bottom of the page here?


You can also wait a few days. I’m reworking the firmware update process and the docker containers this weekend. Waiting until that’s released might save you some frustration.


No I didn’t see those instructions. I’ll give it a go and if it doesn’t work I’ll wait until the next release.