Does anyone know of any DMX controls library that's compatible with Bela?? Tried the simpleDMX library for arduino and no such luck. Has anyone else tinkered with DMX?

    chris597 , for a less hardcore (but more expensive) solution, if you are happy to use an external DMX controller (like USB to DMX or ArtNet over ethernet) then you can use the open light architecture and the libola library to create and send DMX messages.

      Hey giuliomoro I'm helping chris597 work this out. I think libola is the way to go (we've got an external converter), but I'm not well versed in how to install libraries onto an embedded computer, or how to link the library within the Bela environment.

      The Beaglebone installation instructions seem like the right direction: https://www.openlighting.org/ola/tutorials/ola-on-beaglebone/

      But will an installation like this work from the command prompt in the Bela IDE? I'm guessing not since there will be Y/N responses during package installation. Is there a different command prompt that I can use?

      You can install it with

      apt-get install -y ola

      or

      yes | apt-get install ola

      , but you need the board to be connected to the internet in order to be able to do this.
      The board can be connected to the internet in a variety of ways (e.g.: connecting an ethernet cable to your home router, using a wi-fi dongle, sharing the internet connection through your host computer).
      If your board is connected to the internet, then the above is enough to install the library.

      Once the library is installed, you need to link it in adding the following to "Make parameters" in the IDE:

      LDLIBS=-lola

      This tells the linker to link in libola.

      Edited: replaced "LDFLAGS" with "LDLIBS"


      In case you are unable to connect the board to the internet, then you will have to manually download the packages on a computer connected to the internet, copy them to the board and install each of them with dpkg -i filename.deb.

      If you decide to download the deb files manually, you can find the urls of the packages you need with a "dry-run", e.g.:

      $ apt-get install ola --print-uris
      ...
      The following extra packages will be installed:
        libftdi1 libgcrypt20 libgpg-error0 liblo7 libmicrohttpd10 libola1 libprotobuf9
      ...
      The following NEW packages will be installed:
        libftdi1 libgcrypt20 liblo7 libmicrohttpd10 libola1 libprotobuf9 ola
      The following packages will be upgraded:
        libgpg-error0
      1 upgraded, 7 newly installed, 0 to remove and 302 not upgraded.
      ...
      'http://ftp.us.debian.org/debian/pool/main/libg/libgpg-error/libgpg-error0_1.17-3_armhf.deb' libgpg-error0_1.17-3_armhf.deb 91102 MD5Sum:297a995c82eca590b58b186abdaece9a
      'http://ftp.us.debian.org/debian/pool/main/libg/libgcrypt20/libgcrypt20_1.6.3-2+deb8u2_armhf.deb' libgcrypt20_1.6.3-2+deb8u2_armhf.deb 354672 MD5Sum:e4fa4b5821ac99e7ca7f48f39d3e0ad5
      'http://ftp.us.debian.org/debian/pool/main/libf/libftdi/libftdi1_0.20-2_armhf.deb' libftdi1_0.20-2_armhf.deb 17000 MD5Sum:6f4a7cd1468e862adca984ad32f68086
      'http://ftp.us.debian.org/debian/pool/main/libm/libmicrohttpd/libmicrohttpd10_0.9.37+dfsg-1+b1_armhf.deb' libmicrohttpd10_0.9.37+dfsg-1+b1_armhf.deb 59086 MD5Sum:c41df6d3224e7989927e8bded3a9f979
      'http://ftp.us.debian.org/debian/pool/main/libl/liblo/liblo7_0.28-3_armhf.deb' liblo7_0.28-3_armhf.deb 45536 MD5Sum:02ce2a2ea4fd9b97e8fe05458a0cd8e2
      'http://ftp.us.debian.org/debian/pool/main/p/protobuf/libprotobuf9_2.6.1-1_armhf.deb' libprotobuf9_2.6.1-1_armhf.deb 312100 MD5Sum:58bfed0950ad07ef1b06d82a42f24eae
      'http://ftp.us.debian.org/debian/pool/main/o/ola/libola1_0.9.1-1.1_armhf.deb' libola1_0.9.1-1.1_armhf.deb 1134308 MD5Sum:aaf25ca19ea8eb27a8af0cba53355f15
      'http://ftp.us.debian.org/debian/pool/main/o/ola/ola_0.9.1-1.1_armhf.deb' ola_0.9.1-1.1_armhf.deb 223138 MD5Sum:b787cb83be5d899f6903971c8fd99939

      you could then download those files, copy them over and install them one at a time (in the given order) with dpkg -i. Note that the URLs may be out of date if your board has not been connected to the internet for a long time and apt-get updated, yet you should be able to find the URL by manually browsing the ftp server.

      Once the library is installed, you need to link it in adding the following to "Make parameters" in the IDE:

      LDLIBS=-lola

      This tells the linker to link in libola.

      Edited: replaced "LDFLAGS" with "LDLIBS"

      14 days later

      Okay, thought ola was linked, but after cleaning the project it seems like it's not.

      Installed the library, and checked that it was installed:

      root@bela ~/Bela/IDE# apt-get install -y ola
      Reading package lists...
      Building dependency tree...
      Reading state information...
      ola is already the newest version.
      The following packages were automatically installed and are no longer required:
        g++-4.6 libffi-dev libobjc-4.9-dev libobjc4 libstdc++6-4.6-dev
        libxmlrpc-core-c3 ssl-cert
      Use 'apt-get autoremove' to remove them.
      0 upgraded, 0 newly installed, 0 to remove and 323 not upgraded.

      Linked it using

      LDFLAGS=-lola

      On running, it can't find the library:

      Linking...
      /usr/bin/ld: cannot find -lola
      collect2: error: ld returned 1 exit status
      make: *** [/root/Bela/projects/dmx-libola/dmx-libola] Error 1

      Tried

      ld -lola --verbose

      and got this

      attempt to open //usr/arm-linux-gnueabihf/lib/libola.so failed
      attempt to open //usr/arm-linux-gnueabihf/lib/libola.a failed
      attempt to open //usr/local/lib/arm-linux-gnueabihf/libola.so failed
      attempt to open //usr/local/lib/arm-linux-gnueabihf/libola.a failed
      attempt to open //usr/local/lib/libola.so failed
      attempt to open //usr/local/lib/libola.a failed
      attempt to open //lib/arm-linux-gnueabihf/libola.so failed
      attempt to open //lib/arm-linux-gnueabihf/libola.a failed
      attempt to open //lib/libola.so failed
      attempt to open //lib/libola.a failed
      attempt to open //usr/lib/arm-linux-gnueabihf/libola.so failed
      attempt to open //usr/lib/arm-linux-gnueabihf/libola.a failed
      attempt to open //usr/lib/libola.so failed
      attempt to open //usr/lib/libola.a failed
      ld: cannot find -lola

      Next steps?

      so to be precise LDLIBS=-lola tells the linker to link it in, but then it fails at linking time

      Linking...
      /usr/bin/ld: cannot find -lola
      collect2: error: ld returned 1 exit status

      (not at "running" time).

      I think the ola package is only the executable, which explains while ld cannot find it.
      I think you may need the libola1 or libola-dev packages which should have the library and the header files.

      Edited: replaced "LDFLAGS" with "LDLIBS"

      Cool, installing libola-dev did it. 🙂

      Sorry to keep poking you about installation stuff, but the last step here is to clone https://github.com/OpenLightingProject/ola into the project and connect it.

      Is it just:

      git clone https://github.com/OpenLightingProject/ola.git

      Do we need to set a header search path option for the project? and / or link to it?

      Not sure why you would need the git repo once you have the -dev package (which has both the shared library and the header files), nor what you mean by "connect it".
      Once that is is installed you should just be able to include your ola include files (e.g.: #include <ola/OlaDevice.h>). As you see from here, these .h files are installed in /usr/includewhich is in the default include path anyhow.
      So in the Makefile options you should just add LDLIBS=-lola I think.
      NOTE: see below, you will need to link in more libraries than just -lola

      If this does not work, then you may want to say a bit more about your setup and what is not working (because I cannot tell now).

      Edited: replaced "LDFLAGS" with "LDLIBS", added NOTE

      forehead slap

      Okay that makes too much sense. It's there. Big thanks.

      Maybe what you need is to have the olad (ola daemon) running in the background ?

      5 days later

      Okay, libola links just fine, and I can drop in the headers:

      #include <ola/DmxBuffer.h>
      #include <ola/Logging.h>
      #include <ola/client/StreamingClient.h>

      But if I try to run after declaring an object, I get this error:

      /usr/bin/ld: /root/Bela/projects/dmx-libola/build/render.o: undefined
      reference to symbol '_ZN3ola11InitLoggingENS_9log_levelENS_10log_outputE'
      //usr/lib/arm-linux-gnueabihf/libolacommon.so.0: error adding symbols: DSO missing from command line
      collect2: error: ld returned 1 exit status
      make: *** [/root/Bela/projects/dmx-libola/dmx-libola] Error 1

      It doesn't matter which class from the library I declare in the code, I always get the libolacommon.so.0: error adding symbols error.

      Sorry this isn't really Bela related, but I'm not as familiar with working out these linking issues.

      Can you add "AT=" to the make options and then paste the output here again?
      This will make the output more verbose, showing the invocation to the linker and this may help debugging the issue.

      It may have something to do with the order in which you are linking in the libraries

      that's pretty weird. Can you copy / paste the content of the "make parameters" box please?