This is an old revision of the document!


Updating system firmware with DFU

The firmware on the BrewPi Spark with a Photon or P1 consists of 2 layers:

  • The BrewPi application
  • The Particle system framework

If you want to update to a version of BrewPi that requires a new system framework, you need to update over USB in DFU mode. This can be done with our flashDfu.py python script.

If you have installed BrewPi using docker, you probably did not start the container with USB forwarding. That's okay, we don't need to use your existing container to update the firmware, we can just create another one for the update and destroy it afterwards.

For a raspberry pi, ssh into your docker host (use putty if you are on windows):

ssh pirate@192.168.1.100

Make sure you have the latest docker image:

docker pull brewpi/brewpi-raspbian

Connect the Spark with USB and put it in DFU mode. This can be done by holding the setup button and doing a reset. Keep holding the button until the LED flashes yellow.

We can start a docker container for single use that is destroyed afterwards (–rm) and run the flashDfu.py script directly:

docker run -it --name brewpi-dfu --privileged -v ~/brewpi-data:/data --rm brewpi/brewpi-raspbian python utils/flashDfu.py --tag=0.5.3 --noreset

Resetting to factory defaults doesn't work yet, which is why we specify –noreset. This is because the serial port is not available in the container. If a reset is required, you can use the 'Reset to factory defaults' button in advanced settings.