DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-01-18 23:33:57

Slush puppie
New member
Registered: 2007-01-17
Posts: 3

Firefly

As I'm a happy owner of a Roku SoundBridge, I would love to have a Firefly server running in the d-link to get FLAC and oggVorbis support. Is that possible? From what I understand, the itunes server in the d-link is actually mt-daapd that is the forerunner of Firefly. Am I right?

/Johan

Offline

 

#2 2007-01-21 01:31:50

cbrunnkvist
Member
From: Helsingborg, Sweden
Registered: 2007-01-20
Posts: 13

Re: Firefly

You are correct. I am also very interested in upgrading the mt-daapd included in the official firmware, mainly because the latest versions of Firefly Media Server supports streaming video files to iTunes!

Offline

 

#3 2007-02-04 02:32:16

flynn
Member
From: San Jose, CA
Registered: 2007-01-03
Posts: 25

Re: Firefly

i found the wik page that describes how to run Firefly / mt-daapd on a DSM-G600...
http://dns323.kood.org/dsmg600/howto:firefly

...but has anyone got this working on a DNS-323? should it work?

After following the instructions, I don't find any mt-daapd process running. If I run it manually, I get a seg fault:

Code:

# # mt-daapd -c /mnt/HD_a2/mt-daapd/mt-daapd.conf

Segmentation fault

Last edited by flynn (2007-02-04 02:33:44)

Offline

 

#4 2007-02-04 10:26:34

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: Firefly

To start the included mt-daap, just use the Web GUI and start the iTunes-server. It's NOT firefly but at least a mt-daap, which later became FireFly. The FireFly has not yet, AFAIKN, not been compiled for the DNS. You cannot use the binaries for the DSM as they don't have the same CPU (ARM vs PPC).

Using debian I think you should be able to compile and get FireFLy up and running rather quickly.....I think.

HTH/Apan

Last edited by Apskaft (2007-02-05 12:42:56)

Offline

 

#5 2007-02-04 16:00:04

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: Firefly

FYI: I've just managed to get the latest FireFly, mt-daapd-svn-1498.tar.gz, running on the DNS-323 in chroot'ed debian 'mode'. I cannot tell you exactly how to do it, but the following instruction can be of use for you'all.

#1 Make sure you can chroot into debian sarge as described in other posts
#2 apt-get install the packages that FireFly depends upon:
    * libsqlite0
    * libsqlite0-dev
    * libid3tag0-dev

#3 ./configure --enable-sqlite;make;make install

#4 place your modified mt-daapd.conf in /usr/local/etc/
I used runas = root in my file

#5 Add a few directories:
  mkdir /usr/local/etc
  mkdir /usr/local/var
  mkdir /usr/local/var/cache
  mkdir /usr/local/var/cache/mt-daapd


#6 start mt-daapd, try -f first to see any errors produced.


I used a freshly installed iTunes 7.0.2.16 and it worked out-of-the-box with the DNS. But; I could not get my XBMC (2.0.0) working with this version. Maybe I need to update XBMC or downgrade FireFly. However, I'm not really into iTunes so my work ends here....


Ohh...and make sure the iTunes-server included in the DNS is turned off....


HTH/Apan

Offline

 

#6 2007-02-05 10:13:35

flynn
Member
From: San Jose, CA
Registered: 2007-01-03
Posts: 25

Re: Firefly

Apskaft wrote:

To start the included mt-daap, just use the Web GUI and start the iTunes-server.

i'm not sure i understand... are you saying I should use the DNS-323's factory web GUI? or the web GUI for the mt-daapd that I copied to the DNS (it's included in a sub folder, and I haven't figured out how to access it via a web browser yet - what http address would I use?)?

Offline

 

#7 2007-02-05 11:10:42

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: Firefly

flynn wrote:

Apskaft wrote:

To start the included mt-daap, just use the Web GUI and start the iTunes-server.

i'm not sure i understand... are you saying I should use the DNS-323's factory web GUI? or the web GUI for the mt-daapd that I copied to the DNS (it's included in a sub folder, and I haven't figured out how to access it via a web browser yet - what http address would I use?)?

