Skip to content

Instantly share code, notes, and snippets.

@jarmitage
Last active March 7, 2019 11:41
Show Gist options
  • Save jarmitage/85dc4e9fe9f0c5d3f76a9dc0fd1f9a73 to your computer and use it in GitHub Desktop.
Save jarmitage/85dc4e9fe9f0c5d3f76a9dc0fd1f9a73 to your computer and use it in GitHub Desktop.
Using Bela build scripts across multiple Bela's simultaneously

Using Bela build scripts across multiple Bela's simultaneously

Suppose you are trying to program two Bela's at the same time (yes this was an actual need of mine).

You can achieve this using Bela's build_project.sh script [1] and some tweaking.

Basic setup

First you need to change the IP address and DHCP settings of one of your Bela's [2], so that you can connect to your two devices separately and simultaneously.

Then when you use build_project.sh, you will need to override the default IP address argument [3] like so:

BBB_ADDRESS=root@192.168.7.2 path/to/scripts/build_project.sh --watch --force path/to/project

Where 192.168.7.2 addresses your Bela's IP.

You can then open multiple terminals and run the script multiple times to your heart's content.

distcc

You can also use distcc [4] across multiple Bela's

To do this, following [4], you need to update DISTCC_HOSTS with your Bela's IP address, and you need to allow your additional Bela IP addresses with the distcc daemon, e.g. (as shell aliases):

alias distccdbela="distccd --verbose --no-detach --daemon --allow 192.168.7.2 --allow 192.168.9.2 --log-level debug --log-file ~/.distcc/distccd.log --enable-tcp-insecure"
alias distcclog="tail -f ~/.distcc/distccd.log"
Relevant Bela Wiki pages and sections:
  1. https://github.com/BelaPlatform/Bela/wiki/Interact-with-Bela-using-the-Bela-scripts#build_projectsh
  2. https://github.com/BelaPlatform/Bela/wiki/The-IP-address%28es%29-of-Bela#how-to-change-the-ip-addresses
  3. https://github.com/BelaPlatform/Bela/wiki/Interact-with-Bela-using-the-Bela-scripts#temporary-override
  4. https://gist.github.com/jarmitage/2a5dffbcfdd5532371f097e9bb80e4b0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment