Failed Spark3 flashing

Tried to flash a Spark3 and now the blue led is blinking and nothing seems to help. What to do?

That happens if the spark needs a bootloader update, and canā€™t download it over wifi.

To fix, connect it over usb, and run brewblox-ctl particle -c bootloader

Iā€™ve tried it maybe 10 times does not help.

Does it show any errors during either the flash, or the bootloader flash?

Does it still show six squares on screen?

If you run brewblox-ctl discover-spark, does it show up?

Had to do a brewblox-ctl flash after and that did it!

1 Like

Bob, Iā€™m running into a similar problem. I did a brewblox-ctl update followed by a brewblox-ctl flash on my v3. I received flash success messages, but am stuck at the blinking blue light. I can see my Spark with brewblox-ctl discover-spark, but when I run brewblox-ctl particle -c flash-bootloader, Iā€™m getting the following:
INFO Starting Particle imageā€¦
INFO Type ā€˜exitā€™ and press enter to exit the shell
edge: Pulling from brewblox/firmware-flasher
Digest: sha256:f568daf84c6541f13342754c377e99bd4b3bd376b6ad7e68ef8dcd6347b1904e
Status: Image is up to date for brewblox/firmware-flasher:edge
Flashing P1 bootloaderā€¦
:::: NOTICE:
:::: Your first flash may take up to 10m to complete - during
:::: this time, your device may regularly change LED states
:::: as Device OS upgrades are applied.
Error writing firmware: Timed out waiting for initial response from device
Command ā€˜docker run -it --rm --privileged -v /dev:/dev --pull always brewblox/firmware-flasher:edge flash-bootloaderā€™ returned non-zero exit status 1.

Any advice? Thanks.

Are your services stopped/down?
Have you tried it with a different USB cable?

Iā€™d run brewblox-ctl up and didnā€™t receive any error messages. Iā€™ve not tried swapping the USB cable (which as far as I know was working ok with the previous installation) but can try swapping it. Any recommended sequence of shutdown/restart for the Pi and Spark?

I did have an eventbus error initially on the update, but manually created a mosquitto folder based on a recommendation in an earlier post that made that error go away.

Ah, to clarify: your services should be stopped during a USB flash / bootloader flash, to prevent mixed communication over USB.

You can safely unplug the USB cable between the Pi and the Spark without running any prior commands.

Swapping the USB seemed to do the trick. Thanks for the quick help.

1 Like

I may need to start a new topic ā€¦ but the title matched, solutions have not so ā€¦ here goesā€¦
I have been using a Spark-3 purchased a June 2018. I have been controlling it via the Legacy BrewPi web software via the IP access method. That has become so out of date I decided to go ahead and switch to BrewBlox. Iā€™ve installed BrewBlox Edge on RPi 3B+ per instructions at

All is well through step 4. running brewblox-ctl flash. This returned:

pi@brewblox:~/brewblox $ brewblox-ctl flash
INFO       Flashing Spark 3...
edge: Pulling from brewblox/brewblox-firmware-flasher
Digest: sha256:f4e03108e62aad3e403719b21be0f87841616b8d6803d5d7332f80469ec858ff
Status: Image is up to date for ghcr.io/brewblox/brewblox-firmware-flasher:edge
Triggering DFU mode...
Triggering dfu on port /dev/serial/by-id/usb-Particle_P1_4c0032000851353532343835-if00
TypeError: SerialPort is not a constructor
    at main (/app/serial-trigger.js:20:20)
    at Object.<anonymous> (/app/serial-trigger.js:35:1)
    at Module._compile (internal/modules/cjs/loader.js:1114:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
    at Module.load (internal/modules/cjs/loader.js:979:32)
    at Function.Module._load (internal/modules/cjs/loader.js:819:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
    at internal/main/run_main_module.js:17:47
No compatible USB devices found
pi@brewblox:~/brewblox $

The Spark3 is actively running a profile at the moment, controlling a fridge, while Iā€™m trying these updates.
What am I doing wrong/what additional info will help you answer that question?

If the Spark is running a profile, I would skip the flash until that is done. The new firmware is incompatible with the legacy settings, and will not resume the profile.

The error seems to be in the script that triggers the Spark Device Firmware Update (DFU) mode. You can also trigger DFU manually:

Press both RESET and MODE buttons on the device and hold them down together. Release the RESET button, and wait until the Status LED Blinks Yellow. Then release the MODE button. The device should continue to Blink Yellow.

If you run flash while it is in DFU mode, it will skip that step, and immediately send the data.

The error suggests some breaking change was introduced in a dependency. Iā€™ll try to reproduce the problem here.

With the legacy brewpi firmware, profiles ran the the pi, not the spark.

I would install from scratch on a fresh SD card and then flash over USB.

I pushed a fix for the issue. When you run brewblox-ctl flash, it will automatically download the new image. If you already added a Spark service, youā€™ll want to run brewblox-ctl service pull {spark service name} to avoid version confict warnings.

@Bob_Steers, @Elco Thank you both for your quick responses. Amazing support!
As soon as I complete the current fermentation (Hefeweizen ā€“ about a week left), Iā€™ll follow the steps provided, flash the Spark 3 and come into the current generation with BrewBlox. Thank you again ā€¦ amazing support and a most useful system. @Elco , Iā€™ve been using the legacy RPi and Arduino since around 2014-2015. It has performed flawlessly over these years, thanks for sharing the fridge hacks and for pushing forward into the process control system you have created. Best Wishes ā€¦Ray

1 Like

@Bob_Steers , @Elco A quick update. All is working as intended! Bob, your fix and instructions did the trick. Iā€™m now operating in the ā€œBrewBlox Eraā€. Thank you both again.
ā€¦ Ray

2 Likes