view · edit · print · history

(redirected from Unslung.Mt-daapd)

Note that mt-daapd has been rebranded Firefly Media Server (although it is still available as mt-daapd in the ipkg feed). Additional NSLU2 specific install / configuration information for Firefly is available on the project web site http://wiki.fireflymediaserver.org/NSLU2_Installation - richdunlop

The package mt-daapd is an iTunes server for your NSLU2. Running it enables you to keep all your music on the drive connected to the NSLU2 and listen to it simply by opening iTunes on any Mac or PC in the same network. No need to map a drive.

Mt-daapd depends on the separate packages libid3tag and zlib. Don't worry, just follow the steps below, and they will automatically be installed by ipkg. Just remember to always start mt-daapd with the start script '/opt/etc/init.d/S60mt-daapd' so that it actually finds zlib. Running '/opt/sbin/mt-daapd' manually is likely to give you an error message.

Note: as of package mt-daapd_0.2.1.1-r2_armeb.ipk running on openslug-2.6, files are located in different places, please check your current version for actual location (ilg).

End user Howto

  1. Check that your setup meets all IpkgRequirements.
  2. Telnet into your NSLU2 and run 'ipkg install mt-daapd'.
  3. From your workstation connect to the default network share 'DISK 1' on your NSLU2. Go into the folder "public". You might know that this relates to the folder /share/hdd/data/public.
  4. In "public" create a new folder called 'mp3'.
  5. Put music in the new folder - let's start with just a few songs or albums. Watch out that all songs have proper Id3 tags: Title, Artist, Album, Year and Genre.
  6. Run 'chmod o+r -R /share/hdd/data/public/mp3' to make sure the server has permissions to read your music files.
  7. Run '/opt/etc/init.d/S60mt-daapd' to re-start the server.
  8. Open your iTunes. In the Source panel (left hand side) between 'Music Store' and '90's Music' you should find a new blue entry titled mt-daapd. Click it and see if all your music is available. Click on the eye / 'Browse' button to select music by Genre, Artist and/or Album.

If this is failing, please scroll down to the trouble shooting section.

To add more music, simply repeat the steps 5 to 8.

Advanced things

Most users will be happy putting music in the folder and listening to it via their iTunes. If you want to play around with mt-daapd a bit more, have a look at the following pointers:

  1. Connect to the admin web pages on port 3689 (example: When prompted enter any user name and the password mt-daapd. Have a look around. Give feedback to the author.
  2. Explore the configuration file and playlist file for more things to play around with. You might want to store your mp3s somewhere else - so move the folder and change the option mp3_dir ... you get the idea. Also, you can rename the server from 'mt-daapd' to a more funky name, or enable the automated rescanning of the music folder, so that new songs get added automatically (if their permission is correct).

Note: If you want to use the Web Interface to modify the configuration you need to set permission. To do so (in a telnet session): "# chmod 447 /opt/etc/mt-daapd/mt-daapd.conf" and to restart mt-daapd "# /opt/etc/init.d/S60mt-daapd"

Files overview:

  • /opt/sbin/mt-daapd - the executable
  • /opt/share/mt-daapd/admin-root/* - several files for the admin web interface
  • /opt/etc/init.d/S60mt-daapd - script that starts the executable during a boot
  • /opt/etc/mt-daapd/mt-daapd.conf - configuration file
  • /opt/etc/mt-daapd/mt-daapd.playlist - playlist file
  • /opt/var/mt-daapd - an empty folder. here mt-daapd will put its database file 'songs.gdb'


An upgrade might be required if a newer version of mt-daapd is released. Also, as part of upgrading to a newer version of Unslung, the ipkg might lose the information about which vrsion of mt-daapd was previously installed. As a consequence, you may be forced to to install with the -force-overwrite option.

  • make a backup copy of your /opt/etc/mt-daapd.conf and mt-daapd.playlist
  • run ipkg install -force-overwrite mt-daapd
  • re-apply the changes to the configuration file ...


A good start to troubleshoot the mt-daapd is to edit /opt/etc/mt-daapd/mt-daapd.conf and enable the log file option. Remove the leading # from the line 'logfile /var/log/mt-daapd.log' and save + exit. Now run the start script again. Check the log file for anything obvious.

Sometimes the default log output does not reveal enough information. You can add another command line parameter to the start of mt-daapd to enable more debug information: -dn where n is between 0 and 9. A good value to start with is -d2. You can add this parameter to the start script '/opt/etc/init.d/S60mt-daapd' so that mt-daapd will always print a little bit more information when things go wrong. You should use extreme values such as '-d9' only when you have a small folder with a few songs, otherwise the log file will be huge and it will not be easy to locate meaningful information.

You might get this error in the log '/var/log/mt-daapd.log': Error scanning Mp3 files: Permission denied. - this issue is easy to resolve. Run the command 'chmod o+r -R /share/hdd/data/public/mp3'. This will make sure the mt-daapd has read permissions on the mp3 folder and everything within.

The log file may contain no errors, but report that it has Scanned 0 songs in 1 seconds, this is also probably due to the read permission problem mentioned above.

If the log file looks fine but you still don't see the mt-daapd shared library in your iTunes, then maybe your personal firewall is blocking some required traffic. At some point during the initial communication between mt-daapd server and the iTunes client, those two seem to swap roles: iTunes becomes the server, and mt-daapd is contacting it via UDP on port 5353. So check your firewall and allow iTunes to get incoming traffic via UDP from your NSLU2 on this port.

If you don't see any songs in iTunes from your NSLU2, check the "run as" setting in the mt-daapd.conf file, you may need to change it to a user that has permissions to access your MP3s. What works well is if you always run the chmod setting as above ... you might want to even put that in your mt-daapd startup script.

You might want to play with the command line parameters of mt-daapd. However, running the binary manually from the command line is likely to give you the following error message:
mt-daapd: error while loading shared libraries: libz.so: cannot open shared object file: No such file or directory
This is because the environment variable 'LD_LIBRARY_PATH' is not set. Simply use the start script '/opt/etc/init.d/S60mt-daapd' and you will resolve the issue. Alternatively you can set the variable in your session by running 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/lib' - this setting will need to be re-set after each login.

Some users experience missing songs in mt-daapd. Running it with the command line parameter '-d2' (for more debug output) revealed the error Bad mp3 header in xxx.mpr: bad layer_index. This was a bug in an earlier version of mt-daapd, and should not happen with the current version from ipkg. If you spot this issue in your log file, try updating to the current version of mt-daapd. A "ipkg update" and "ipkg install mt-daapd" should do it. If you want to be more "bleeding-edge", you can also try installing nightly snapshots from http://nightlies.mt-daapd.org and please report back into the author any issues.

Pinnacle Soundbridge - beta version of mt-daapd

Pinnacle distributes the Roku Soundsbridge throughout parts of Europe. Their versions are slightly cheaper, but dont include daap protocol due to not having a license from Apfel. Hence you need to use the roku protocol which is NOT in the stable 0.2.x build. Thus you need a recent beta, but the web download link may well point to a so new version that the libs aint available for the unslung in time. And the standard feeds dont have the beta.

As of 25-Jul-2009 the instruction below don't work as http://ipkg.fireflymediaserver.org/armeb doesn't exist. The following works (after much blood sweat and tears!). Everything as root.

# wget http://nightlies.fireflymediaserver.org/nightlies/svn-1586/mt-daapd_svn-1586-1_armeb.ipk
# ipkg install mt-daapd_svn-1586-1_armeb.ipk
# chown guest /opt/etc/mt-daapd/

The last step is needed so mt-daapd can write it's songs database. There's probably a better way to do this (e.g. put the songs.db in a public folder by changing the db_parms parameter described below).

Now edit the config file: # nano -w /opt/etc/mt-daapd/mt-daapd.conf or whatever editor you prefer.

And add the following line:

db_parms = /opt/etc/mt-daapd/

This beta mt-daapd has quite some improvements over the stable, like its way faster indexing of large music collections (factor 10 observed easily) and certain transcoding options for ogg, flac etc. which may make it worthwhile for non Pinnacle users as well.

(not working at 25-06-2009) Nasty thing, but theres an easy way to install the newest working beta version for NSLU - I took me a while to find this:

  1. echo "src firefly http://ipkg.fireflymediaserver.org/armeb" > /etc/ipkg/firefly.conf
  2. ipkg update
  3. ipkg install mt-daapd

Why Mp3's Won't Play

Before v0.2.4, mt-daapd was unable to play MP3s with ID3v2 Tags, they will be detected by iTunes but it will not play with mt-daapd. More information on this can be found here http://wiki.mt-daapd.org/wiki/Transcoding_HOWTO. If you cannot or don't want to upgrade to a newer version of mt-daapd, simply remove the ID3v2 tags, as described in the howto.

Help & Support

For additional help with installation and configuration issues, please visit the project web site. Further documentation and a forum are available to aid with set-up and usage.

Page last modified on July 25, 2009, at 01:02 AM