Wireless Home Music Broadcasting—Modifying the NSLU2 to Unleash Your Music
To transform the NSLU2 from a simple NAS into a powerhouse music server, the program mt-daapd, written and maintained by Ron Pedde, is utilized. mt-daapd acts as an iTunes server; it is a multithreaded implementation of Apple's DAAP protocol that advertises music libraries for use by iTunes-compatible clients. Although mt-daapd could have resided on a Linux server, I chose to use the NSLU2 to provide music on demand to my network while meeting my low-power and space-saving desires. Ron actively maintains the mt-daapd program and moderates questions and discussions regarding the program on his Web site (see Resources); there is an active contingent of users that share knowledge and help new users in the site forums.
Since I anticipate streaming media to a Roku Labs SoundBridge, I know that I am limited not by the protocols that mt-daapd supports but rather by whether the downstream client supports playing a file format via DAAP protocol. The SoundBridge will play MP3, non-fairplay lossless aac, aiff, WAV formats and Shoutcast streams advertised by mt-daapd. Had I intended to play the music via Ourtunes, an open-source, cross-platform Java iTunes client, I could have had mt-daapd serve up MP3, WAV and OGG formats via the DAAP protocol. There are also filesystem plugins (gnome-vfs-daap and kde daap ioslave) that allow Rhythmbox and JuK to play music advertised by mt-daapd. Ron noted that the most bleeding-edge “nightly version” of mt-daapd supports server-side conversion; this allows for conversion of wma, OGG and flac file types into .wav format and streaming to the downstream client and enables any client that can play a .wav file to play the converted file. One important caveat is that mt-daapd cannot broadcast aac DRM files that have been purchased from the iTunes music store and are digitally protected.
With this information in hand, we install mt-daapd on the NSLU2. If the user is content with the most recent stable release (0.2.3 at the time of this writing) installation is as simple as telnetting into the NSLU2 and issuing #ipkg install mt-daapd to download and install the program and any dependencies. To continue the process, the user navigates to the NSLU2 default network share /DISK 1/public (or /share/hdd/data/public from the console) and creates a subfolder /mp3 in which to store the music files. The server is then restarted and the music database initialized by issuing the following command #/opt/etc/init.d/S60mt-daapd. This script restarts mt-daapd if the NSLU2 is ever rebooted. The NSLU2 is now an iTunes (DAAP) server. To test this, open an iTunes client attached to the network, and you will note a new blue entry titled mt-daapd on the left-hand side between the Music Store and 90's Music. The name of your iTunes server, passwords, directories and other variables can be configured by editing /opt/etc/mt-daapd/mtdaapd.conf.
That covers the easy way, but what about the more-involved method? Less-stable nightly packages with Ron's newest feature set are available for download on the mt-daapd Web site. Ron ominously points out that the nightlies are “development code...significantly less tested than the stable code, and very likely won't work”. Ominous or not, the nightly packages have never let me down. As of this writing, the most recent nightly packet is mt-daapd_0.2.2-1_armeb.ipk. To install the nightly package, download a copy of the nightly package and copy it into a directory on the NSLU2; most users choose the $HOME directory. After telnetting into the NSLU2 and navigating back to the directory that contains the .ipk file, the command #ipkg install mt-daapd_0.2.2-1_armeb.ipk downloads any dependencies and installs mt-daapd.
That's it! Either method has resulted in configuring the NSLU2 as an iTunes (DAAP) server to any one device on the local network. Before moving on, install a few packages that will enhance your quality of life with the NSLU2. I suggest three: the Bash shell, DropBear for a lightweight secure shell access and wget for downloading files from the console. Each can be readily installed from the command line by typing ipkg install xxx and substituting bash, dropbear and wget for xxx.
At this point, the NSLU2 is patiently waiting to serve music on your network. Although a Windows or Mac client could be used to access the music, the original intent was to play the music in pristine quality through my home stereo system. I could have snaked a cable from the computer to the stereo, but the more attractive solution is the Roku Labs SoundBridge. The device is configured with a standard wired Ethernet port and optional CompactFlash 802.11b adapter; I chose to connect to my network with the latter. After connecting a digital optical Toslink fibre connection from the SoundBridge to my stereo, I powered up the unit and entered my wireless network and encryption data with the handy remote (a significant downside is that the device only supports WEP encryption). A quick check to ensure that an IP addresses was issued from the DHCP server, and the SoundBridge is in business. The SoundBridge automatically detected my mt-daapd library, and I used the handy remote control to select and play music from the NSLU2. mt-daapd supports static and smart playlists and passes these to the SoundBridge after a bit of configuration of mt-daapd. The device will also play saved podcasts and Internet radio stations; my NSLU2 has been successfully serving music via the DAAP protocol to my home stereo for several months. It is an incredibly reliable and efficient method of providing music across the local network that has been made possible by an army of developers and enthusiasts in the Linux community.
Resources for this article: /article/8643.
John MacMichael (CISSP, GSEC, CWNA) is a Naval Officer and Information Professional who works in the field of Information Assurance. He considers himself a journeyman Linux user and utilizes a variety of distributions both at work and home, including Slackware, Debian, Red Hat and several live distros; he has yet to find his favorite. He invites your comments at email@example.com.
|Designing Electronics with Linux||May 22, 2013|
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
- Linux Systems Administrator
- New Products
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Using Salt Stack and Vagrant for Drupal Development
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Favorite (and easily brute-forced) pw's
58 min 52 sec ago
- Have you tried Boxen? It's a
6 hours 50 min ago
- seo services in india
11 hours 22 min ago
- For KDE install kio-mtp
11 hours 22 min ago
- Evernote is much more...
13 hours 23 min ago
- Reply to comment | Linux Journal
22 hours 8 min ago
- Dynamic DNS
22 hours 42 min ago
- Reply to comment | Linux Journal
23 hours 41 min ago
- Reply to comment | Linux Journal
1 day 31 min ago
- Not free anymore
1 day 4 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?