view · edit · print · history


The TwonkyVision MediaServer will turn your Slug into a server for music, videos and pictures using the popular UPnP standard. This standard is used by a number of off-the-shelf devices that you can hook up to your TV or stereo systems, or those might have UPnP support already built in. Any UPnP device will get the media from the slug over your home network - either via a network cable or wireless. Serving the media from the NSLU2 means that no PC needs to be running in order to have all the media available through your house.


Twonky charges $ 19,95 for the Server, but there's a trail period of 30 days. You can add the key in the webinterface once you purchased it.

Installing TwonkyVision on Unslung 6.8

Twonky has self-installing NSLU2 packages. The installation on Unslung is very simple:

1. Get the latest Version for the from twonky.com (March 2010: Version 6.0.23 http://www.twonkyforum.com/downloads/6.0.23/(approve sites))

2. Unpack the package und follow the installer (don't forget to enable telnet and set the HTTP-Port of your Slug to 80 if you have changed it (you can do it in the Webinterface). You can change it back to your old port after installation

3. Install it and go to the Webinterface to make the configuration

Thats it - have fun

Getting it

TwonkyVision MediaServer is a commercial product. You will have to buy it from the vendor if you haven't already done so. As of November 2004, version 2.4 comes with the required binaries and some instructions on how to use the MediaServer on the NSLU2.

http://www.twonkymedia.com - on this page you'll find a link "buy." - that's how you will get the server. Following the payment, you will be sent a user account and password to download your version. You can do that on your normal workstation. Unzip this package somewhere and have a look around the files that are included in it.

http://www.twonkyforum.com/unsupported/4.4.11/(approve sites) - Use "Linux ARM little endian glibc 2.2.5" on Debian/NSLU2


In your download there is a HowTo.txt in the NSLU2 folder. As of November 2004/version 2.4 this file describes 2 ways of installing the mediaserver on your NSLU2:

  1. Compiling a new firmware binary based on Unslung 1.9 and flashing it to your NSLU2
  2. Using the telnet access method to add the binary into the Unslung /opt/ directory structure.

The second way of installing the mediaserver will most likely be your choice, especially since Unslung 1.x is deprecated and you probably have your NSLU2 already telnet enabled and running the latest Unslung firmware.

Note: I have used Unslung 2.12b and was not able make it automatically startup. From http://groups.yahoo.com/group/nslu2-linux/files/nohup.gz you will get a nohup executable that allows you to start the server from the login shell and it will stay running when you log out.


The mediaserver tries to find a configuration file called twonkyvision-mediaserver.ini in the current directory. There is no template delivered with the mediaserver distribution, but the mediaserver creates one using default values if it does not exist. Thus, run the mediaserver once, terminate it and then edit the file.

In the twonkyvision-mediaserver.ini make sure you add the path of the folder that holds your media as contentdir=, and also ensure that the flag to use the cwd as the media path is set to 0 (i.e. usecwd=0) - the default is 1.

If you have also transferred the file TwonkyVision-Internet-Streaming.ini that holds the radio stations, then the name of this file needs to go into the twonkyvision-mediaserver.ini, too. Find the line radiofile=.


If you don't (yet) own a UPnP device, then you might want to play around with a UPnP software "device" on your workstation.

There is a reference implementation available from Intel. You can download it for free from http://www.intel.com/technology/UPnP/toollicense.htm . When testing the MediaServer, you probably start with the "AV Media Controller.exe" from the Intel tools package to check out the media tree. If you want to learn quickly how to use the Intel tools, please go to http://www.intel.com/technology/UPnP/tutorial.htm and watch the video "Overview of Intel AV Tools for UPnP Technologies". This is recommended, as the tools are aimed at developers and hence are not as intuitive as a streaming device.

If your workstation is secured using a firewall, then you will most like have to open up UDP port 1900 for incoming requests from the NSLU2's IP address.

WMP 9 & 10 Plugin

A free UPnP plugin for Windows Media Player 9 & 10 which is useful to test with: http://www.on2share.com/

Unslung 3.16 (and 3.17) beta update.

Jan 22, 2005

It is much easier now to get TwonkyVision running. Here are some simple steps to get you going, the information on performing the steps is easy to find.

1. Purchase TwonkyVision media server.

2. Install Unslung firmware

3. Create /unslung directory (if doesn't exist) (Optional - create /share/hddvfat directory for FAT32 hard drive use) on the NSLU

4. Create /opt/twonk directory

5. Modify mediaserver.ini file for NSLU (you can use the Windows version of TwonkyVision to create the file, or type ./opt/twonk/mediaserver to start the mediaserver, which will create the file)

6. Copy mediaserver executable (NSLU2 directory in zipfile) and ini file to /opt/twonk directory

   Note: if you are only streaming music, you can just use the musicserver executable to save space

7. Create rc.local file in /unslung and modify as follows (this will mount FAT32 drives and start the mediaserver)

   Note: if you are going to use the musicserver executable instead of the mediaserver 
   change the last line from mediaserver to musicserver

   #! /bin/sh
   /bin/mount -t vfat /dev/sda1 /share/hddvfat > /dev/null
   /bin/mount -t vfat /dev/sdb1 /share/flash > /dev/null
   chdir /opt/twonk
   /opt/twonk/mediaserver &
   chdir /
   return 1

8. Optional - create rc.xinetd file in /unslung and modify to enable telnet (see unslung readme file)

9. You are done. If your ini file is correct your UPnP device should find the NSLU on the network

If you are having any issues with device compatability or twonkyvision there is a good forum to be found at http://www.media-servers.com/forums/viewforum.php?f=7

You can also report any bugs or issues at http://www.twonkyvision.com/mantis/view_all_bug_page.php

Unslung 3.18-beta and Twonkyvision mediaserver 2.7

A german tutorial can be found at http://www.ruhrpottserver.de/index.php/TwonkyVision_Mediaserver_2.7_einrichten

--- The .ini File: -Do not edit this file with WIN Notepad, better have a look at vi...

-what you have to edit is: a) path to your media (like /share/hdd/data/public/mymusic) b) pat for db-file (like /share/hdd/data/public/mymediaddb.db

Wibbleman - UPDATE - March 2006 - UnSlung5?.5beta & Twonky Trial V3.1. I got this running fine with Netgear MP101? as the Player. Theres a few things to watch out for, the install script seemed to do some wierd things, so i edited it for safety before i ran it. You may need to change things like TCP port (default 9000 clashed with my SlimServer) and note the Trial executable is name "twonkymedia-trial", so need to change install/init.d scripts etc. Works fine, and about 10-50x less CPU to stream media, drive the web interface or index a music collection than slimserver does...

Lance Benson - ADDITION - July 10, 2006

Here is a way to set up twonkymedia manually under unslung 5.5 or 6.8.

This assumes you are going to put your music files in a publicly shared directory on the slug, e.g., "Music". When you have telnetted into the slug, this directory can be referred to as "/public/Music".

Copy all your music files and playlists into the Music directory (folder, from the Windows viewpoint).

Download and unzip the twonkymedia files for the NSLU2, e.g to a Windows or *nix machine with access to the public data on the slug.

Copy the file "twonkymedia" to the Music directory.

Create a minimal ini file to tell twonkymedia where to find the music and its database. You can do this in the controlling PC or by telnetting into the slug and using vi. The file should be called twonkyvision-mediaserver.ini, and should contain, at a minimum, the following three lines. It should also be in the Music directory.




Telnet or ssh into the slug and create a startup script in the directory, \opt\etc\init.d. Give a name in the form S99twonky, where the "S" says that the script will be run on startup, and the two-digit number gives the order in which the script will be run. Nothing else depends on twonky, so it can have a high number. Use vi or a similar editor to create a file with contents like the following, for instance.


 # if the server is already running
 if [ -n "`pidof twonkymedia`" ]; then

   # kill it
   /bin/killall twonkymedia 2>/dev/null

   # give the server time to shut down
   sleep 2

 ( cd /public/Music/; 
  /public/Music/twonkymedia -D >twonkylog 2>&1)

This script kills any currently running twonkymedia items, and then runs twonkymedia from the /public/Music directory. This also logs any error messages to a file called twonkylog. This log can tell you if you have any problems in, for instance, your playlists.

When you shut down and restart the slug, twonkymedia should be running, its database will be created in /public/Music, and the .ini file will have been greatly expanded. You can perform the reboot by entering Do_Reboot in your telnet or ssh session. After the reboot has completed you can telnet or ssh back in, and run "ps -ef" to see that twonkymedia is running (with maybe a dozen or more threads).

To recapitulate, you can set up twonky on unslung by copying the program to the public directory which contains your music, creating a 3-line .ini file for the program in the same directory, and creating a short startup script in the /opt/etc/init.d directory. This was tested in 6.8, but should work in 5.5 as well. Other installation locations and procedures are of course possible. This is serving music wirelessly through a Netgear WGR614v6? router to a Netgear MP101?. My favorite internet radio station is www.weeniecampbell.com.

Revisions and corrections welcome.

I have found a great page that helps explain how to make TwonkyMedia? work on the NSLU2: http://howtotwonky.pbwiki.com/(approve sites)

flowoess - ADDITION - October 04, 2010 Version 6.0.23 supports the NSLU2 again. Wrote a little HowTo for the automatic installer.

Page last modified on October 04, 2010, at 05:39 PM