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 2010-02-02 17:09:09

plord
Member
Registered: 2010-02-02
Posts: 17

Optware and minidlna

Hi,

I've been trying to get minidlna working on my DNS-323.

Firstly the optware ipkg (http://ipkg.nslu2-linux.org/feeds/optwa … -2_arm.ipk) just SEGV's on me :-(  So I've tried to build my own using the instructions ( http://www.nslu2-linux.org/wiki/Optware/Dns323 )

I do get further with my own build but when I start minidlna I see runtime messages such as :-

[2010/02/02 14:51:47] inotify.c:89: error: inotify_add_watch(/mnt/HD_a2/Media/Music) [Function not implemented]
[2010/02/02 14:53:06] upnphttp.c:1074: debug: sendfile error :: error no. 38 [Function not implemented]

Any ideas ?

Note that all other optware packages have worked just fine for me, so I'm very happy except for this issue.  Also I want to use minidlna since this seems to work best with my sony tv.

Thanks,

Pete

(BTW is this the best place for optware / dns-323 discussions ?  I wasn't sure)

Offline

 

#2 2010-02-02 18:11:00

oxygen
Member
Registered: 2008-03-01
Posts: 320
Website

Re: Optware and minidlna

better compile the apps you need yourself. optware wastes a lot of memory cause of its on libc.
besides this, the error you are getting is because inotify is only enabled on recent fw revisions. upgrade or if it's possible disable inotify. sendfile should work i think.

Offline

 

#3 2010-02-02 19:05:01

plord
Member
Registered: 2010-02-02
Posts: 17

Re: Optware and minidlna

oxygen wrote:

better compile the apps you need yourself. optware wastes a lot of memory cause of its on libc.
besides this, the error you are getting is because inotify is only enabled on recent fw revisions. upgrade or if it's possible disable inotify. sendfile should work i think.

You mean compile directly on the DNS-323 ?

Thanks,

Pete

Offline

 

#4 2010-02-03 22:03:38

plord
Member
Registered: 2010-02-02
Posts: 17

Re: Optware and minidlna

FYI, I've managed to (manually) build the dependencies of minidlna and minidla itself on my DNS-323.  So far its looking good :-)

I say manually because I've not attempted to make this reproducible - I've simply written some little shell scripts which builds each component and creates a funpkg file.

I've copied what I have here http://www.plord.co.uk/funplug/0.5/ but it needs work ....

Offline

 

#5 2010-02-04 14:50:06

cab
Member
Registered: 2007-11-30
Posts: 12

Re: Optware and minidlna

I have unpacked your compiled minidlna and libraries - but still missing jpeg lib:

/mnt/HD_a2 # ffp/start/minidlna.sh start
Starting /ffp/sbin/minidlna -f /ffp/etc/minidlna.conf
/ffp/sbin/minidlna: can't load library 'libjpeg.so.62'

where can this library be downloaded?

Great job - have heard that Minidlna is a great piece of software.

Offline

 

#6 2010-02-04 15:18:46

plord
Member
Registered: 2010-02-02
Posts: 17

Re: Optware and minidlna

cab wrote:

I have unpacked your compiled minidlna and libraries - but still missing jpeg lib:

/mnt/HD_a2 # ffp/start/minidlna.sh start
Starting /ffp/sbin/minidlna -f /ffp/etc/minidlna.conf
/ffp/sbin/minidlna: can't load library 'libjpeg.so.62'

where can this library be downloaded?

See http://www.inreto.de/dns323/fun-plug/0. … g-6b-1.tgz

Great job - have heard that Minidlna is a great piece of software.

Yes, it the one that seems to work best with my TV :-)

Offline

 

#7 2010-02-18 15:34:25

reschip
New member
From: Vienna
Registered: 2010-02-18
Posts: 3

Re: Optware and minidlna

plord wrote:

FYI, I've managed to (manually) build the dependencies of minidlna and minidla itself on my DNS-323.  So far its looking good :-)

I say manually because I've not attempted to make this reproducible - I've simply written some little shell scripts which builds each component and creates a funpkg file.

I've copied what I have here http://www.plord.co.uk/funplug/0.5/ but it needs work ....

Hi plord,

could you please describe me how you did that?

I tried it myself, but none of my builds runs in normal (daemon) mode on my DNS-323.

The log only says:

Code:

[2010/02/18 14:17:36] minidlna.c:709: warn: Starting MiniDLNA version 1.0.17 [SQLite 3.6.20].

and ps shows me, that minidlna is running, but nothing is happening.
Running it with the -d parameter works fine.
Your version from http://www.plord.co.uk/funplug/0.5/ runs fine with and without -d.

Did you build all the dependencies yourself, or did you use some precompiled packages and if so, which one did you use?

I would really appreciate some help, because I'm trying to add a workaround for inotify, which is not working on DNS-323. But without being able to build it, it's  pretty useless.

Last edited by reschip (2010-02-18 20:25:46)

Offline

 

#8 2010-02-19 03:08:31

reschip
New member
From: Vienna
Registered: 2010-02-18
Posts: 3

Re: Optware and minidlna

Ok. I guess I should read, before I write.

I just found your build scripts. Helped me a lot.
Thanks for sharing them!

Last edited by reschip (2010-02-19 03:08:53)

Offline

 

#9 2010-02-20 19:35:16

plord
Member
Registered: 2010-02-02
Posts: 17

Re: Optware and minidlna

Great, glad you found it (sorry for the late reply).

Getting inotify to work is also on my to-do list ... I would be very interested in any progress you make!

Pete

Offline

 

#10 2010-02-21 16:51:17

reschip
New member
From: Vienna
Registered: 2010-02-18
Posts: 3

Re: Optware and minidlna

Ok since I'm pretty new to linux, I'm more or less stumbling my way through all this stuff, but I found an interesting post about inotify from mb16 (http://dns323.kood.org/forum/viewtopic.php?id=3199). Sirmax basically did the same thing (http://dns323.kood.org/forum/viewtopic.php?id=5333).

Although it looks like a pretty "dirty" hack to me, I gave it a shot and it seems to work just fine with minidlna.
I replaced the inotify.h included in ffp with the one from sirmax (http://sites.google.com/site/sirmaxwiki … =0&d=1) and used your script to build minidlna.

Offline

 

#11 2010-02-21 18:07:56

plord
Member
Registered: 2010-02-02
Posts: 17

Re: Optware and minidlna

Great!  Many thanks for digging this up.

I've rebuilt my package with this addition - I added the mknod/chmod into the startup script (instead of using a binary to do that - I couldn't find the source).

A quick test adding one file and then removing it worked great :-)

Offline

 

#12 2010-04-01 06:32:19

timezlicer
Member
Registered: 2008-09-02
Posts: 51
Website

Re: Optware and minidlna

you can simply

Code:

export LD_LIBRARY_PATH=/lib:/opt/lib:

this will load the firmware's libc and other lib (where available) instead of optware's libs

oxygen wrote:

better compile the apps you need yourself. optware wastes a lot of memory cause of its on libc.
besides this, the error you are getting is because inotify is only enabled on recent fw revisions. upgrade or if it's possible disable inotify. sendfile should work i think.

Offline

 

#13 2010-04-09 16:14:53

wolfiecz
New member
Registered: 2010-04-09
Posts: 1

Re: Optware and minidlna

Guys, I would like to ask you for help.

As original AV uPnP AV media server did not show any video on my TV P42G20E, I installed ffp as described here http://dns323.kood.org/howto:ffp

and Twokny 5.1 as described here http://dns323.kood.org/howto:twonkyupnpserver

But I am not satisfied with Twonky (in FOLDER view I need to have sorted the files according the name, not randomly sad ) and would like to try minidlna.

I am familiar with LINUX at very low level, i.e. I was able to follow the instructions above and on a FRESH DNS323 install telnet and Twonky, but I do not know how to uninstall or disable it now so that I could install minidlna.

And one more thing, When accessing by telnet, after login, dns323 stops replying, as seen on attached picture.


Any help would be much appreciated.


Best Regards




This is the content of the 2 files in the root dir (starttwonky.sh and fun_plug)
_____________________________________________________________
starttwonky.sh:
#!/bin/sh
route add -net 224.0.0.0 netmask 240.0.0.0 dev egiga0

cd /mnt/HD_a2/twonky
/mnt/HD_a2/twonky/twonkymedia &

______________________________________________________________

fun_plug:

#!/bin/sh

# switch to safe working directory on ramdisk
cd /

# write a log, in case sth goes wrong
FFP_LOG=/mnt/HD_a2/ffp.log
#FFP_LOG=/dev/null
exec >>$FFP_LOG 2>&1

# real path to ffp
FFP_PATH=/mnt/HD_a2/ffp

# where to search for the install tarball
FFP_TARBALL=/mnt/HD_a2/fun_plug.tgz

# setup script (used for ffp on USB disk)
FFP_SETUP_SCRIPT=/mnt/HD_a2/.bootstrap/setup.sh

# rc file path
FFP_RC=/ffp/etc/rc


echo "**** fun_plug script for DNS-323 (2008-08-11 tp@fonz.de) ****"
date


# check for setup script. an example use for this is to load USB
# kernel modules and mount a USB storage device. The script is
# sourced, that means you can change variables, e.g. FFP_PATH to point
# to the USB device.
if [ -x $FFP_SETUP_SCRIPT ]; then
    echo "* Running $FFP_SETUP_SCRIPT ..."
    . $FFP_SETUP_SCRIPT
fi

# create /ffp link
echo "ln -snf $FFP_PATH /ffp"
ln -snf $FFP_PATH /ffp

# install tarball
if [ -r $FFP_TARBALL ]; then
    echo "* Installing $FFP_TARBALL ..."
    mkdir -p $FFP_PATH && tar xzf $FFP_TARBALL -C $FFP_PATH && /ffp/bin/tar xzf $FFP_TARBALL -C $FFP_PATH
    if [ $? -eq 0 ]; then
        echo "* OK"
    fi
    rm $FFP_TARBALL
fi

# suid busybox
if [ -x /ffp/bin/busybox ]; then
    chown root.root /ffp/bin/busybox
    chmod 0755 /ffp/bin/busybox
    chmod u+s /ffp/bin/busybox
fi

# run fun_plug.init, if present
if [ -x /ffp/etc/fun_plug.init ]; then
    echo "* Running /ffp/etc/fun_plug.init ..."
    /ffp/etc/fun_plug.init
fi

# run fun_plug.local, if present
if [ -x /ffp/etc/fun_plug.local ]; then
    echo "* Running /ffp/etc/fun_plug.local ..."
    /ffp/etc/fun_plug.local
fi

# run commands
if [ -x $FFP_RC ]; then
    echo "* Running $FFP_RC ..."
    $FFP_RC
    echo "*  OK"
else
    echo "$FFP_RC: Not found or not executable"
fi


/mnt/HD_a2/starttwonky.sh
_____________________________________________________________


Attachments:
Attachment Icon telnet.jpg, Size: 49,204 bytes, Downloads: 283

Offline

 

#14 2010-06-01 11:53:16

id084895
New member
Registered: 2010-06-01
Posts: 1

Re: Optware and minidlna

Hi,

I've been a longtime reader of this forum and already found a lot of information which has always helped me on the CH3SNAS, but this time I'm stuck with the minidlna sad

I've copied (cp -a) all the necessary files from plord but when trying to start the minidlna server I get the following error:

/ffp/lib/libexif.so.12' is not an ELF file
can't load library 'libexif.so.12

I googled for this error and apparently this is what you get when the file is corrupt, I re-downloaded but still no luck.

Could somebody help me out here ?

Thanks,
David

Offline

 

#15 2010-07-07 23:20:54

chrica
New member
Registered: 2010-07-07
Posts: 1

Re: Optware and minidlna

Hi,

I new in this forum, but i'd like to give an answer : on plord link  "http://www.plord.co.uk/funplug/0.5/" the package libexif is ready to install.
Others packages are ready and had to be installed to start minidlna.

With my DNS-323+Fun-Plug 0.5, MiniDLNA is fully functionnal : MP3 / JPG / MPG on my Sony TV but i noticed some error messages in minidlna.log :
- "inotify.c:189: warn: WARNING: Could not read inotify max_user_watches!  Hopefully it is enough to cover 655 current directories plus any new ones added."
- "sql.c:85: error: prepare failed: near "s": syntax error"

Any ideas ?

Christophe

Offline

 

#16 2010-07-22 12:43:57

hmmyip
New member
Registered: 2010-07-22
Posts: 4

Re: Optware and minidlna

Hello!
I am also new to this, and having just got a new sony tv \i am trying desperately to find a media server that works with it.

I have a zyxel nsa210 with built in media server, but tv is not recognising all content, SO I have installed ffp and minidlna.

All seems to be working except that in the log I have 'Inappropriate ioctl for device' when reading content from a folder, and therefore the TV show no content...... sad

What am I doing wrong?

Any help greatly appreciated.

Cheers

Jonny

Offline

 

#17 2010-07-22 20:14:04

hmmyip
New member
Registered: 2010-07-22
Posts: 4

Re: Optware and minidlna

update:

minidlna is working fine, it seems that minidlna can only recognise ext2 file system, and the main hdd is formated with jbod.

I have managed to get round this by adding a symbolic link to the hdd photo 'share' in the ffp folder and hey presto it works!

BUT, I have done the same with the video folder and I can now see the video folder structure, but cannot get to see any vids.  I have a variety of content on there including some mpeg2 stuff, but the TV is just reporting the folder as empty......... although a computer shows the content, from the shared library.

Still stumped, TV is a brand new Sony Bravia KDL-32ex403, which I have already flashed to the latest firmware.

Any ideas?

Offline

 

#18 2010-07-22 22:35:32

hmmyip
New member
Registered: 2010-07-22
Posts: 4

Re: Optware and minidlna

Ok kind of noob question,

how do i compile from source?  I have make installed and the source files but when I run make on source, I get errors that dependencies are not installed or missing development headers?

I have found that I need to alter metadata.c to _EU as it has _NA by default, unless someone can confirm that this was compiled like that already? (plord, please.......?)

cheers

Offline

 

#19 2010-07-23 01:22:33

hmmyip
New member
Registered: 2010-07-22
Posts: 4

Re: Optware and minidlna

ok found your build script!

(thank you plord)

cant use it though get error, MyMain not recognised.......

so doing stages from script bit by bit on an extracted source copied to ffp/minidlna folder

make runs ok, just the next bit that doesnt,

getting there, any help still appreciated!!!!!!!

cheers

Jonny

Offline

 

#20 2010-09-07 00:01:56

pidginbil
New member
Registered: 2010-09-06
Posts: 2

Re: Optware and minidlna

id084895 wrote:

I've copied (cp -a) all the necessary files from plord but when trying to start the minidlna server I get the following error:

/ffp/lib/libexif.so.12' is not an ELF file
can't load library 'libexif.so.12

I'm getting the same error but am not seeing a fix listed in this thread. Any ideas?

BILL

Offline

 

#21 2010-09-07 00:16:00

plord
Member
Registered: 2010-02-02
Posts: 17

Re: Optware and minidlna

I've not touched this build for a while ... did you install libexif-0.6.19-1.tgz ?

Offline

 

#22 2010-09-26 16:53:05

jotenakis
Member
Registered: 2010-05-02
Posts: 25

Re: Optware and minidlna

a new version of Minidlna (0.18) is available. Does someone tried to compile it for funplug ?

Offline

 

#23 2010-09-26 21:40:21

plord
Member
Registered: 2010-02-02
Posts: 17

Re: Optware and minidlna

I just built the latest cvs - see http://plord.co.uk/funplug/0.5/minidlna … 0926-2.tgz

Its still indexing, but seems to work.

Offline

 

#24 2010-09-27 18:59:21

theykilledkenny
New member
Registered: 2010-09-27
Posts: 1

Re: Optware and minidlna

->hmmyip: Hi, please cant you write me how you solved the problem, when DLNA server running (on NSA210), is visible on TV (samsung LE40C650), but the folder is empty. In minidlna log in return me 'Inappropriate ioctl for device' in shared folders.

Offline

 

#25 2010-09-29 22:40:58

jotenakis
Member
Registered: 2010-05-02
Posts: 25

Re: Optware and minidlna

Thanks a lot plord, indeed it looks good.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB