Roon Bridge for ARM: a beginner’s guide to Raspberry Pi and Cubox-i

Roon Bridge on a Raspberry Pi: an installation guide

Your Pi will run off a micro SD-card, that you can insert in the Pi’s card holder. Before doing so, you will need to prepare the card by installing the OS and Roon Bridge. While some of these step my look slightly daunting for the first time, just follow through – it is not as hard as it may look and help is around! :slight_smile:

In this guide, I will assume you are using a wired network connection. If you want to use the Pi 3’s WiFi (not recommended – see ‘A word about Wifi’ above), see ‘Configuring Wifi on a Pi 3’ at the end of this guide.

Downloading the OS

In this guide, we will be using Raspbian Jessie Lite – a relatively lightweight Linux version for the Raspberry Pi that is distributed, maintained an supported by the Raspberry Pi Foundation. You can download the OS from the Foundation’s website (choose Raspbian Jessie Lite). After unpacking the ZIP-file, you will have an .img file containing the entire OS.

Writing the OS to the SD card

Next you’ll have write the OS to the SD Card. You will need and SD-card reader for this (built-in to some computers, but otherwise you can use a USB SD-card reader). Most micro SD-cards will come with an adapter included - you will need one to fit the small card to the larger reader.

For writing the .img file to the SD-card, Windows users can download the freeware Win32DiskImager application from the Sourceforge project page and follow instructions on the Foundation’s website (in short: launch Win32DiskImager, select the .img file downloaded above, select the drive letter your PC has assigned to your SD-card and click ‘Write’).

