Introducing: Omega2

Streaming Music with Airplay

Last edited by wisdom, 2016-04-01 18:13:29

Air play

In this tutorial, we will go through how to make Omega as a airplay player.

Overview

Tutorial Difficulty:

Beginner

Time Required:

10 minutes

Required Materials:

  • a USB cable (not showing up on the picture)
  • The Omega
  • a mini dock or expansion dock
  • a USB audio sound card
  • a normal music output device (i.e. speakers, earphones).

components

Connect all the components as following:

connection

Background Info

What is Airplay

Airplay is a wireless streaming protocol used by Apple Inc that allows users to stream mainly audio and video between different devices.

This tutorial shows how to enable Omega with Airplay function so that users could stream audio from other devices (e.g. phones, tablets) and output from Omega.

Install Shairport-Sync onto Omega

To enable Airplay, we are basically installing an opensorce software Shairport-Sync onto Omega. This software makes devices able to play music through Airplay.

Step 1: Uninstall avahi-nodbus-daemon

To install Shairport-Sync, we need to install avahi-dbus-daemon first, but there is already avahi-nodbus-daemon on Omega, so we need to uninstall it.

$ opkg remove avahi-nodbus-daemon --force-depends

Step 2: Download avahi-dbus-daemon from openWRT and Install

We can get avahi-dbus-daemon from openWRT download page, openWRT is an open source platform, and there are a lot of packages avaliable.Or we can use opkg method, but whichever method we are using, we need to update the package first.

$ opkg update
$ opkg install avahi-dbus-daemon --force-overwrite

Step 3: Download Shairport-Sync and Install

If you would like to install the newest version of Shairport-Sync (it keeps updating) and you know how to build binary package, you can download it from the above website. Else, we can download an already made binary package from openWRT download page (version 2.1.15) or from a contributor on github (version 2.6.0) (Please visit Advanced Settings for more information about later version). For Shairport-Sync (version 2.4.0) or later, it enables users to set password for Airplay, to remote control from Omega, to track the audio, and more fantastic features!

openWRT package:

$ opkg install shairport-sync

Step 4: Reboot Omega and Run it!

$ reboot

For version 2.1.15, it seems when we are trying to run it, it outputs an error message:

$ shairport-sync
start up
could not bind any listen sockets!

However, it does not really matter. Even though you are not running it, as long as the Omega is started up, the Airplay option is showing on the phone and you can stream music now!

Airplay

(If you want learn more features or advanced functions about Shairport-Sync, please visit Advanced Settings.)

Basic Configuration

The configuration file for version 2.1.15 is quite different from vesion 2.6. For this tutorial, I am just going to show the very basic of the version 2.1.15 configuration file. If you would like to learn more about version 2.6 or later configuration file, please visit Advanced Settings.

The configuration file for version 2.1.15 is under the following path: /etc/config/shairport-sync.

configuration

Now you can custom your shairport-sync as you want. For example, if you want to change your Airplay name showing on the devices, you can uncomment it first and change it.

(!! Caution: There is a bug for the display of Airplay on iPhone, when you changed the device name and reboot, the previous name might show up on your device, just ignore it.)

Onion Audio Player

Onion Audio Player on phone

How to Use Airplay

Just in case if you do not know how to use Airplay on iPhone or Android, we are providing a simple tutorial for you.

iPhone users

Due to Airplay is developed by Apple Inc, it is really convenient for iPhone users to use the airplay function.

Step 1. Make sure there is any of the Airplay devices under the same wifi connection, or make sure you are running shairport-sync on Omega.

Step 2. Open the control center on your iPhone. Tap on Airplay button and choose the device that you want to play music on. (If there is no Airplay button, that means there is no Airplay device available.)

Control Center

Airplay

Android Users

For Android users, it is not complicated to use Airplay at all. All you need to do is to download an app from Google Play. There are various of Airplay apps avaliable, and what is showing below is one of them named "AllConnect".

Step 1. Download "AllConnect" from Google Play. It is a free software, so you do not need to worry about paying any extra. Make sure there is any of the Airplay devices under the same wifi connection, or make sure you are running shairport-sync on Omega.

AllConnect

Step 2. Open "AllConnect". Tap on the little TV token on the top, and choose the device that you want to play music on.

All-Airplay

(If the music drops off, you can try turn off "wifi optimization" option under Settings -> Wlan -> Advanced wi-fi)

Acknowledgements