Difference between revisions of "Install mt-daapd"

From WikiDLXTV
Jump to: navigation, search
Line 5: Line 5:
  
  
== 1. Before you start ==
+
== Before you start ==
  
  
Line 13: Line 13:
 
* you (kinda) know what telnet/ssh is and how to use it
 
* you (kinda) know what telnet/ssh is and how to use it
  
== 2. Downloading optware ==
+
== Downloading optware ==
  
 
In order to get the Mt-daapd server running on your wdtv, you first need to have optware installed.
 
In order to get the Mt-daapd server running on your wdtv, you first need to have optware installed.
Line 24: Line 24:
 
''For more details about optware, see b-rads tutorial [http://b-rad.cc/optware-for-wdtv/ here]''
 
''For more details about optware, see b-rads tutorial [http://b-rad.cc/optware-for-wdtv/ here]''
  
== 3. Installing mt-daapd ==
+
== Installing mt-daapd ==
 
* connect to your wdtv via telnet/ssh.  
 
* 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''
 
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''
Line 46: Line 46:
 
#</pre>
 
#</pre>
 
* First we'll do an update by giving this command :
 
* First we'll do an update by giving this command :
<pre>ipkg update</pre>.
+
<pre># ipkg update</pre>.
 
* Now install mt-daapd with :
 
* Now install mt-daapd with :
<pre>ipkg install mt-daapd</pre>
+
<pre># ipkg install mt-daapd</pre>
 
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.
 
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.  
 
* 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.  
Line 78: Line 78:
 
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 !
 
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 !
  
 +
* give the server permission to read your music files by :
  
'''REST TO FOLLOW SOON'''
+
<pre># chmod o+r -R /path/to/your/mp3_dir</pre>
 +
 
 +
* now restart the server with :
 +
 
 +
<pre># /opt/etc/init.d/S60mt-daapd restart</pre>
 +
 
 +
Now it's time to open your iTunes. In the Source panel (left hand side) you should find a new blue entry titled 'NSLU2 Music' (the servername as specified in your config file). Click it and see if your music is available.
 +
 
 +
 
 +
== Start server ==
 +
Every time your wdtv has been disconnected from power and you want the mt-daapd server to start, you have two options to start it :
 +
 
 +
* Manually
 +
 
 +
<pre># /opt/etc/init.d/S60mt-daapd</pre>
 +
 
 +
* Automatically
 +
Add the following line to the S00custom-options file :
 +
 
 +
<pre>echo '/opt/etc/init.d/S60mt-daapd start' >> /tmp/init.d/S99post-init</pre>
 +
 
 +
and save the S00custom-options file of course!
 +
 
 +
 
 +
 
 +
== Connect to mt-daapd server ==
 +
Connect to the admin web pages on port 3689 (example: http://192.168.1.77:3689). When prompted enter any user name and the password mt-daapd.
 +
 
 +
 
 +
== Troubleshooting ==
 +
 
 +
* In case you don't see the server pop up in iTunes, several things might be wrong. A good thing to start with is checking out the logfile, by :
 +
 
 +
<pre># cat /var/log/mt-daapd.log</pre>
 +
 
 +
If it shows something like it did with me:
 +
 
 +
<pre>2011-04-03 10:28:27: Starting rendezvous daemon
 +
2011-04-03 10:28:27: Error in drop_privs: Success
 +
2011-04-03 10:28:27: Aborting</pre>
 +
 
 +
then my solution was simple. I just had to give the following command :
 +
 
 +
<pre># adduser guest</pre>
 +
 
 +
and it popped up immediately in iTunes.
 +
 
 +
* More troubleshooting tips can be found [http://www.nslu2-linux.org/wiki/Optware/Mt-daapd?from=Unslung.Mt-daapd here] in the troubleshooting section.

Revision as of 08:06, 25 April 2011

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.



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

Downloading optware

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

  • first download opt.bin-02.zip 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

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 :
/opt/etc/mt-daapd/mt-daapd.conf

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 !

  • give the server permission to read your music files by :
# chmod o+r -R /path/to/your/mp3_dir
  • now restart the server with :
# /opt/etc/init.d/S60mt-daapd restart

Now it's time to open your iTunes. In the Source panel (left hand side) you should find a new blue entry titled 'NSLU2 Music' (the servername as specified in your config file). Click it and see if your music is available.


Start server

Every time your wdtv has been disconnected from power and you want the mt-daapd server to start, you have two options to start it :

  • Manually
# /opt/etc/init.d/S60mt-daapd
  • Automatically

Add the following line to the S00custom-options file :

echo '/opt/etc/init.d/S60mt-daapd start' >> /tmp/init.d/S99post-init

and save the S00custom-options file of course!


Connect to mt-daapd server

Connect to the admin web pages on port 3689 (example: http://192.168.1.77:3689). When prompted enter any user name and the password mt-daapd.


Troubleshooting

  • In case you don't see the server pop up in iTunes, several things might be wrong. A good thing to start with is checking out the logfile, by :
# cat /var/log/mt-daapd.log

If it shows something like it did with me:

2011-04-03 10:28:27: Starting rendezvous daemon
2011-04-03 10:28:27: Error in drop_privs: Success
2011-04-03 10:28:27: Aborting

then my solution was simple. I just had to give the following command :

# adduser guest

and it popped up immediately in iTunes.

  • More troubleshooting tips can be found here in the troubleshooting section.