Using the Raspberry Pi as a DLNA receiver for a stereo system

Lead Image ©Len Neighbors,

Play It!

When you outfit a good, old fashioned analog amplifier with a digital Raspberry Pi, you can stream music from a mobile phone or computer.

The Digital Living Network Alliance (DLNA) is a trade organization that promotes interoperability among digital media products. DLNA-compliant devices running DLNA-compliant software can cooperate to store, stream, control, and play back audio and video steams. DLNA is based on the Universal Plug and Play (UPnP) standard.

Your Raspberry Pi computer supports software that will allow the Pi to serve as a DLNA receiver. Plug the audio output of your Raspberry Pi into any analog amplifier or stereo system, and you can use it to receive and play an audio stream.

This article offers some thoughts on how to set up your Rasp Pi for DLNA playback and how to stream to it from an Android device or Linux computer. Many other devices and operating systems also support DLNA, but this quick look will give you an idea of how to get started.

Getting Started

A class of specialty distributions within the Rasp Pi community makes it possible to use the Pi as a jukebox. All of these distributions have a Linux kernel and a pre-configured music player daemon, and they let you control playback using a mobile phone or computer.

In this article, I will focus on an XBMC media center (soon to be known by its new name "Kodi Entertainment Center") in the form of OpenELEC [1].

Start up OpenELEC using the NOOBS DVD included with this issue, or download an image from the OpenELEC project website and burn it to an SD card.

Boot the system. You can install the media center by selecting System | Settings and OpenELEC. If you want to use your Rasp Pi for DLNA, choose Settings | Services | UPnP and Allow control of XBMC via UPnP to activate the UPnP Server.

Android Outfitted with BubbleUPnP

Once your OpenELEC Raspberry Pi system is connected to the stereo and set up to use the network, you have a DLNA receiver. Now you need to get some music for the receiver. The easiest way to play music is with an Android smartphone and the BubbleUPnP [2] application. BubbleUPnP lets your Android act as a UPnP/DLNA controller, renderer, or server. You can install a free version from the Play store, but if you want to avoid frequent interruptions to the stream, you'll need to pay for a license key [3].

After selecting your Kodi/XBMC installation from the sidebar (Figure 1), you're set to stream images, videos, or music. The data does not necessarily have to be stored on the smartphone. BubbleUPnP also provides for access to various cloud servers, or you can get your content from Google+ or Google Music.

Figure 1: You can use the Android app BubbleUPnP to stream images, music, and videos from your smartphone or tablet onto the Raspberry Pi.

If you're willing to root your Android, you can use BubbleUPnP to stream all sounds coming from your Android, including from sources that do not support DLNA (see the "Root and Stream" box).

Root and Stream

You can even get BubbleUPnP to stream sounds from apps like Spotify or SoundCloud that do not natively support re-routing of audio output via DLNA.

First you need to install the Xposed Framework [4] on a rooted Android device to implement the Audio Cast function. Afterwards, you should activate the Xposed module that installs automatically with the BubbleUPnP app [5]; then, you will see an Audio Cast button at the top of the sidebar that you can press to re-route the entire audio playback of the mobile phone.

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content