Streaming Media to OSX from an Nslu2 with OpenWRT and Twonkyvision:
Part I: Installing OpenWRT

This post will be in English since i hope that it might attract the interest of an international geeky audience.

A while ago I set up a file server on the nslu2 with a full debian installation (and I wrote about it here and here). When I started it up recently, the slug crashed.

I didn’t want to get into repairing this installation and decided to do a complete re-install, but with an embeded OS this time. My favourite candidate is OpenWRT, which already runs rock solidly on my Linksys.

The goal:
To stream media from the Nslu2 to my Macbook.

The Framework:
I lived with a samba-share based setup for a while, but I was not satisfied. I couldn’t play the movies over the LAN without them stuttering, and copying them on the local hard disk before watching is unelegant. After some research I believe that upnp is a smooth solution.

The questions:
Server-side
1) Which OS has the smallest footprint on the slug?
2) Is there a upnp-Server (Twonkyvision or a free one) that runs on that OS?
3) How do I Install all that?

Client-side
4) Which upnp-Client can I use on a Macbook Pro (OS X, PPC)?

The answers:
1) Probably OpenWRT
2) Twonkyvision should run, here is a version for Linux on an ARM processor in big endian mode (fits OpenWRT) using uclibc (as OpenWRT does).

Installation of upslug2 on OS X:
Getting upslug2 up was a hassle. Instructions are here but the process didn’t work as easily for me as it is described.

Installation of upslug2 requires the installation of MacPorts, whith itself depends on X11 and the XcodeTools, see here. Firstly, I had to change to the Administrator’s account of my Mac, doing it from the user account, which has no administrative privileges, somehow didn’t work. After the installation of the macports binary, whith supposedly sets everything up, I needed to set the variables in a terminal: export PATH=/opt/local/bin:/opt/local/sbin:$PATH.

Syncing (port sync) and installing the necessary library libcap (sudo port install libpcap) worked, but I had do copy/rename the new library manually: sudo cp /opt/local/lib/libpcap.1.0.0.dylib /opt/local/lib/libpcap.0.dylib.

Installing upslug2 went fine (here are the guidelines), but running it required an additional parameter for it to find the network: sudo upslug2 -d en0.

All this took me quite some time to figure out and I wish I had a step-by-step howto that would have spared me all the googling.

Flashing OpenWRT onto the slug
I got the latest version from www.slug-firmware.net (Kamikaze 7.09) and upslug2′d it:
sudo /opt/local/bin/upslug2 -d en0 --image="/Users/MyUsername/Desktop/openwrt-kamikaze-7/openwrt-kamikaze-7.09-nslu2.bin"

Typing http://192.168.1.149/ in the browser’s address line logged me into the webinterface :-). OpenWRT on Nslu2 is up and running.

One Response to “Streaming Media to OSX from an Nslu2 with OpenWRT and Twonkyvision:
Part I: Installing OpenWRT”

  1. Alex Says:

    Just wondering: SMB is probably the worst way to share media files, especially in a linux-mac environment. Although I have to admit I am using it myself for the same purpose and it runs fine. I use a Popcornhour-box and a modified xbox 1 to stream movies from my NAS. (Synology cube). On the NAS I have several SMB Shares which I access with the mentioned devices. It even works fine with *.mkv hd-movies. No stuttering at all. But is there no better way for the shares than Samba?

Leave a Reply