Install mt-daapd

From WikiDLXTV
Revision as of 10:19, 20 April 2011 by Alicia (Talk | contribs)

Jump to: navigation, search

mt-daapd is a multi-threaded DAAP server for Linux and other POSIX type systems. It allows a Linux box (like the WDTV gen1) to share audio files with iTunes users.

1. Before you start

Make sure that :

  • you have a WDTV gen1 that has WDLXTV installed
  • your WDTV gen1 is connected to your network (and has been assigned an IP address)
  • you (kinda) know what telnet/ssh is and how to use it

2. Downloading optware

In order to get the Mt-daapd server running on your wdtv, you first need to have optware installed. So :

  • first download from b-rad
  • extract the opt.bin from the zip file and place it in the root of your boot device
  • cold boot the wdtv (so completely disconnect from power and reconnect) with boot device (that contains opt.bin) connected

For more details about optware, see b-rads tutorial here

3. Installing mt-daapd

  • connect to your wdtv via telnet/ssh.

You need the wdtv's IP address for this of course, so (1) check your router or (2) check the wdtv menu : settings, system, about

For more information about telnet/remote access, see : Telnet and ssh remote connections

Once you know the IP adress of your wdtv, connect to it with Telnet, Putty or another program. You'll get a screen like this :

wdtv login:

enter 'root' (without the quotes) and if asked for a password, just leave that empty and press enter.

Now you're connected to your wdtv and you should see something like this :

BusyBox v1.10.0 (2009-02-15 05:09:42 CST) built-in shell (msh)
Enter 'help' for a list of built-in commands.

  • First we'll do an update by giving this command :
ipkg update
  • Now install mt-daapd with :
ipkg install mt-daapd

The system will give some info back. Wait till you get the command prompt again. Don't pay too much attention to any error message that you might get. We'll get to that later.

  • Just to test things, create a folder somewhere and copy 1 of your mp3's to it ( 1 mp3 will make scanning the folder go really fast). I used this folder just to test if everything works OK. When you have things working the way you want it, you can remove the folder and point mt-daapd to the right location where you keep all your music.
  • You now have to edit the configuration file of mt-daapd. It's located overhere :

I used an FTP program to copy it to my desktop, edited it, saved it and then copied it back to it's original location. If you know how vi or nano works, that's much faster probably.

My edited mt-daapd.conf now looks like this (just for reference):

web_root	/opt/share/mt-daapd/admin-root
port		3689
admin_pw	mt-daapd
db_dir		/opt/var/mt-daapd
mp3_dir		/tmp/media/usb/USB1/4687-4AC5/mp3
servername	NSLU2 Music
runas	guest
playlist	/opt/etc/mt-daapd/mt-daapd.playlist
extensions .mp3,.m4a,.m4p
logfile /var/log/mt-daapd.log
rescan_interval 7200
always_scan 0

As you can see, it's much shorter than the original file. I removed all the commented lines (the ones that start with #) to keep the file nice and short.

This is an important line in the file :

mp3_dir		/tmp/media/usb/USB1/4687-4AC5/mp3

It points to the place where you keep your music. As you can see above, I created a testfolder called 'mp3' in the root of my usb stick. Change it so it points to your location. Always make sure you save your changes !