Last edited by wisdom, 2016-04-01 18:13:29
In this tutorial, we will go through how to make Omega as a airplay player.
Connect all the components as following:
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.
To enable Airplay, we are basically installing an opensorce software Shairport-Sync onto Omega. This software makes devices able to play music through Airplay.
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
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
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!
$ opkg install shairport-sync
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!
(If you want learn more features or advanced functions about Shairport-Sync, please visit Advanced Settings.)
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.
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.)
Just in case if you do not know how to use Airplay on iPhone or Android, we are providing a simple tutorial for you.
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.)
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.
Step 2. Open "AllConnect". Tap on the little TV token on the top, and choose the device that you want to play music on.
(If the music drops off, you can try turn off "wifi optimization" option under Settings -> Wlan -> Advanced wi-fi)