Sorry for not beeing precise. The DNS-323 contains, from factory, an "iTunes Server" which _is_ the mt-daapd version 0.2.3 in a D-Link flavor. This server is completely managed through the DNS-323 'factory web GUI'. Yes, it's poor, but it exists out-of-the-box.

If you want to use a more recent version of mt-daapd, i.e. FireFly, then you need to follow the instructions posted here.

I've tried to make a 'standalone' version of the lates FireFly but have issues with the database. If I get any further I'll let you know. But; for now you can at last get FireFly running in debian chroot.

edit: Database issue solved. Permission problem on /mnt fixed by using runas root instead of runas admin. However, still having issues with firefly - it doesn't appear in iTunes. Some kind of problem with announcements which is not tha case when running in debian chroot. Maybe uClibc doesn't support multicast?!?

HTH/Apan

Last edited by Apskaft (2007-02-05 17:44:12)

Offline

 

#8 2007-02-07 13:14:02

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: Firefly

Now covered in the Wiki http://dns323.kood.org/howto:firefly /Apan

Offline

 

#9 2007-02-07 18:23:13

Paul
Member
From: Landshut, Germany
Registered: 2007-01-19
Posts: 35
Website

Re: Firefly

well... a little bit offtopic...

I recompiled the ubuntu package for "ushare". ushare is a UPnP A/V Media Server... well anyway, I'm running ushare and have no problems access the files from XBMC running on my xbox..

about ushare: http://ushare.geexbox.org/
packages for debian etch on dlink dns323: http://dev.skcserver.de/dns323/etch/ush … u1_arm.deb and http://dev.skcserver.de/dns323/etch/lib … .1_arm.deb

Offline

 

#10 2007-02-09 07:57:03

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: Firefly

Hi,

I'm still struggling with FireFly, i.e. mt-daapd-svn-1498. As mentioned before I've given up using the buildsystem on the DNS and instead switched to the uClibc toolchain.

I have successfully compiled mt-daapd version 0.2.4 from the D-Link GPL directory and it's running. SVN-1498 is compiled but it doesn't work and I can't figure out how to solve it and need some assistance. The binary file starts but at startup it complains about unresolved references do 'deflate'.

I've looked into the internals of svn-1498 and since 0.2.4 plugins has been introduced. These plugins are implemented, in Un*x, using the dynamic linking loader (dlopen, dlclose, etc) and it appears as if it's this part that fails.

The missing 'deflate' function is part of the zlib-1.2.2 and in 0.2.4 this lib is linked into the binary using '-lz'. However, when building SVN-1498 zlib is not present in any of the modules. '-lz' has no effect on the mt-daapd as it's never used within that binary and '-lz' does not include 'deflate' into the plugin.

I guess that this is really a compiler/linker question with a simple answer. But; can someone please point me in the right direction.

FYI: I'll cross-post this question in the FireFly forum as well.
edit: Seems like I'll need libz.so as well. Couldn't find any references to that one using objdump, will test more tonight.

/Apan

Last edited by Apskaft (2007-02-09 10:16:27)

Offline

 

#11 2007-02-10 13:02:51

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: Firefly

I give up. Cannot get FireFly running in standalone mode. Have already spent too much time on this now.
Attached is  a build script which can be of use if anyone picks up.  The result of this will NOT run on the DNS-323.

It's not complete in any way and expects that both zlib  and libid3tag from the D-Link iTunesServer.tar.gz is compiled and installed.

When executed on the DNS it'll complain about unsresolved references to deflate (from zlib) when loading module rsc.so. If zlib files are 'forced' into mentioned plugin or if the plugins are removed, Segmentation Fault will occur....same as on the build system on he DNS...

I don't know what to do with this anymore, so....

Good luck!!

/Apan

Offline

 

#12 2007-02-10 20:43:06

mklx01
Member
Registered: 2007-01-24
Posts: 23

Re: Firefly

Thanks for trying, Aspkaft! Sounds like we need to stick with the built-in mt-daapd server for now. Here is a progress report that I posted on the Roku forum. There maybe some useful tips in here for everyone else who is trying to get the DNS-323 to work with the Roku Soundbridge.

--