OS X users can download [Apple Pi Baker]((http://www.tweaking4all.com/hardware/raspberry-pi/macosx-apple-pi-baker/) (seriously!) and follow instructions (basically: launch PiBaker, select the SD-card, browse to the .img file downloaded above in the ‘Pi-ingredients’ section and press ‘Restore Backup’).

Linux buffs will most likely know what to do but can find a refresher’s course here.

The writing process will take a few minutes. When it’s finished, just close the app. On recent Raspbian distributions, you will have to enable SSH access. You can do so by placing a file called ‘ssh’ (without any extension) on the boot partition of the SD-card. The file itself can be empty. At first boot, your Pi will detect the file and enable the SSH-server.

Now, you can eject your SD-card. Insert the freshly written SD-card into your Pi, attach network and power cables and off you go!

Controlling your Pi through SSH

You can take command of your Pi through SSH (Secure Shell): a small, text-based terminal window that offers remote access: you can look at your shell window as if it were a monitor, attached to your Pi.

Windows users can use PuTTY for SSH access: a free, lightweight SSH-application that can be downloaded from greenend.org.uk. Instructions for use with the Pi can be found here on the Foundations website.

OS X users can use the Terminal.app (located in Applications > Utilities) while Linux users can open a terminal windows of their choice.

Finding out your Pi’s IP address

You connect to your Pi using its IP address. On most networks, this address is assigned dynamically using DHCP. Most routers will have a page showing which IP address on your network is in use by which device.

Another easy way of finding out your Pi’s IP address is by using Fing, a freeware app available for Android and iOS. Fing scans your network and shows all active devices – your Pi will have ‘Raspberry Pi Foundation’ next to its MAC-address.

Connecting to your Pi

In PuTTY, enter the IP address of your Pi in the ‘Host Name (or IP address) box and press ‘Open’. A security alert about the server’s host key may pop up – you can safely press ‘Yes’.

You can now log in to your Pi by entering ‘pi’ for username and ‘raspberry’ for password.

OS X and Linux users can connect to their Pi in their respective terminal apps by issuing the following command:

ssh -l pi ip-address-of-your-pi

When asked accepting the host key, type ‘yes’ and press enter. When asked for the password, type ‘raspberry’.

A little housekeeping

After logging in successfully, let’s get your Pi ready for action.

First, you’ll to change a few settings by issuing:

sudo raspi-config

  1. You’ll want to make sure your Pi uses the space on your SD-card in its entirety by choosing option 1: Expand filesystem.

  2. For security reasons, you may want to change the default password to something different. Choose 2: Change user password and follow instructions.

  3. The default hostname of your Pi is ‘raspberrypi’. While apt and technically correct, things can get confusing if you plan on employing multiple Pi’s. You may want to change this using 9: Advanced Options, followed by A2: Hostname.

After the above, leave raspi-config by using Tab to select Finish. You Pi will now ask you to reboot.

Rebooting will take about 30 seconds. After logging in again, you’ll want to make sure your OS is up-to-date by issuing:

sudo apt-get update && sudo apt-get upgrade

It will take a while to finish. Grab a beverage of your choice and watch in mild bewilderment. When asked if you want to continue, press y + enter.

When it’s finished, reboot your Pi once again:

sudo reboot

Configuring your HAT

In modern Raspbian releases, all you will have to do to let your Pi know which HAT is present, is adding a little line of text to the configuration file after logging in again:

sudo nano /boot/config.txt

This will open the file in a text editor called ‘nano’. Scroll to the end of the text with your arrow keys and add the dtoverlay for your HAT on a new line. Refer to your HAT manufacturer for the correct overlay. A few examples:

For the IQ Audio DAC+:

dtoverlay=iqaudio-dacplus

For the Hifiberry DAC+:

dtoverlay=hifiberry-dacplus

For the Hifiberry Digi+:

dtoverlay=hifiberry-digi

While you’re at it, you may want to disable to on-board audio altogether by commenting out the line ‘dtparam=audio=on’:

# dtparam=audio=on

You can close the nano text editor and save the file by typing CTRL-X, followed by ‘y’ when prompted to save.

(If you will be using a USB DAC, you do not have to define overlays. You still may want to comment out the on-board audio though.)

Reboot your Pi when done:

sudo reboot

(Optional) Configuring WiFi on a Pi 3

Enabling WiFi on the Pi 3 is quite easy. You’ll need to edit the ‘wpa-supplicant’ configuration file:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

at the bottom of the file (use your arrow keys to navigate), add this text:

network={
	ssid="My-WiFi-network-name"
	psk="My-WiFi-password"
}

For ssid, enter the name of your WiFi network. For psk, enter your WiFi network’s WPA or WPA2 password.

Save the file by entering CTRL-X, y.

Your WiFi connection will activate within a few seconds. You can verify that it is connected by issuing

ifconfig wlan0

If inet addr has a value next to, you’re connected. You can now remove your wired network cable and reboot your Pi.

Installing Roon Bridge

Roon provides excellent instructions for installing Roon Bridge. The Raspbian Lite installation outlined above meets all the required dependencies for Roon.

In short, after logging in again it boils down to three small steps for mankind:

  1. Download the easy installer:
    curl -O http://download.roonlabs.com/builds/roonbridge-installer-linuxarmv7hf.sh
  2. Make the installer script executable:
    chmod +x roonbridge-installer-linuxarmv7hf.sh
  3. Run the installer script:
    sudo ./roonbridge-installer-linuxarmv7hf.sh

Just answer ‘y’ when it asks to install.

The Roon Bridge service is now active and configured to auto-load at reboot. In Roon Remote (desktop, tablet or phone), the new Roon Bridge audio device(s) will be visible in Settings > Audio. You can enable and name your new zone(s) in the usual way.

That’s all folks – enjoy the music!

Roon Bridge on a Cubox-i: an installation guide

Installing Roon Bridge on a Cubox-i is roughly comparable to the way a Raspberry Pi is setup, with a few notable differences. Your Cubox-i will run its OS off a micro SD-card, that you can insert into the Cubox’s card holder. Before doing so, you will need to prepare the card by installing the OS and Roon Bridge. While some of these step my look slightly daunting for the first time, just follow through – it is not as hard as it may look and help is around! :slight_smile:

Downloading the OS

In this guide, we will be using Armbian – a relatively lightweight and well maintained Linux version based on Debian. You can download the OS from the Cubox page on the Armbian website (choose Jessie server from the Legacy section – this is the only release that fully supports all bitrates up to 192Khz in the S/PDIF port).

The download is available as a zipped 7z archive, that can be uncompressed with 7-Zip on Windows, Keka on Mac and 7z on Linux (apt-get install p7zip-full). After unzipping, you’ll have an Armbian folder with a .raw file containing an image of the OS.

Writing the OS to the SD card

Next you’ll have write the OS to the SD Card. You will need and SD-card reader for this (built-in to some computers, but otherwise you can use a USB SD-card reader). Most micro SD-cards will come with an adaptor included - you will need one to fit the small card to the larger reader.

On Windows, .raw files can be written to the card using the freeware app Rufus. Check ‘Create a bootable disk using’ > DD image and browse for the Armbian .raw file by clicking on the optical drive icon. You will need to select ‘All files’ in the browse window before you can see the Armbian .raw file – it will write to card just fine.

On OS X and Linux, you will need to use the ‘dd’ command using the command line in the Terminal. Linux buffs will know what to do – OS X users will find Terminal.app in Applications > Utilities. Before writing to the card, you will need to make sure it is not mounted. On OS X, type

diskutil list

in the terminal. From the list, you will see which device is your card. I’ll use /dev/disk2 for example. To unmount, type

diskutil unmountDisk disk2

Now you will need to navigatie to the folder your .raw file is in. To make it easy on yourself, you can just copy (or drag) the file to your home directory and work from there. Next, issue the following command to start writing the file to the card:

dd bs=1m if=filename.raw of=/dev/rdiskx

In this example, where the SD-card is /dev/disk2 and the Armbian release is 5.10 Legacy:

dd bs=1m Armbian_5.10_Cubox-i_Debian_jessie_3.14.67.raw of=/dev/rdisk2

On Linux, the command is slightly different:

dd bs=1M if=filename.raw of=/dev/sdx

The writing process will take a few minutes. When it’s finished, just close the app and eject your SD-card. Insert the freshly written SD-card into your Cubox, network and power cables and off you go!

Controlling your Cubox through SSH

You can take command of your Cubox through SSH (Secure Shell): a small, text-based terminal window that offers remote access: you can look at your shell window as if it was a monitor, attached to your Pi.
Windows users can use PuTTY for this: a free, lightweight SSH-application that can be downloaded from greenend.org.uk.

OS X users can use the Terminal.app (located in Applications > Utilities) while Linux users can open a terminal window of their choice.

Finding out your Cubox’s IP address

You connect to your Pi using its IP address. On most networks, this address is assigned dynamically using DHCP. Most routers will have a page showing which IP address on your network is in use by which device.

Another easy way of finding out your Cubox’s IP address is by using Fing, a freeware app available for Android and iOS. Fing scans your network and shows all active devices.

Connecting to your Cubox

In PuTTY, enter the IP address of your Cubox in the ‘Host Name (or IP address) box and press ‘Open’. A security alert about the server’s host key may pop up – you can safely press ‘Yes’.

You can now log in to your Cubox by entering ‘root’ for username and ‘1234’ for password.

OS X and Linux users can connect to their Pi in their respective terminal apps by issuing the following command:

ssh -l root ip-address-of-your-cubox

When asked accepting the host key, type ‘yes’ and press enter. When asked for the password, type ‘1234’.

A little housekeeping

At the first boot, Armbian will automatically resize the file system for you, so your Cubox can use the full size of your SD card.

After logging in, it will ask you the change the default root password (1234) to something differtent and to create a new user (you). You can choose a username and password yourself. All other questions can be left blank and answered by a simple ‘enter’.

Now, you’ll want to make sure your OS is up-to-date by issuing the following command:

sudo apt-get update && sudo apt-get upgrade

When it is finished, reboot your Cubox and login again – this time using the new user / password combo you have created.

Installing Roon Bridge

Roon provides excellent instructions for installing Roon Bridge. The Armbian installation outlined above meets all the required dependencies for Roon.

In short, after logging in again it boils down to three small steps for mankind:

  1. Download the easy installer:
    curl -O http://download.roonlabs.com/builds/roonbridge-installer-linuxarmv7hf.sh
  2. Make the installer script executable:
    chmod +x roonbridge-installer-linuxarmv7hf.sh
  3. Run the installer script:
    sudo ./roonbridge-installer-linuxarmv7hf.sh

Just answer ‘y’ when it asks to install.

The Roon Bridge service is now active and configured to auto-load at reboot. In Roon Remote (desktop, tablet or phone), the new Roon Bridge audio device(s) (S/PDIF or a DAC connected by USB) will be visible in Settings > Audio. You can enable and name your new zone(s) in the usual way.

That’s all folks – enjoy the music!

34 Likes