MeshCube Installation

This guide will walk you through the process of installing the software to help you get the most out of your system.
Before starting, make sure you have all the necessary requirements.
By following this step-by-step instruction, you will be able to install and use MeshCube in just a few minutes.

Requirements

  • Server with a fresh installation of Ubuntu Server version 20.04
  • An user with admin privileges
  • MeshCube package provided by BlueUp
  • License provided by BlueUp based on MAC Address, IP Address, MAC and IP addresses

Installation

Mono Framework Installation

The source of the following instruction can be found on the official Mono download page.

  1. Add the Mono repository to your system

    sudo apt install ca-certificates gnupg
    
    sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
    
    echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
    
    sudo apt update
    

  2. Install the mono-complete package

    sudo apt install mono-complete
    

  3. Verify Mono installation Run:

    mono --version
    

The output will be similar to:

   Mono JIT compiler version 6.12.0.182 (tarball Tue Jun 14 22:35:00 UTC 2022)
   Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. 

   www.mono-project.com

   TLS:           __thread
   SIGSEGV:       altstack
   Notifications: epoll
   Architecture:  amd64
   Disabled:      none
   Misc:          softdebug 
   Interpreter:   yes
   LLVM:          yes(610)
   Suspend:       hybrid
   GC:            sgen (concurrent by default)

Software installation

Create the MeshCube folder /opt/meshcube and unzip the package provided by BlueUp into the created folder.

Service configuration

  1. Navigate to system folder /etc/systemd/system
  2. Create the file meshcube.service by typing:

    sudo nano meshcube.service
    

  3. Paste the following configuration:

    [Unit]
    Description=MeshCube
    Requires=network.target time-sync.target
    After=network.target time-sync.target
    [Service]
    Type=simple
    WorkingDirectory=/opt/meshcube
    ExecStart=/usr/bin/mono /opt/meshcube/bpe.exe
    Restart=always
    RestartSec=1
    [Install]
    WantedBy=multi-user.target
    

  4. Save the file and enable the service:

       sudo systemctl enable meshcube.service
       sudo systemctl daemon-reload 
    

  5. Start the service:

       sudo systemctl start meshcube.service
    

Your system will be started.
You can access the MeshCube web interface at http://<server-ip-or-hostname>

MQTT Configuration (optional)

MeshCube requires an MQTT Broker to connect and manage Wirepas gateways. You can use an existing external MQTT Broker or install the MQTT broker in the same machine where is installed MeshCube.

In case the MQTT Broker is installed locally the service file should be modified by adding the Broker service name.

E.g., if you are using mosquitto.service, in the Unit section the 3d line will be

After=network.target time-sync.target mosquitto.service