2. Software - mi-pogo/MeshBox GitHub Wiki
The following software have been included into the MeshBox.
Operating system + Player

As player, Kodi was chosen due to its versatility, the variety of (audio) plugins which are available for it thanks to the huge community behind it and for its friendly user interface. It also extends the controlling possibilities for MeshBox by providing access via web interface and the official mobile app Kodi Remote (a.k.a. KORE).
As operating system, among all Kodi distributions, I chosed LibreElec because, based on its design philosophy: Just Enough OS for Kodi, it has a very low overhead => it runs well even on underpowered hardware. It is also a very stable platform and it has very short boot times.
Rotary encoders and push buttons software
In order to be able to use the rotary encoders and push buttons with Kodi under any Linux platform, I have developed a C++ program (service) named "MeshButtons" which reads the GPIO and sends commands to Kodi’s Event Server. More details about it can be found here.
Installation steps
First thing first, LibreElec must be installed onto the Raspberry Pi. To get it done, the steps from LibreElec official site must be followed:
https://libreelec.wiki/libreelec_usb-sd_creator
From there, usb-sd_creator executable must be downloaded for the platform being used (Linux, Windows, Mac) and then ran. Then, Raspberry Pi4 must be chosen in the first step to select the version of LibreElec SD image and then steps indicated by the program must be followed.
Once it is finished, insert SD card into the Raspberry and power it up. After Raspberry boots up with LibreElec there are several steps and settings that must be done in order to get MeshBox up and running.
First setting, SSH server must enabled in LibreElec. To do that go to: SYSTEM -> LIBREELEC -> SERVICES -> Enable SSH and put it to Enable. To connect to the system any SSH client, like Putty, can be used.
Connect to the IP of Raspberry via SSH to LibreElec system then login with the default credentials (user: root, passw: libreelec).
In order to be able to change some system settings in LibreElec, first thing is is to mount /flash and /storage directories as Read/Write.
mount -o remount,rw /flash
mount -o remount,rw /storage
Setting up the display.
To do that, edit the config.txt file
nano /flash/config.txt
and add the following lines:
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
hdmi_drive=1
then save with CTRL+O followed by Enter.
Setting up integrated Bluetooth as A2DP Sink.
The steps from LibreElec site, only from section Bluetooth Audio Receiving, must be performed:
https://libreelec.wiki/configuration/pulseaudio
then, in order to make the changes from the above link to be persistent, autostart.sh must be edited or created with the following command :
nano /storage/.config/autostart.sh
then add the following lines:
#!/bin/bash
pactl load-module module-udev-detect
pactl set-default-sink <alsa_output.0.stereo-fallback>
(replace the parameter between <> with the result given by "pactl list short sinks")
pactl set-default-source <alsa_output.0.stereo-fallback.monitor>
(replace the parameter between <> with the result given by "pactl list short sources")
then save with CTRL+O followed by Enter.
After all is finished, pair phone/tablet with the MeshBox from LibreElec Bluetooth section. For that go to SYSTEM->LibreELEC->Bluetooth and from the opened list choose the name of your phone / tablet (it must have bluetooth activated and in discovery mode) then make the pair.
Setup and installation of MeshButtons
In order to make rotary encoders and push buttons to work in LibreElec, the following steps must be performed:
Copy the compiled binary of MeshButtons program from an external drive to /storage/.config/
ex: cp /var/media/yourstick/Mesh_Buttons /storage/.config/
Next, a shell script called mesh.sh must be edit or created, which is needed in order to be able to call Mesh_Buttons from autostart.sh:
nano /storage/.config/mesh.sh
and add the following lines:
#!/bin/bash
/storage/.config/Mesh_Buttons
then save with CTRL+O followed by Enter.
In order to make it to run at startup, the following steps must be made:
nano /storage/.config/autostart.sh
and add the following lines:
nohup /storage/.config/mesh.sh &
then save with CTRL+O followed by Enter.
Finally, edit config.txt file and add initialization settings for GPIO pins:
nano /flash/config.txt
and add the following line:
gpio=17,23,5,6,12,13,16,26=ip,pu
then save with CTRL+O followed by Enter.
This will set the respective GPIOs as inputs with pull-up resistors activated which is mandatory for the MeshButtons program.