Here is a quick progress report on my Soundbridge and D-Link DNS-323 setup. I was having issues connecting to the NAS. Sometimes two or more NAS entries would show up on the SB. Sometimes I could connect to one but not the other, or I would have to reboot the unit completely to get a decent connection. This problem seems to be related to the UPnP and iTunes server both identifying themselves on the network using the same name.

The other problem I had was that I couldn't edit any of the pre-configured playlists on the iTunes server. Although I was able to edit the mt-daapd configuration files (through telnet and vi), the iTunes server wouldn't pick them up and remember my settings after a reboot.

The solution I came up with is quite simple:
1. Switch off the iTunes server in the DNS-323 web interface
2. Copy etc/mt-daapd.conf and mt-daapd.playlist to /mnt/HD_a2
3. Edit mt-dappd.conf and give the iTunes server a new name
4. Change the location of the playlist in mt-daapd.conf to /mnt/HD_a2/mt-daapd.playlist
5. Add a line in the fun_plug script to start mt-daapd -c /mnt/HD_a2/mt-daapd.conf during a reboot

I can now edit the mt-daapd.playlist file with a text editor. As I said, this setup works quite well and I don't have any of the connection/reboot issues I had before.

Now I would like to add .m3u or iTunes-style playlists, but I haven't figured that out yet. The process_m3u option doesn't seem to work in this version of mt-daapd. So if anyone knows how to do this, I would like to hear about it. Thanks!

Offline

 

#13 2007-02-11 11:23:22

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: Firefly

mklx01 wrote:

Sounds like we need to stick with the built-in mt-daapd server for now.

No, not really. You can always run it in debian chroot. It's the standalone mode I've given up. Follow the instructions in the wiki and you'll have Firefly up and running....

It's just that I can't get it working with uClibc, without the debian chroot.

/Apan

Offline

 

#14 2007-02-19 23:43:24

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: Firefly

Apskaft wrote:

I give up.

I've now got FireFly running in standalone mode. Details about the process can be found in the wiki.

Attached is the file used to build FireFly, also available in the wiki.

The package does not include libraires for Ogg/Vorbis, but I guess that would be the next logical step for FireFly.

I have only tested to stream one file to iTunes.....but at least it's running with uClibc.

Please provide feedback if you are successful or have problems with it.


UPDATE The attached files contains a glitch....remove the 'exit' on line 196. Will fix it tonight...

/Apan

edit: Updated since all information is now in the wiki.

Last edited by Apskaft (2007-02-20 08:31:19)

Offline

 

#15 2007-02-20 15:15:49

eric
New member
Registered: 2007-02-20
Posts: 2

Re: Firefly

Hi I tried the binarys from the wiki page for standalone and got this:-

# export LD_LIBRARY_PATH=/mnt/HD_a2/lnx_bin/lib
# /mnt/HD_a2/lnx_bin/mt-daapd -f -c /mnt/HD_a2/lnx_bin/mt-daapd.conf
/mnt/HD_a2/lnx_bin/mt-daapd: '/mnt/HD_a2/lnx_bin/lib/libid3tag.so.0' is not an ELF file
/mnt/HD_a2/lnx_bin/mt-daapd: '/mnt/HD_a2/lnx_bin/lib/libz.so.1' is not an ELF file
/mnt/HD_a2/lnx_bin/mt-daapd: can't load library 'libz.so.1'

All the files have executable permissions any body have any idea how I can fix this ?

Regards Eric

Offline

 

#16 2007-02-20 16:33:57

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: Firefly

eric wrote:

Hi I tried the binarys from the wiki page for standalone and got this:-

# export LD_LIBRARY_PATH=/mnt/HD_a2/lnx_bin/lib
# /mnt/HD_a2/lnx_bin/mt-daapd -f -c /mnt/HD_a2/lnx_bin/mt-daapd.conf
/mnt/HD_a2/lnx_bin/mt-daapd: '/mnt/HD_a2/lnx_bin/lib/libid3tag.so.0' is not an ELF file
/mnt/HD_a2/lnx_bin/mt-daapd: '/mnt/HD_a2/lnx_bin/lib/libz.so.1' is not an ELF file
/mnt/HD_a2/lnx_bin/mt-daapd: can't load library 'libz.so.1'

