Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
getting-started:updating [2018/03/04 16:47]
Andy Loftus Don't need "sudo" inside docker container
getting-started:updating [2018/05/02 22:32]
Elco Jacobs [Updating the BrewPi Spark firmware with DFU]
Line 142: Line 142:
 If you installed BrewPi without docker, you will only need to run this command on your system: If you installed BrewPi without docker, you will only need to run this command on your system:
 <​code>​ <​code>​
-python utils/​flashDfu.py ​--tag=0.5.3-rc.3 ​--noreset --autodfu+python utils/​flashDfu.py --noreset --autodfu
 </​code>​ </​code>​
-Modify ''​--tag=0.5.3-rc.3''​ to pick the tag you would like to use from [[https://​github.com/​BrewPi/​firmware/​releases|our releases]]. 
  
 --------------- ---------------
Line 161: Line 160:
 The following commands are performed from the console on pi. See above to log into the pi using SSH. The following commands are performed from the console on pi. See above to log into the pi using SSH.
  
-We can start a docker container for single use that is destroyed afterwards (''​--rm''​) and run the flashDfu.py script directly inside the container:+We can start a docker container for single use that is destroyed afterwards (''​--rm''​) and run the flashDfu.py script directly inside the container
 +These 3 commands pull the latest docker image, trigger DFU mode and perform the update.
 <​code>​ <​code>​
-docker run -it --name brewpi-dfu --privileged -v ~/​brewpi-data:/​data --rm brewpi/​brewpi-raspbian python utils/​flashDfu.py --tag=0.5.3-rc.3 --noreset ​--autodfu+docker pull brewpi/​brewpi-raspbian 
 +docker run -it --name brewpi-dfu --privileged -v ~/​brewpi-data:/​data --rm brewpi/​brewpi-raspbian python utils/​flashDfu.py --trigger 
 +docker run -it --name brewpi-dfu --privileged -v ~/​brewpi-data:/​data --rm brewpi/​brewpi-raspbian python utils/​flashDfu.py --noreset
 </​code>​ </​code>​
-Modify ''​--tag=0.5.3-rc.3''​ to pick the tag you would like to use from [[https://​github.com/​BrewPi/​firmware/​releases|our releases]]. 
- 
-Docker containers can only use devices that are present on the host when they start. Which is why the first time you run this command, it will only put the device in DFU mode. It will not be able to use the new DFU device, because it was not present when the container started. Stop the script with CTRL-C. Your Spark is now in DFU mode. Run the command again to update. 
  
 </​pane>​ </​pane>​
Line 191: Line 190:
  
 **Check that DFU is working inside the brewpi-ubuntu container now** **Check that DFU is working inside the brewpi-ubuntu container now**
 +Make sure you have the latest docker image:
 +<​code>​
 +docker pull brewpi/​brewpi-ubuntu
 +</​code>​
  
 Make sure your BrewPi Spark is in DFU mode (blinking yellow) and run: Make sure your BrewPi Spark is in DFU mode (blinking yellow) and run:
Line 200: Line 203:
 {{:​getting-started:​docker-windows-dfu-util-test.png?​nolink&​800|}} {{:​getting-started:​docker-windows-dfu-util-test.png?​nolink&​800|}}
  
-Finally, run the command to update ​the controller using DFU: +Finally, ​we can start a docker container for single use that is destroyed afterwards (''​--rm''​) and run the flashDfu.py script directly inside ​the container.
 <​code>​ <​code>​
-docker run -it --name brewpi-dfu --privileged -v ~/​brewpi-data:/​data --rm brewpi/​brewpi-ubuntu ​sudo python utils/​flashDfu.py --tag=0.5.3-rc.3 --noreset ​--autodfu+docker run -it --name brewpi-dfu --privileged -v ~/​brewpi-data:/​data --rm brewpi/​brewpi-ubuntu python utils/​flashDfu.py --trigger 
 +docker run -it --name brewpi-dfu --privileged -v ~/​brewpi-data:/​data --rm brewpi/​brewpi-ubuntu python utils/​flashDfu.py --noreset
 </​code>​ </​code>​
-Modify ''​--tag=0.5.3-rc.3''​ to pick the tag you would like to use from [[https://​github.com/​BrewPi/​firmware/​releases|our releases]]. 
  
 </​pane>​ </​pane>​
Line 217: Line 219:
 We can start a docker container for single use that is destroyed afterwards (''​--rm''​) and run the flashDfu.py script directly inside the container: We can start a docker container for single use that is destroyed afterwards (''​--rm''​) and run the flashDfu.py script directly inside the container:
 <​code>​ <​code>​
-docker run -it --name brewpi-dfu --privileged -v ~/​brewpi-data:/​data --rm brewpi/​brewpi-ubuntu ​sudo python utils/​flashDfu.py --tag=0.5.3-rc.3 --noreset ​--autodfu+docker run -it --name brewpi-dfu --privileged -v ~/​brewpi-data:/​data --rm brewpi/​brewpi-ubuntu python utils/​flashDfu.py --trigger 
 +docker run -it --name brewpi-dfu --privileged -v ~/​brewpi-data:/​data --rm brewpi/​brewpi-ubuntu python utils/​flashDfu.py --noreset
 </​code>​ </​code>​
-Modify ''​--tag=0.5.3-rc.3''​ to pick the tag you would like to use from [[https://​github.com/​BrewPi/​firmware/​releases|our releases]]. 
- 
-Docker containers can only use devices that are present on the host when they start. Which is why the first time you run this command, it will only put the device in DFU mode. It will not be able to use the new DFU device, because it was not present when the container started. Stop the script with CTRL-C. Your Spark is now in DFU mode. Run the command again to update. 
  
 </​pane>​ </​pane>​