Wireless Home Music Broadcasting—Modifying the NSLU2 to Unleash Your Music
Like many consumers, the size of my collection of music CDs has spiraled out of control during the past few years. As hard drive prices dropped and CD ripping speeds increased, I jumped at the chance to rip my CDs into MP3 and Ogg Vorbis format; the pile of unorganized CDs became a thing of the past and were relegated to a box in the back of my closet. Although ripping the music collection to my computer eliminated the stack of CDs, it presented new problems. Several members of my family share the computer on which my music was stored; this meant I had to interrupt my son's game of WINE-powered Deus Ex if I wanted to queue up an album. Worse yet, I did not have a method of delivering the music from my computer to my stereo on the other side of the house in a low-loss and cable-free method. I cringed at the thought of listening to music blasting from my inexpensive computer speakers in our small computer room. I waited for a product that would be the solution to my problem, but none emerged. I eventually decided to string together several pieces of technology and build my perfect solution. In the end, I desired a setup that would allow me to move my music library off my computer and onto Network-Attached Storage (NAS), play my music with minimal signal loss and remove the necessity of utilizing the family computer as a middleman.
I have always been enamored with projects that extend the capability of computer hardware beyond the vision of the original product engineers. With this as a backdrop, my goal was to chain together several pieces of existing hardware and software to build the most optimal utilization of my audio collection. What I describe is a method to store my music library on a Linux-enabled Linksys NSLU2 NAS device, advertise the music library via mt-daapd, a program that acts as an iTunes (DAAP) server for Linux and other POSIX UNIXes and send the music to my stereo via a Roku Labs SoundBridge, a network music player. There are certainly several ways that this project could have been completed, substitutions could have been made—a full-size Linux server for the Linksys NSLU2, a long audio cable from the server to the home stereo—however, I found this to be the most elegant and practical solution. What surprised me was that I found a thriving community of users that were yearning for the same type of configuration.
The first order of business was to determine a method of moving my music library from my computer and onto a networked storage medium. My initial plan was to convert my aging Pentium III tower into a Linux file and media server that would enable music video across the network while being flexible enough to implement any other services. I scrapped this idea as I was concerned about the power consumption of what would be a mostly idle device, powering up a server just to hear the latest music from the Beastie Boys did not seem like a viable option. Additionally, the space in my tiny computer room is quite limited, and another machine would have added to the heat and noise levels.
I found the perfect alternative in the Linksys NSLU2 Network Link Storage Unit, a NAS device that allows the connection of two external USB 2.0 hard or Flash drives, connecting them to the network via a 10/100 Ethernet connection. The NSLU2 has a Web-enabled interface that allows configuration of file and data sharing across the network. The NSLU2 is packaged in a convenient device that is smaller than my external hard drive, weighs in at less than 6 ounces, consumes less than 9W during normal usage and is easy to stash on a bookshelf or in an unused corner of your computer space. Powered by a modest Intel IXP420 ARM CPU running at 133MHz with 32MB of internal Flash RAM, I had found a storage device but had not determined a method to serve the files.
Several Linksys devices use Linux as the underlying OS; as such, the release of their source code is mandated by the GPL license. Armies of Linux programmers and developers have embraced the Linksys product line to include the NSLU2 (affectionately termed the Slug), and have extended the functionality of these devices. Several flavors or “streams” of replacement firmware have appeared that extend the functionality of the unit. My choice for firmware replacement, and by far the most user-friendly, is the Unslung stream that retains the original product functionality, retains compatibility with stock Linksys firmware, yet allows users to add programs and functionality to the NSLU2. Another popular choice is the OpenSlug firmware, a stream produced with OpenEmbedded, which contains a completely customizable Linux kernel and root filesystem. OpenSlug installs a minimal OS footprint that is enough to start the hardware and allow for the installation of additional software. This allows for a highly configurable and extendable installation and encourages functionality tailoring based upon user needs—think of it as the Slackware of the NSLU2 firmware world. Both Unslung and OpenSlug are hosted on the NSLU2 Linux Wiki Web site (see the on-line Resources) and have a throng of supporters. At the time of this writing, the latest Unslung firmware is 5.5 and is considered stable. Upgrading the NSLU2 with the Unslung functionality is done in two parts: installing the firmware to the NSLU2 and then “unslinging” the attached USB hard disk or Flash device. This process is straightforward and well documented in the README file included with the firmware. The directions should be followed strictly throughout the process to avoid “bricking” the NSLU2. Upgrading the firmware is as simple as accessing the device Web interface and utilizing the Upgrade Firmware utility. Once completed, the external disk must be unslung. During unslinging, the original root NSLU2 jffs2 filesystem is copied onto the external USB disk and additional directories are added. Each time the device boots after the firmware has been upgraded and the attached disk is unslung, it runs a script that directs the NSLU2 to load a root filesystem stored on the external drive instead of the filesystem in the NSLU2 Flash memory. This allows the user to store code for use by the NSLU2 on the hard disk instead of within the device RAM.
Although programs can be cross-compiled for the NSLU2, more than 6,500 packages have already been ported. Most users will find it much easier to install software using the ipkg system; apt users will find this familiar. The ipkg system allows for network downloads, satisfies package dependencies and manages the installation, upgrade and removal of programs. After upgrading the NSLU2, the ipkg system needs to be configured correctly and the feeds necessary to download new packages need to be updated. After telnetting into the NSLU2, the following commands are issued:
#ipkg update #ipkg install unslung-feeds # ipkg update
Common ipkg commands are ipkg list, ipkg status and ipkg install <package name> to install a particular program. These packages allow the NSLU2 to become a truly capable Linux device; users have reported using the NSLU2 as Web, file, mail, asterisk, media, squid and a host of other server applications.
- diff -u: What's New in Kernel Development
- Divx# Watch The Other Woman Full HD Online Streaming Viooz
- Numerical Python
- Great Scott! It's Version 13!
- Use Linux as a SAN Provider
- RSS Feeds
- NSA: Linux Journal is an "extremist forum" and its readers get flagged for extra surveillance
- Adminer—Better Than Awesome!
- It Actually Is Rocket Science
- Linux Kernel Testing and Debugging