All the files have executable permissions any body have any idea how I can fix this ?

Regards Eric

I'll doublecheck the file uploaded later today, but they should be exactly the same files I tested with on my machine. If you're on a linux machine, check the lib files mentioned using objdump -x to see if they are corrupted. Also, check the symlinks in the lib directory.

I'm still on 1.01FW, but that shouldn't really matter.

I'm not sure, but it might be so that busybox contains the 'file' command, and by using this command you should be able to check the files on the DNS.

Also, from your lnx_bin directory, submit a recursive ls if possible (ls -lr .).


...and...executable permissions shouldn't matter, read is more important.

/Apan

Offline

 

#17 2007-02-20 17:24:08

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: Firefly

I've now double-checked the uploaded file and it works just fine. Follow these steps and you'll be up an running in no-time:

1. Turn off original iTunesServer from D-Link from WEB GUI (IMPORTANT!!!)
2. Download http://download.dns323.info/dl/dns_323_ … pa1.tar.gz
3. Place the file in \\NAS\HDD_1 or \\NAS\Volume_1 (depends on FW version)
4. Telnet to device and execute:

Code:

# cd /mnt/HD_a2
# lnx_bin/busybox3 tar xvz -f dns_323_firefly_svn_mt-daapd-svn-1498_pa1.tar.gz
# export LD_LIBRARY_PATH=/mnt/HD_a2/lnx_bin/lib
# /mnt/HD_a2/lnx_bin/mt-daapd -f -c /mnt/HD_a2/lnx_bin/mt-daapd.conf

5. Point your browser to http://192.168.0.191:3689/index.html

That's it. Don't use winzip or even try to extract the files from windows. Tarball shall be extrated on the unit otherwise the symlinks will be corrupted.

Good luck,

/Apan
edit:Added initial bullet...turn off iTunesServer on DNS-323

Last edited by Apskaft (2007-02-20 22:17:07)

Offline

 

#18 2007-02-20 18:37:20

rawlmark
New member
Registered: 2007-02-15
Posts: 2

Re: Firefly

I can't get the last line to work. I've tried it several ways with the following results. Any ideas?

# # /mnt/HD_a2/lnx_bin/mt-daapd -f -c /mnt/HD_a2/lnx_bin/mt-daapd.conf

/mnt/HD_a2/lnx_bin/mt-daapd: can't load library 'libz.so.1'
# # mnt/HD_a2/lnx_bin/mt-daapd -f -c mnt/HD_a2/lnx_bin/mt-daapd.conf

/mnt/HD_a2/lnx_bin/sh: mnt/HD_a2/lnx_bin/mt-daapd: not found

Offline

 

#19 2007-02-20 18:54:33

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: Firefly

rawlmark wrote:

I can't get the last line to work. I've tried it several ways with the following results. Any ideas?

# # /mnt/HD_a2/lnx_bin/mt-daapd -f -c /mnt/HD_a2/lnx_bin/mt-daapd.conf

Error 1/mnt/HD_a2/lnx_bin/mt-daapd: can't load library 'libz.so.1'
# # mnt/HD_a2/lnx_bin/mt-daapd -f -c mnt/HD_a2/lnx_bin/mt-daapd.conf

Error 2/mnt/HD_a2/lnx_bin/sh: mnt/HD_a2/lnx_bin/mt-daapd: not found

(1) Looks like you've not successfully executed "export LD_LIBRARY_PATH=/mnt/HD_a2/lnx_bin/lib" before starting mt-daapd.

post the result of: echo $LD_LIBRARY_PATH

(2) Missing the leading '/' - cut-n-paste error

Note that the '#' in front of each line shall not be included when you cut-n-paste.


....and....remember to shut-down the iTunesServer before starting FireFly...
/Apan

Offline

 

#20 2007-02-20 21:03:47

rawlmark
New member
Registered: 2007-02-15
Posts: 2

Re: Firefly

Apskaft wrote:

(1) Looks like you've not successfully executed "export LD_LIBRARY_PATH=/mnt/HD_a2/lnx_bin/lib" before starting mt-daapd.

