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 2011-06-24 00:06:06

Gwargl
Member
Registered: 2011-06-23
Posts: 7

inotify

Hi,

Does inotify is supported on DNS-320 ? inotify_add_watch doesn't work and i don't understand why.


I have installed fun_plug 0.5 and  inotify-dev ( http://sites.google.com/site/sirmaxwiki/ ).
/ffp/share/inotify/inotify-test give me an error  wd=-1  Inappropriate ioctl for device. even after a compilation.

Of course, i've got the same mistake using minidlna. I have even with  the beta firmware 2.1. Any idea ?
Thanks.

root@dlink-9F8A79:/mnt/HD/HD_a2/ffp/share/inotify# uname -a
Linux dlink-9F8A79 2.6.22.18 #22 Tue May 10 16:17:51 CST 2011 armv5tejl GNU/Linux

root@dlink-9F8A79:/mnt/HD/HD_a2/ffp/share/inotify# ls -ltr /dev/inotify
crw-rw-rw- 1 root root 10, 63 Jun 23 20:46 /dev/inotify

root@dlink-9F8A79:/mnt/HD/HD_a2/ffp/share/inotify#  cc -Wall inotify-test.c -o inotify-test
inotify-test.c: In function 'check_inotify_events':
inotify-test.c:12: warning: implicit declaration of function 'read'
inotify-test.c: In function 'main':
inotify-test.c:96: warning: implicit declaration of function 'unlink'
inotify-test.c:104: warning: implicit declaration of function 'rmdir'
inotify-test.c:110: warning: control reaches end of non-void function
root@dlink-9F8A79:/mnt/HD/HD_a2/ffp/share/inotify# ./inotify-test
inotify_init(): OK
inotify_add_watch(): .failed: /tmp/inotify-test/0 wd=-1 Inappropriate ioctl for device
root@dlink-9F8A79:/mnt/HD/HD_a2/ffp/share/inotify#

Offline

 

#2 2011-06-27 20:25:28

Gwargl
Member
Registered: 2011-06-23
Posts: 7

Re: inotify

The problem came from inotify.h which doesn't not work with DNS-320 (original or inotify-dev).

I found a solution :

i grab The GPL source code of firmware 1.0 from DLINK ( ftp://ftp.dlink.de/dns/DNS-320/driver_s … e_revA.tgz) .  I have  replaced /ffp/include/sys/inotify.h with inotify-nosys.h found  in inotify-tools-3.13\libinotifytools\src\inotifytools\.

After compilation,  inotify-test.c works and minidlna too. I also switch back to FW 1.0 but i don't know if it's important.

Last edited by Gwargl (2011-09-30 12:54:42)

Offline

 

#3 2011-08-06 21:29:12

RayDNS320
Member
Registered: 2011-08-06
Posts: 6

Re: inotify

Hi Gwargl,

thanks for your solution, I have got the same problem, namely getting the inotify error on the DNS-320 using miniDLNA.

I replaced the inotify-nosys.h and was able to successfully run the test scripts after compiling smile
Unfortunately, I still get the error at miniDLNA startup. Is there something I missed or you didn't mention? Like creating a symbolic link or modifying some config file?

Any help appreciated, thank you very much!

Offline

 

#4 2011-08-28 23:11:31

Gwargl
Member
Registered: 2011-06-23
Posts: 7

Re: inotify

Hi,

Have you an inotify device ?

root@dlink-9F8A79:/mnt/HD/HD_a2/ffp/share/inotify# ls -ltr /dev/inotify
crw-rw-rw- 1 root root 10, 63 Jun 23 20:46 /dev/inotify

you can try to create it manually : mknod /dev/inotify c 10 63

or install inotify-dev from sirmaxwiki and after reinstall inotify-nosys.h.

Offline

 

#5 2011-09-24 12:04:17

RayDNS320
Member
Registered: 2011-08-06
Posts: 6

Re: inotify

Hi again Gwargl!

Thanks a lot for your reply smile

Yes, I got the device just as you posted.

root@DNS-320:/mnt/HD/HD_a2/ffp/home/root# ls -ltr /dev/inotify
crw-rw-rw- 1 root root 10, 63 Sep 24 07:36 /dev/inotify

I also already installed the inotify-dev package from sirmaxwiki using funpkg and afterwards applied the nosys.h. The included tests work fine, even the inotify_add_watch function, but not when miniDLNA calls them. ( inotify.c:89: error: inotify_add_watch). Maybe I have some mixup with different installations of inotify?!

Maybe we could compare which miniDLNA and its dependencies you use. I got mine from
http://numsys.eu/divers/minidlna-cvs-fr … 23-compil/
and the dependencies from there as well.
I also use plord's or inreto's site for fun-packages regularly.
Which sites or sources do you use for miniDLNA?

Thank you very much for your help

root@DNS-320:/mnt/HD/HD_a2/ffp/pkg/other# ls -al
total 11260
drwxr-xr-x 4 root root    4096 Sep 22 20:39 .
drwxr-xr-x 6 root root    4096 Jul 19 22:02 ..
-rw-r--r-- 1 root root 2169595 Jul 19 21:48 ffmpeg-SVN-r21842-1.tgz
-rw-r--r-- 1 root root 1257794 Aug  6 21:00 flac-1.2.1-1.tgz
-rw-r--r-- 1 root root   53961 Jul 19 22:59 htop-0.9-1.tgz
-rw-r--r-- 1 root root    8093 Jul 18 20:49 inotify-dev-0.1-1.tgz
-rw-r--r-- 1 root root  291215 Jul 19 21:49 libexif-0.6.19-1.tgz
-rw-r--r-- 1 root root   63266 Jul 19 21:50 libid3tag-0.15.1b-1.tgz
-rw-r--r-- 1 root root  216983 Jul 19 21:50 libjpeg-6b-1.tgz
-rw-r--r-- 1 root root   75562 Jul 19 21:50 libogg-1.1.4-1.tgz
-rw-r--r-- 1 root root  306946 Jul 19 21:50 libpng-1.2.29-1.tgz
-rw-r--r-- 1 root root  565869 Jul 19 21:51 libvorbis-1.2.3-1.tgz
-rw-r--r-- 1 root root  522019 Jul 19 21:55 mc-4.1.40-pre9-8.tgz
-rw-r--r-- 1 root root 5660243 Jul 19 21:55 mediatomb-0.12.1-3.tgz
-rw-r--r-- 1 root root  116592 Sep 22 20:39 minidlna-10-09-2011-cvs20110910-2.tgz
-rw-r--r-- 1 root root  114823 Aug  6 21:03 minidlna-25-07-2011-cvs20110725-2.tgz

Offline

 

#6 2011-09-30 12:45:13

Gwargl
Member
Registered: 2011-06-23
Posts: 7

Re: inotify

Hi,

I have compiled mine on DNS-320 (version 1.0.20)


http://www.megaupload.com/?d=9ZD46NMU

Offline

 

#7 2011-10-05 22:22:36

RayDNS320
Member
Registered: 2011-08-06
Posts: 6

Re: inotify

Wow, Gwargl, thank you so much!
Inotify is finally working and miniDLNA is now at 0% CPU load instead of the former 100%.
The version is now lower and some subtitles package had to be removed but who cares wink

How did you build it? Using the regular miniDLNA from source and then looking for all required libraries?

Thank you again!

Last edited by RayDNS320 (2011-10-05 22:24:52)

Offline

 

#8 2011-10-06 15:12:04

Gwargl
Member
Registered: 2011-06-23
Posts: 7

Re: inotify

Hi,

Glad it help. I've made a new version based on 1.0.22 : http://www.megaupload.com/?d=9J62IRQZ


My english is rusty so i 'll make it simple.

For compiling, i've installed required and additionnal  dependencies -> http://nas-tweaks.net/82/installing-and … -fun_plug/

For compiling environment, you have to read this : http://nas-tweaks.net/106/compiling-sof … -fun_plug/
Don't forget that the correct path on DNS-320 is /mnt/HD/HD_a2. You will have to modify chroot.sh.

For minidlna buildenv , you'll have to unzip this http://www.megaupload.com/?d=P7BOA1EZ in /mnt/HD/HD_a2/ffpbuildenv/source thanks plord for compiling option (http://plord.co.uk/funplug/build.tgz).

cd  /mnt/HD/HD_a2/ffpbuildenv/source
chroot.sh
./Make.sh -F minidlna
./Make.sh minidlna
And if it's ok, package is in /mnt/HD/HD_a2/ffpbuildenv/packages

Last edited by Gwargl (2011-10-06 15:15:20)

Offline

 

#9 2011-10-07 16:03:27

Titang
New member
Registered: 2011-10-07
Posts: 2

Re: inotify

Hello !

I'm trying to make inotify works with mediatomb.

I have the same problem about "inapropriate ioctl bla bla bla".

The thing is i'm a real noob with linux environment.

Can you please explain in details what you did with the inotify.h and inotify-nosys.h file. I tried many things, but it still doesn't work.

Thank you for answering !

Offline

 

#10 2011-10-07 19:57:54

Gwargl
Member
Registered: 2011-06-23
Posts: 7

Re: inotify

- install  inotify-dev ( http://sites.google.com/site/sirmaxwiki/ ).
- extract  inotify-nosys.h from  GPL source code of firmware 1.0 and put it on nas using windows (directory volume_1) or ftp (/mnt/HD/HD_a2)
- connect to NAS and tape
cp /ffp/include/sys/inotify.h  /ffp/include/sys/inotify.h.old
cp /mnt/HD/HD_a2/inotify-nosys.h  /ffp/include/sys/inotify.h

The hard part :  you will have to compile mediatomb on DNS-320.

Offline

 

#11 2011-10-18 18:47:58

Mizu001
Member
Registered: 2010-12-02
Posts: 15

Re: inotify

Gwargl - Will this same method work for DNS-323 also? I managed to compile minidlna successfully using 1.0.22 code but inotify fails on starting. Also do you have any idea if there is a patch for Samsung TVs to fix the mta issue?

Offline

 

#12 2011-10-19 20:49:28

Gwargl
Member
Registered: 2011-06-23
Posts: 7

Re: inotify

As inotify-dev is made for DNS-323, i would say that installing this package only and compil minidlna should do the trick.
More info here : http://dns323.kood.org/forum/viewtopic. … 9&p=3.

Offline

 

#13 2011-10-24 13:25:47

Titang
New member
Registered: 2011-10-07
Posts: 2

Re: inotify

Hello,

Just a word to thank you for your help, i managed to compile mediatomb with inotify working on my dns-320.

yay !

Offline

 

#14 2011-12-30 15:33:59

Ratul011
New member
Registered: 2011-12-30
Posts: 1

Re: inotify

This is a very informative post for the all visitor . i realy like that. But i want more information about this post topic . good job.keep it up .

Offline

 

#15 2012-02-08 14:26:36

blamaster
New member
Registered: 2012-02-08
Posts: 1

Re: inotify

Hello,

i tried to get Minidlna working on my DNS-320.

I made the following steps:
1. Installed a clean Fun_plug 0.5
2. Installed  minidlna-21-10-2011 from http://numsys.eu/divers/minidlna-cvs-fr … 23-compil/
3. Installed the ffmpeg-SVN-r21842-1.tgz from http://numsys.eu/divers/minidlna-cvs-fr … mpil/with/
4. Replaced the \ffp\include\sys\inotify.h with the inotify.h from http://numsys.eu/divers/minidlna-cvs-fr … 23-compil/

If i try to start MiniDlna with the command "sh /ffp/start/minidlna.sh start" i get no errors or something else.
My Samsung TV is able to connect to the MiniDlna Server but there are 2 big problems. First the Minidlna´s cpu usage is 100% the whole time an the second problem is that the libary isn´t updating if i put new stuff on my disk.

Is there something i can check to solve my problems ? Or is it possible to upload Gwargl´s precompiled package again ?

Offline

 

#16 2012-02-10 17:15:54

Quickie
New member
Registered: 2012-02-10
Posts: 2

Re: inotify

First of all you are using a DNS-320 and the minidlna that you downloaded are for DNS 323.
It will run, but the inotify wont work. Try the minidlna package that Gwargl compiled.
minidlna-1.0.22-0.tgz - 112.7 Kb (Hope Gwargl wont mind i create a mirror for that)

About the cpu usage, mine does that when minidlna creating the DB for the first time.
Give it a few minutes.

Lastly thanks Gwargl for those tutorial on compiling minidlna. I finally get 1.0.23 to compile, although for some reason mine dont have the minidlna.conf.
Easy fix, i pasted the old one.

*Here's the build environment from Gwargl
minidlna.buildenv.zip - 8.0 Kb

Last edited by Quickie (2012-02-12 06:55:13)

Offline

 

#17 2012-02-12 05:37:44

mflash
Member
Registered: 2012-01-06
Posts: 7

Re: inotify

Anyone can share the buildenv for minidlna by Gwargl? Because it was on MU that is closed now... Thank you all in advance

Offline

 

#18 2012-02-12 15:53:45

R0b1n
Member
Registered: 2011-12-03
Posts: 51

Re: inotify

I'm looking for a working version of miniDLNA CVS based on 1.0.23 for my DNS-325. Could someone try to compile it ? Thanks for advance wink

Last edited by R0b1n (2012-02-12 15:54:04)

Offline

 

#19 2012-02-12 19:23:54

mflash
Member
Registered: 2012-01-06
Posts: 7

Re: inotify

@Quickie, thank you for sharing the buildenv smile
R0b1n, I'm trying the compilation of 1.0.23 right now, do you need it with patches or without them?

Last edited by mflash (2012-02-12 19:45:36)

Offline

 

#20 2012-02-12 20:21:47

R0b1n
Member
Registered: 2011-12-03
Posts: 51

Re: inotify

Thanks mflash. I've got 2 Samsung TV. Then I think I need these patches, no ?

Offline

 

#21 2012-02-12 20:52:36

mflash
Member
Registered: 2012-01-06
Posts: 7

Re: inotify

1.0.23 has a patch for subtitles on Samsung TVs...
I'm trying to apply patches for subtitles and also for thumbnails creation, but I don't know if these can work on 1.0.23...
I'm doing some experiments, after I'll post something valuable smile

Offline

 

#22 2012-02-12 20:58:52

R0b1n
Member
Registered: 2011-12-03
Posts: 51

Re: inotify

Thank you very much for your help mflash big_smile

Offline

 

#23 2012-02-13 15:43:27

mflash
Member
Registered: 2012-01-06
Posts: 7

Re: inotify

Here they are (all compiled on my DNS-320):

1) 1.0.18 with patch v2 by Randomcore : thumbs, subs menu, chapters with thumbs (with external preloaded mta option in minidlna.conf), bookmarks and working inotify:
http://dl.dropbox.com/u/50218998/minidlna-1.0.18-0.tgz

2) 1.0.19 with thumbnails patch by Anduras :
http://dl.dropbox.com/u/50218998/minidlna-1.0.19-0.tgz

3) 1.0.23 simply with minidlna.conf file added :
http://dl.dropbox.com/u/50218998/minidlna-1.0.23-1.tgz

All with working inotify for "real time" scan for newer files; the first 2 need libffmpegthumbnailer to create thumbs.
ATM I'm using the first for complete set of options...

Try it and let me know smile

Last edited by mflash (2012-02-13 15:45:02)

Offline

 

#24 2012-02-13 19:34:32

R0b1n
Member
Registered: 2011-12-03
Posts: 51

Re: inotify

Thanks for sharing mflash I will try these !

I will PM you too tongue

Offline

 

#25 2012-02-13 20:12:36

R0b1n
Member
Registered: 2011-12-03
Posts: 51

Re: inotify

Nice job mflash, your miniDLNA 1.0.23 is working with inotify enable !

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB