So when I run the line:
"wget https://raw.githubusercontent.com/padenot/bela-utils/master/bela-setup-monome.sh"

I get this error:

--2020-07-15 08:48:49-- https://raw.githubusercontent.com/padenot/bela-utils/master/bela-setup-monome.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... failed: Temporary failure in name resolution.
wget: unable to resolve host address 'raw.githubusercontent.com'

I tried both with and without internet sharing the Bela and the result is the same.

Any ideas? Thanks!

as mentioned, the first step is

giuliomoro connect Bela to the internet

Now, to do that ... see this:

giuliomoro Ultimately the easiest way of getting a Bela connected to the internet would be to connect an ethernet cable into a home router: it is painless and it just works.

if this is not an option, then see this:

giuliomoro you could try to follow these instructions to properly share the network https://github.com/BelaPlatform/Bela/wiki/Connecting-Bela-to-wifi#sharing-wifi-over-usb-with-bela however it is mentioned here that an extra step may be needed (possibly dependent on the version of macos).

Oh sorry about that, I assumed my internet sharing was working before but was wrong!

So I followed the steps on the second option since I don't have an ethernet cable or easy access to a router. And that was successful I think because I now can ping 8.8.8.8.

However, when I run "wget https://raw.githubusercontent.com/padenot/bela-utils/master/bela-setup-monome.sh" I get these errors now:

--2016-11-03 17:32:49-- https://raw.githubusercontent.com/padenot/bela-utils/master/bela-setup-monome.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.112.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.112.133|:443... connected.
ERROR: The certificate of 'raw.githubusercontent.com' is not trusted.
ERROR: The certificate of 'raw.githubusercontent.com' is not yet activated.
The certificate has not yet been activated

I'm not sure how to activate this certificate... I'll try looking but any help is appreciated!

that is probably because the date on your board is behind. It should updated in a few minutes after the board is connected to the internet, so chances are if you were to try again now it would work. If it keeps failing, load up the Bela IDE and that should also set the date on the board, at which point you should be able to re-run the line successfully.

Ok! You were right it worked now. However, yet another issue... When I run the bash command for the monome setup, I get an error about waf and then when I try to start serialoscd, it doesn't work:

root@bela:/# bash -ex ./bela-setup-monome.sh
+ sudo apt install libudev-dev liblo-dev libavahi-compat-libdnssd-dev
Reading package lists... Done
Building dependency tree

Reading state information... Done
libavahi-compat-libdnssd-dev is already the newest version (0.6.32-2).
liblo-dev is already the newest version (0.28-5+b2).
libudev-dev is already the newest version (232-25+deb9u12).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
+ git clone https://github.com/monome/libmonome.git
Cloning into 'libmonome'...
remote: Enumerating objects: 3160, done.
remote: Total 3160 (delta 0), reused 0 (delta 0), pack-reused 3160
Receiving objects: 100% (3160/3160), 1.31 MiB | 1009.00 KiB/s, done.
Resolving deltas: 100% (1671/1671), done.
+ ./waf configure
./bela-setup-monome.sh: line 10: ./waf: No such file or directory
root@bela:/# systemctl start serialoscd
Failed to start serialoscd.service: Unit serialoscd.service not found.

Sorry for all the issues!!

it seems like that file is missing one line. I now cloned the project and amended the file.
So, you'll have to download the new one overwriting the old one. Updated instructions:

# get on the board (may prompt for verification, type `yes` and enter)
ssh root@bela.local 
# download the setup script to the board (overwriting the existing one if any)
wget https://raw.githubusercontent.com/giuliomoro/bela-utils/patch-1/bela-setup-monome.sh -O bela-setup-monome.sh
# execute it
bash -ex ./bela-setup-monome.sh

Yes I caught that before your next response. Unfortunately I can no longer run the sh script because I already have libmonome now and it exits at that part cuz it says it already exists.

So I just am going through each line of the script and doing it manually now, however, I always get an error when I execute ./waf inside the serialosc directory:

root@bela:/serialosc# ./waf
Waf: Entering directory `/serialosc/build'
[ 8/59] Compiling third-party/libuv/src/inet.c
[10/59] Compiling third-party/libuv/src/unix/core.c
[12/59] Compiling third-party/libuv/src/unix/fs.c
../third-party/libuv/src/unix/fs.c: In function 'uv__fs_copyfile':
../third-party/libuv/src/unix/fs.c:1154:20: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (s.f_type != / CIFS / 0xFF534D42u)
~
cc1: all warnings being treated as errors

Waf: Leaving directory `/serialosc/build'
Build failed
-> task in 'LIBUV' failed with exit status 1 (run with -v to display more information)

Hopefully, I can just get this running so I can stop bothering you!

that is an issue with the dependency libuv, and the easiest way is to fix it manually:

edit the file ~/serialosc/third-party/libuv/src/unix/fs.c, go to line 1154 and edit it from

      if (s.f_type != /* CIFS */ 0xFF534D42u)

to

      if ((unsigned int)s.f_type != /* CIFS */ 0xFF534D42u)

i.e.: add (unsigned int) in front of s.f_type.

You can either do this manually, or by running the following line:

sed -i "s/s.f_type/(unsigned int)s.f_type/" ~/serialosc/third-party/libuv/src/unix/fs.c

Then you can resume from ./waf from within the ~/serialosc folder.

and another amendment because serialoscd does not daemonise https://github.com/giuliomoro/bela-utils/commit/98b6a93faca1cdd6cd95d072dc6d265d5233d2ea

Ultimately, these two changes affect the content of the file /lib/systemd/system/serialoscd.service. Ensure it looks like this:

[Unit]
Description=serialosc daemon
[Service]
Type=simple
ExecStart=/usr/local/bin/serialoscd
PIDFile=/var/run/serialoscd.pid
RemainAfterExit=no
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target

Ok so success in this whole monome setup script, I can execute systemctl start serialoscd with no errors! 🙂 Thank you so much!! Now I just need to figure out how to actually use this in C++ with the Bela, I have no idea honestly and I don't think the plain OSC examples really help me here? I am following this thread but it is a bit hard for me to understand and even at the end the OP doesn't seem to quite get it correctly: https://forum.bela.io/d/863-monome-grid-osc-bela/3

Sorry I am not really an engineer but more an artist hence all the simple questions, so I have a bit of difficulty with this and honestly was surprised that using monome wasn't so common or well documented with bela! I guess not enough people trying this yet? I will keep trying out things but I'm a bit lost for where to go from here...

    well my understanding is still the same as it was here:

    giuliomoro I know nothing about it, but I would guess that serialoscd is a bridge between OSC and the monome: my guess is that it receives OSC messages from the user application and passes them over to the monome over serial, and also receives serial from the monome and passes it on as OSC to the user application. So, I guess it has to stay open throughout for the program to work!

    I guess you now need to send OSC to serialoscd and receive OSC from it, using the OscSender and OscReceiver classes . This can be done using the Communication/OSC example as a starting point. That example relies on bi-directional communication with a node server, but ultimately you only need to send and receive (without the more complex handshake logic implemented in there).

    As to WHAT messages to send/receive, I have no idea, that would be in the monome documentation, I imagine? As to WHERE to send the messages (what port), that's hopefully in the serialosc documentation. Note that there will be nothing here that is Bela-specific, so you can probably find better support in specialised Monome forums.
    One thing that emerges from the README of serialosc is that you need to plugin the monome for the process to daemonise and do something useful. This may mean that in /lib/systemd/system/serialoscd.service it should be Type=forking as it was originally, instead of Type=simple as I changed it. I cannot test this because I don't have a monome, but you can. Make sure you look at the output of journalctl -f -n 50 -u serialoscd to see if anything useful is printed when the Monome is connected.

    a year later

    ndivuyo @guiliomoror Greetings! I'm getting along fairly well (for my needs at least!) with Bela Salt C++ programming. I'm thinking about buying a Monome Grid to use it to control the Bela Salt. What are the chances of this connectivity working reasonably smoothly?

    The above setup should work reliably, but I don't have a Monome so I couldn't try it out. @padenot may also be able to say something about how it worked for him. Because of how the BBG + Bela cape are mounted in Salt, you will need to solder some wires to the back of your BeagleBone to break out the UART signals.

    I confirm that plugging a monome device (arc or grid, I tested both) on a Bela just works, nothing special to report, just like any Linux computer. I've been using quite a few packages from different languages to test things out a few years back before writing mine in Rust, also nothing to report, everything just worked, even when stress testing it.

    I've only be using the regular Bela, not the mini, I don't know if we should expect anything different? Maybe it has less available power output to drive the monome or something?

      padenot I've only be using the regular Bela, not the mini, I don't know if we should expect anything different? Maybe it has less available power output to drive the monome or something?

      no should be the same. Which reminds me that the serial connection is actually virtual via USB, so

      you will need to solder some wires to the back of your BeagleBone to break out the UART signals.

      doesn't apply: if you have Salt+ along Salt, you have the USB host port right at the front, otherwise you can still plug it in onto the BBG's USB host port inside the rack.

        4 months later

        Hi giuliomoro Greetings! So, I finally got a Monome Grid delivered and installed enough on my Bela Salt so that #include <serialosc_helpers/SerialOsc.h> "works".

        However, I'm now trying to get something of https://github.com/daniel-bytes/serialosc_example/blob/master/serialosc_example/serialosc_example.cpp to work in my code - but I'm not sure what files I should put where on the Bela (and anything else I should do) in order to get the sample code working.

        Any tips would be gratefully received!

        Is serialosc built as a (shared or static) library? If yes, you'll need to set LDFLAGS and CPPFLAGS accordingly for the Bela project so that libserialosc is linked in and the appropriate -L and -I paths are set. You mention you can already include the header file appropriately, is that achieved by placing the source files for libserialosc in the project folder?