post the result of: echo $LD_LIBRARY_PATH

....and....remember to shut-down the iTunesServer before starting FireFly...
/Apan

Shutdown iTunesServer... Might want to add that one to the instructions cool

RESULTS:  /mnt/HD_a2/lnx_bin/lib

# # /mnt/HD_a2/lnx_bin/mt-daapd -f -c /mnt/HD_a2/lnx_bin/mt-daapd.conf

Firefly Version svn-1498: Starting with debuglevel 2
Starting rendezvous daemon
Starting signal handler
Error: enum_begin failed (error 1): Misc SQL Error: no such table: config
Can't get db version. New database?
Initializing database
Error: enum_begin failed (error 1): ?
Error: enum_begin failed (error 1): ?
Full reload...
Starting mp3 scan
opendir: No such file or directory
Starting playlist scan
Updating playlists
Error scanning MP3 files: No such file or directory
Scanned 0 songs in 0 seconds
Starting web server from /mnt/HD_a2/lnx_bin/admin-root on port 3689
Registering rendezvous names
Serving 0 songs.  Startup complete in 0 seconds
Got shutdown signal.
Stopping gracefully
Stopping rendezvous daemon
Callback: Memory Free
Callback: Memory Free
Callback: Memory Free
Closing database
Done!

Looks like i'm in business

Offline

 

#21 2007-02-21 06:38:16

BillD
New member
Registered: 2007-02-21
Posts: 2

Re: Firefly

Great work!

Most, but not all, things work. My issues:

FLAC does not seem (I think) to be implemented. See http://forums.fireflymediaserver.org/vi … light=flac for possible resolution. (I'm not a programmer and am happy I can get figure out how to telnet.)

I'm getting a Write error: broken pipe for particularly .mp4 (Nero AAC encoded) files, but a few too for .mp3 files. Not sure if the cause is network, DNS, or Firefly.

Offline

 

#22 2007-02-21 07:17:00

mklx01
Member
Registered: 2007-01-24
Posts: 23

Re: Firefly

Apskaft - This is friggin' awesome! Great work :-)

Everything works out of the box. In addition to switching off the iTunes server in the DNS-323 web interface, make sure you don't extract the .tar.gz to the NAS using Winzip. Otherwise, you'll get a library not found error because Winzip doesn't restore the symbolic links that are in the .tar file. This might be obvious for Linux heads, but people who use Windows (like me) might fall into this trap.

Offline

 

#23 2007-02-21 07:54:23

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: Firefly

BillD wrote:

Great work!
FLAC does not seem (I think) to be implemented.

Correct, niether flac nor ogg/vorbis are included in the tarball. I guess that's the next logical step. But, that's a yet a bunch of libs to crosscompile.

BillD wrote:

I'm getting a Write error: broken pipe for particularly .mp4 (Nero AAC encoded) files, but a few too for .mp3 files. Not sure if the cause is network, DNS, or Firefly.

The included mt-daapd.conf contains an error that *might* be related to this issue, the line starting with ssc_prog (192) should be: 

Code:

ssc_prog = /mnt/HD_a2/lnx_bin/mt-daapd-ssc.sh

Also, I think you need include things in your path for the above mentioned script to work. I.e.

Code:

export PATH=$PATH:/mnt/HD_a2/lnx_bin

rawlmark wrote:

Shutdown iTunesServer... Might want to add that one to the instructions

The wiki is now updated with this information and the instruction I wrote in this post.

/Apan

Offline

 

#24 2007-02-21 11:54:51

eric
New member
Registered: 2007-02-20
Posts: 2

Re: Firefly

Apskaft thanks this is great

My problem was that I un tarred the files before putting them onto the dns-323 thus breaking the symbolic links.

Thank you so much for your efforts and help

Eric

Offline

 

#25 2007-06-13 21:44:39

ridewithstyle
Member
Registered: 2007-05-31
Posts: 10

Re: Firefly

has anybody found a solution to get flac going so far? I haven't had much luck in one yet. All I get is gargling sound in amarok and silence in itunes so far. sad The tracks show, without tags though

greetings, rws

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB