Skip to content

Installation on Raspberry Pi OS

Alejandro Zeise edited this page Feb 11, 2021 · 4 revisions

In Progress

Installation Instructions

0. Ensure latest software is installed

sudo apt update
sudo apt dist-upgrade

0a. If bluealsa is installed, remove it

The bluealsa in the debian package repository hasn't been compiled with AAC or OFono support, so it needs to compile and install it later.

sudo apt remove bluealsa

1. Installing the Package

The first step is to download one of the .deb files from one of the releases. Once downloaded, install the package: sudo apt install ./[downloaded file name]

2. Installing runtime dependencies

raspberry-link depends on the dbus-python, which isn't installable using apt. We need to use pip:

sudo pip3 install dbus-python

If you get an error that pip isn't found, you'll have to install it: sudo apt install python3-pip

2a. Compiling Bluealsa

We'll need to install a few other packages and then compile bluealsa from source. If you want high-quality audio then we will also have to compile fdk-aac. First install the following dependencies:

sudo apt install ofono git automake build-essential libtool pkg-config libasound2-dev libbluetooth-dev libdbus-1-dev libglib2.0-dev libsbc-dev

Next you'll probably want to create a directory in which you'll download the source code for bluealsa and fdk-aac.

mkdir raspilink-deps && cd raspilink-deps

Now we'll clone bluealsa and fdk-aac

git clone https://github.com/mstorsjo/fdk-aac
git clone https://github.com/Arkq/bluez-alsa

Now we can compile. First we do fdk-aac as it's needed by bluealsa.

fdk-aac:

Tip: Whenever you use the make command, you can use the -j4 option to use 4 cores if your device has more than one (replace 4 with amount of cores your device has)

cd fdk-aac
./autogen.sh
./configure
make
sudo make install

bluez-alsa:

A more in-depth instruction page can be seen here. However, for our purposes, this will suffice:

# Return back to your raspilink-deps directory
cd bluez-alsa
autoreconf --install
mkdir build && cd build
../configure --enable-ofono --enable-aac
make
sudo make install

All done!

3. Copy and Enable systemd Services

RaspberryLink comes with systemd service files and OpenRC ones. Raspberry Pi OS uses systemd, so all we need to do is copy the files over to the correct directory and then enable them using systemctl

First copy the service file:

sudo cp /opt/raspberrylink/service-files/raspberrylink.service /etc/systemd/system/

In order for the program to run on boot, you'll need to enable the services. This will depend on what your device is meant to do.

If your device is the controller, enable the server:

sudo systemctl enable raspberrylink

If your device simply has a camera and doesn't run the controller software, enable the agent: sudo systemctl enable raspberrylink-agent

If your device is both the controller and has a camera attached, enable both from above.

4. Configure

There's a couple things that need to be checked and/or set in the configuration file, which is detailed on the configuration page

Clone this wiki locally